Przeglądaj źródła

Merge remote-tracking branch 'origin/sheep_develop' into sheep_develop

zengjiebin 7 lat temu
rodzic
commit
b3769fce53

+ 2 - 0
app/src/main/AndroidManifest.xml

@@ -156,6 +156,7 @@
         <!--2.0-->
         <activity
             android:name="com.sheep.gamegroup.view.activity.LoginAct"
+            android:configChanges="keyboardHidden|screenSize|orientation"
             android:launchMode="singleTask"
             android:screenOrientation="portrait"
             android:theme="@style/FullScreenTheme">
@@ -174,6 +175,7 @@
         </activity>
 
         <activity android:name="com.sheep.gamegroup.view.activity.PhoneAct"
+            android:configChanges="keyboardHidden|screenSize|orientation"
             android:screenOrientation="portrait"/>
         <activity android:name="com.sheep.gamegroup.view.activity.PersonalCenterAct"
             android:screenOrientation="portrait"/>

+ 1 - 1
app/src/main/java/com/kfzs/duanduan/fragment/FgtRouser.java

@@ -221,7 +221,7 @@ public class FgtRouser extends BaseCompatFragment {
                             intent.setComponent(null);
                             startActivity(intent);
                             CommonUtil.getInstance().awakenDetail(item);
-                        } catch (URISyntaxException e) {
+                        } catch (Exception e) {
                             e.printStackTrace();
                         }
                     }

+ 9 - 6
app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java

@@ -22,7 +22,6 @@ import android.text.Html;
 import android.text.TextUtils;
 import android.text.method.ScrollingMovementMethod;
 import android.util.DisplayMetrics;
-import android.util.TypedValue;
 import android.view.Display;
 import android.view.Gravity;
 import android.view.LayoutInflater;
@@ -30,8 +29,7 @@ import android.view.View;
 import android.view.Window;
 import android.view.WindowManager;
 
-import com.tencent.smtt.sdk.WebView;
-
+import android.webkit.WebView;
 import android.widget.CheckBox;
 import android.widget.CompoundButton;
 import android.widget.EditText;
@@ -591,7 +589,7 @@ public class ViewUtil {
         return null;
     }
 
-    public static void setH5Text(TextView textView, WebView webView, String content) {
+    public static void setH5Text(TextView textView, com.tencent.smtt.sdk.WebView webView, String content) {
         if (textView == null || webView == null) {
             return;
         }
@@ -626,9 +624,14 @@ public class ViewUtil {
         }
     }
 
+    public static void loadDataWithBaseURL(com.tencent.smtt.sdk.WebView webView, String content) {
+        webView.loadDataWithBaseURL(null,
+                new StringBuilder("<html><head><meta name=\"viewport\" content=\"width=device-width,height=auto, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes\" /><style>img{max-width:100% !important;height:auto !important;}</style><style>body{max-width:100% !important;}</style></head><body>").append(content).append("</body></html>").toString()
+                , "text/html", "utf-8", null);
+    }
     public static void loadDataWithBaseURL(WebView webView, String content) {
         webView.loadDataWithBaseURL(null,
-                new StringBuilder("<html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes\" /><style>img{max-width:100% !important;height:auto !important;}</style><style>body{max-width:100% !important;}</style></head><body>").append(content).append("</body></html>").toString()
+                new StringBuilder("<html><head><meta name=\"viewport\" content=\"width=device-width,height=auto, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes\" /><style>img{max-width:100% !important;height:auto !important;}</style><style>body{max-width:100% !important;}</style></head><body>").append(content).append("</body></html>").toString()
                 , "text/html", "utf-8", null);
     }
 
@@ -680,7 +683,7 @@ public class ViewUtil {
         }
         View dialog_close = dialog_parent.findViewById(R.id.dialog_close);
         LinearLayout dialog_center_ll = dialog_parent.findViewById(R.id.dialog_center_ll);
-        View view = LayoutInflater.from(mContext).inflate(dialogConfig.getLayoutId(), dialog_center_ll, true);
+        final View view = LayoutInflater.from(mContext).inflate(dialogConfig.getLayoutId(), dialog_center_ll, true);
         if (!TextUtils.isEmpty(title))
             dialog_title.setText(title);
 

+ 1 - 1
app/src/main/res/layout/x_msg_wv_dialog.xml

@@ -3,7 +3,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent">
 
-    <com.tencent.smtt.sdk.WebView
+    <WebView
         android:id="@+id/dialog_msg_wv"
         android:layout_width="match_parent"
         android:layout_marginLeft="10dp"