Procházet zdrojové kódy

Merge branch 'sheep_develop' of 10.8.230.114:xmy_android/small_sheep_android into sheep_develop

hanjing před 7 roky
rodič
revize
0e784a5b37

+ 5 - 2
app/src/main/java/com/sheep/gamegroup/presenter/SmallSheepPresenter.java

@@ -71,8 +71,11 @@ public class SmallSheepPresenter implements SmallSheepContract.Persenter {
                     public void onNext(BaseMessage baseMessage) {
 
                         if(baseMessage!=null){
-                            List<MoreDataEntity> loginEty = FastJsonUtils.toList( JSONObject.toJSONString(baseMessage.getData()),MoreDataEntity.class);
-                            view.showMore(loginEty);
+
+                            List<MoreDataEntity> loginEty = baseMessage.getDataList(MoreDataEntity.class);
+//                            List<MoreDataEntity> loginEty = FastJsonUtils.toList( JSONObject.toJSONString(baseMessage.getData()),MoreDataEntity.class);
+                            if(loginEty != null)
+                                view.showMore(loginEty);
 
                         }
 

+ 6 - 8
app/src/main/java/com/sheep/gamegroup/util/TestUtil.java

@@ -141,9 +141,9 @@ public class TestUtil {
                 @Override
                 public void onClick(View view) {
                     final List<LoginUser> loginUserList = MyDbManager.getInstance().getAllLoginUser();
-                    if (ListUtil.isEmpty(loginUserList)) {//无用户
-                        return;
-                    }
+//                    if (ListUtil.isEmpty(loginUserList)) {//无用户
+//                        return;
+//                    }
                     final List<Object> list = ListUtil.emptyList();
                     list.add("test");
                     list.add("清理清除aCache");
@@ -523,8 +523,10 @@ public class TestUtil {
                                 break;
                             case "添加token":
                                 CharSequence text = StringUtils.getCopyText();
-                                if(text != null)
+                                if(text != null) {
+                                    SpUtils.saveToken(activity, text.toString());
                                     addUser(text.toString());
+                                }
                                 break;
                             case "复制token":
                                 StringUtils.CopyText(SpUtils.getToken(activity));
@@ -763,10 +765,6 @@ public class TestUtil {
         activity.startActivity(intent);
     }
 
-    //3.4.3版本之后的版本
-    public static boolean isGTVersion3_4_3() {
-        return BuildConfig.VERSION_CODE > 3004003;
-    }
     //3.4.5版本之前的版本
     public static boolean isLTVersion3_4_5() {
         return BuildConfig.VERSION_CODE < 3004005;

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtFindChild.java

@@ -277,7 +277,7 @@ public class FgtFindChild extends BaseListFragment2<Article> {
         public CommonRecycler(List<Article> list) {
             super(SheepApp.getInstance(), list);
             commonConverter = new CommonConverter();
-            if(TestUtil.isGTVersion3_4_3())
+            if(!TestUtil.isLTVersion3_4_5())
                 newsConverter = new NewsConverter();
         }
 

+ 4 - 1
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtPersonalCenter.java

@@ -108,6 +108,8 @@ public class FgtPersonalCenter extends BaseFragment {
     LinearLayout moduleLayout;
     @BindView(R.id.my_module_list)
     RecyclerView moduleList;
+    @BindView(R.id.fgt_person_center_my_focus_line)
+    View fgt_person_center_my_focus_line;
     @BindView(R.id.fgt_person_center_my_focus)
     View fgt_person_center_my_focus;
 
@@ -156,7 +158,8 @@ public class FgtPersonalCenter extends BaseFragment {
         ViewUtil.setVisibility(audit_failed_oval, false);
         initUserModuleItemView();
         //是否显示我的关注
-        ViewUtil.setVisibility(fgt_person_center_my_focus, TestUtil.isTest() || TestUtil.isGTVersion3_4_3());
+        ViewUtil.setVisibility(fgt_person_center_my_focus_line, !TestUtil.isLTVersion3_4_5());
+        ViewUtil.setVisibility(fgt_person_center_my_focus, !TestUtil.isLTVersion3_4_5());
     }
 
     private void initData() {

+ 3 - 1
app/src/main/res/layout/fgt_personalcenter_item_center_one.xml

@@ -62,7 +62,9 @@
 
     </LinearLayout>
 
-    <View style="@style/style_item_line_new"/>
+    <View
+        android:id="@+id/fgt_person_center_my_focus_line"
+        style="@style/style_item_line_new"/>
 
     <LinearLayout
         android:id="@+id/fgt_person_center_my_focus"

+ 2 - 0
app/src/main/res/layout/fragment_sign_in.xml

@@ -25,6 +25,7 @@
         <EditText
             android:id="@+id/user_name_box"
             style="@style/login_edit_style"
+            android:digits="@string/digits_username"
             android:hint="请输入用户名/手机号"
             android:maxLength="20"
             android:paddingLeft="@dimen/content_padding_5" />
@@ -37,6 +38,7 @@
             android:id="@+id/password_box"
             style="@style/login_edit_style"
             android:layout_below="@+id/user_name_box"
+            android:digits="@string/digits_password"
             android:hint="请输入密码(6-16位)"
             android:inputType="textPassword"
             android:maxLength="16"

+ 2 - 0
app/src/main/res/values/str_public_strings.xml

@@ -6,6 +6,8 @@
     <string name="toast_double_click_exit_app">再次点击退出应用</string>
 
     <!--digits-->
+    <string name="digits_username">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789</string>
+    <string name="digits_captcha">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789</string>
     <string name="digits_password">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789~@#$%^*()-=_+</string>
 
     <!--img desc-->

+ 1 - 0
app/src/main/res/values/styles.xml

@@ -57,6 +57,7 @@
         <item name="android:background">@android:color/transparent</item>
         <item name="android:lines">1</item>
         <item name="android:maxLines">1</item>
+        <item name="android:singleLine">true</item>
         <item name="android:imeOptions">actionNext</item>
         <item name="android:textSize">@dimen/text_size_13</item>
         <item name="android:textColor">@color/black_6_3</item>