Просмотр исходного кода

邀请赚钱中背景直接使用ImageView,效果更新(之前用WebView是因为图片太大);
邀请码添加非必填提示

zengjiebin лет назад: 7
Родитель
Сommit
7c1a664083

+ 29 - 29
app/src/main/java/com/kfzs/duanduan/fragment/FgtAskgetmoney.java

@@ -4,19 +4,17 @@ import android.annotation.SuppressLint;
 import android.app.Activity;
 import android.app.Activity;
 import android.os.Bundle;
 import android.os.Bundle;
 import android.support.design.widget.TabLayout;
 import android.support.design.widget.TabLayout;
-import android.support.v4.view.ViewPager;
 import android.support.v4.widget.NestedScrollView;
 import android.support.v4.widget.NestedScrollView;
 import android.text.TextUtils;
 import android.text.TextUtils;
 import android.view.MotionEvent;
 import android.view.MotionEvent;
 import android.view.View;
 import android.view.View;
-
-import com.kfzs.duanduan.ActMain;
-import com.tencent.smtt.sdk.WebView;
+import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
 import android.widget.RelativeLayout;
 import android.widget.TextView;
 import android.widget.TextView;
 
 
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
+import com.kfzs.duanduan.ActMain;
 import com.kfzs.duanduan.BaseCompatFragment;
 import com.kfzs.duanduan.BaseCompatFragment;
 import com.kfzs.duanduan.mine.GiftpackListAdapter;
 import com.kfzs.duanduan.mine.GiftpackListAdapter;
 import com.kfzs.duanduan.view.ViewPagerAutoHeigh;
 import com.kfzs.duanduan.view.ViewPagerAutoHeigh;
@@ -26,6 +24,7 @@ import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.FastJsonUtils;
 import com.sheep.gamegroup.util.FastJsonUtils;
+import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.gamegroup.util.StringUtils;
 import com.sheep.gamegroup.util.StringUtils;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.view.fragment.FgtAskGetMoneyFriend;
 import com.sheep.gamegroup.view.fragment.FgtAskGetMoneyFriend;
@@ -57,7 +56,7 @@ public class FgtAskgetmoney extends BaseCompatFragment {
     @BindView(R.id.tv_money)
     @BindView(R.id.tv_money)
     TextView tvMoney;
     TextView tvMoney;
     @BindView(R.id.ask_bg)
     @BindView(R.id.ask_bg)
-    WebView ask_bg;
+    ImageView ask_bg;
     @BindView(R.id.ask_top_1)
     @BindView(R.id.ask_top_1)
     View ask_top_1;
     View ask_top_1;
     @BindView(R.id.ask_top_2)
     @BindView(R.id.ask_top_2)
@@ -96,30 +95,31 @@ public class FgtAskgetmoney extends BaseCompatFragment {
         }
         }
         unbinder = ButterKnife.bind(this, mContentView);
         unbinder = ButterKnife.bind(this, mContentView);
 
 
-
-        String content = "<!DOCTYPEhtml>\n" +
-                "<html>\n" +
-                "  <head>\n" +
-                "    <title>HTML字符串</title>\n" +
-                "    <metahttp-equivmetahttp-equiv=\"content-type\" content=\"text/html;charset=utf-8\">\n" +
-                "    <meta name=\"viewport\" content=\"width=" + G.WIDTH + ", user-scalable=no\">\n" +
-                "    <style type=\"text/css\">\n" +
-                "      body {\n" +
-                "        margin: 0;\n" +
-                "        padding: 0;\n" +
-                "      }\n" +
-                "      img {\n" +
-                "        padding: 0;\n" +
-                "        margin: 0;\n" +
-                "      }\n" +
-                "    </style>\n" +
-                "  </head>\n" +
-                "  <body>\n" +
-                "    <img src=\"http://cdngame.kuaifazs.com/yaoqingzq_bg.png\" width=\"100%\">\n" +
-                "  </body>\n" +
-                "</html>";
-        ask_bg.getSettings().setDefaultTextEncodingName("UTF-8");
-        ask_bg.loadData(content, "text/html", "UTF-8");
+//
+//        String content = "<!DOCTYPEhtml>\n" +
+//                "<html>\n" +
+//                "  <head>\n" +
+//                "    <title>HTML字符串</title>\n" +
+//                "    <metahttp-equivmetahttp-equiv=\"content-type\" content=\"text/html;charset=utf-8\">\n" +
+//                "    <meta name=\"viewport\" content=\"width=" + G.WIDTH + ", user-scalable=no\">\n" +
+//                "    <style type=\"text/css\">\n" +
+//                "      body {\n" +
+//                "        margin: 0;\n" +
+//                "        padding: 0;\n" +
+//                "      }\n" +
+//                "      img {\n" +
+//                "        padding: 0;\n" +
+//                "        margin: 0;\n" +
+//                "      }\n" +
+//                "    </style>\n" +
+//                "  </head>\n" +
+//                "  <body>\n" +
+//                "    <img src=\"http://cdngame.kuaifazs.com/yaoqingzq_bg.png\" width=\"100%\">\n" +
+//                "  </body>\n" +
+//                "</html>";
+//        ask_bg.getSettings().setDefaultTextEncodingName("UTF-8");
+//        ask_bg.loadData(content, "text/html", "UTF-8");
+        GlideImageLoader.setImage(ask_bg, "http://cdngame.kuaifazs.com/yaoqingzq_bg.png");
 //                16,18,19
 //                16,18,19
         LinearLayout.LayoutParams layoutParams1 = (LinearLayout.LayoutParams) ask_top_1.getLayoutParams();
         LinearLayout.LayoutParams layoutParams1 = (LinearLayout.LayoutParams) ask_top_1.getLayoutParams();
         layoutParams1.height = G.WIDTH * 660 / 625;
         layoutParams1.height = G.WIDTH * 660 / 625;

+ 2 - 2
app/src/main/res/layout/login_act_layout.xml

@@ -66,14 +66,14 @@
 
 
             </LinearLayout>
             </LinearLayout>
 
 
-            <View
+            <Viewg
                 android:layout_width="match_parent"
                 android:layout_width="match_parent"
                 android:layout_height="1dp"
                 android:layout_height="1dp"
                 android:background="@color/white" />
                 android:background="@color/white" />
             <android.support.v7.widget.AppCompatEditText
             <android.support.v7.widget.AppCompatEditText
                 android:id="@+id/login_et_scope"
                 android:id="@+id/login_et_scope"
                 style="@style/style_login_et"
                 style="@style/style_login_et"
-                android:hint="请输入邀请码"
+                android:hint="请输入邀请码(非必填)"
                 android:inputType="phone"
                 android:inputType="phone"
                 android:maxLength="11"/>
                 android:maxLength="11"/>
             <View
             <View

+ 2 - 2
app/src/main/res/layout/x_ask_getmoney_act_layout.xml

@@ -23,11 +23,11 @@
             android:layout_height="match_parent"
             android:layout_height="match_parent"
             android:background="#FFD269">
             android:background="#FFD269">
 
 
-            <com.tencent.smtt.sdk.WebView
+            <ImageView
                 android:id="@+id/ask_bg"
                 android:id="@+id/ask_bg"
                 android:layout_marginTop="?attr/actionBarSize"
                 android:layout_marginTop="?attr/actionBarSize"
                 android:layout_width="match_parent"
                 android:layout_width="match_parent"
-                android:layout_height="match_parent" />
+                android:layout_height="wrap_content" />
 
 
             <!--底部有白条,用这一层覆盖-->
             <!--底部有白条,用这一层覆盖-->
             <View
             <View