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

修复关注中无关注人员时,会显示空的问题;
足迹添加分享功能;
版本修改为3.4.2

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

+ 1 - 6
app/src/main/java/com/lqr/emoji/EmotionKeyboard.java

@@ -88,11 +88,6 @@ public class EmotionKeyboard {
         }
         return this;
     }
-    private boolean showSoftInputWhenHideEmotion = true;
-
-    public void setShowSoftInputWhenHideEmotion(boolean showSoftInputWhenHideEmotion) {
-        this.showSoftInputWhenHideEmotion = showSoftInputWhenHideEmotion;
-    }
 
     private View.OnClickListener getOnEmotionButtonOnClickListener() {
         return new View.OnClickListener() {
@@ -106,7 +101,7 @@ public class EmotionKeyboard {
 
                 if (mEmotionLayout.isShown()) {
                     lockContentHeight();//显示软件盘时,锁定内容高度,防止跳闪。
-                    hideEmotionLayout(showSoftInputWhenHideEmotion);//隐藏表情布局,显示软件盘
+                    hideEmotionLayout(true);//隐藏表情布局,显示软件盘
                     unlockContentHeightDelayed();//软件盘显示后,释放内容高度
                 } else {
                     if (isSoftInputShown()) {//同上

+ 33 - 0
app/src/main/java/com/sheep/gamegroup/util/SysAppUtil.java

@@ -709,4 +709,37 @@ public class SysAppUtil {
     public static String getDeviceBrand() {
         return android.os.Build.BRAND;
     }
+
+    public static String readCpuInfo() {
+        String result = "";
+        try {
+            String[] args = {"/system/bin/cat", "/proc/cpuinfo"};
+            ProcessBuilder cmd = new ProcessBuilder(args);
+
+            Process process = cmd.start();
+            StringBuffer sb = new StringBuffer();
+            String readLine = "";
+            BufferedReader responseReader = new BufferedReader(new InputStreamReader(process.getInputStream(), "utf-8"));
+            while ((readLine = responseReader.readLine()) != null) {
+                sb.append(readLine);
+            }
+            responseReader.close();
+            result = sb.toString().toLowerCase();
+        } catch (IOException ex) {
+        }
+        return result;
+    }
+
+    /**
+     * 判断cpu是否为电脑来判断 模拟器
+     *
+     * @return true 为模拟器
+     */
+    public static boolean checkIsNotRealPhone() {
+        String cpuInfo = readCpuInfo();
+        if ((cpuInfo.contains("intel") || cpuInfo.contains("amd"))) {
+            return true;
+        }
+        return false;
+    }
 }

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

@@ -276,7 +276,7 @@ public abstract class BaseListFragment2x<T,T2> extends BaseFragment implements I
     }
 
     protected void updateEmptyView() {
-        CommonUtil.getInstance().updateEmptyView(empty_view, list.isEmpty());
+        CommonUtil.getInstance().updateEmptyView(empty_view, list.isEmpty() && list2.isEmpty());
     }
 
     @Override

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

@@ -88,7 +88,7 @@ public class FgtArticleComment extends BaseListFragment3<UserComment> implements
         boolean isEmpty = list.isEmpty() && (article_id <= 0 || article == null);
         if (useSelfEmpty())
             CommonUtil.getInstance().updateEmptyView(empty_view, isEmpty);
-        ViewUtil.setVisibility(find_article_comment_title_rl, !isEmpty);
+        ViewUtil.setVisibility(find_article_comment_title_rl, !list.isEmpty());
     }
 
     @Override

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

@@ -24,6 +24,7 @@ import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.TestUtil;
 import com.sheep.gamegroup.util.TimeUtil;
 import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.util.share.ShareLinkConfig;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.G;
@@ -79,7 +80,13 @@ public class FgtFootprint extends BaseListFragment4<UserFootprint> {
         TitleBarUtils
                 .getInstance()
                 .setTitleFinish(getView(), activity)
-                .setTitle(getView(), "足迹");
+                .setTitle(getView(), "足迹")
+                .setRightImgBotton(activity, R.mipmap.share, new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        new ShareLinkConfig().toShare(activity);
+                    }
+                });
 
         view_list = mRecyclerView;
         initAdapter();

+ 5 - 0
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtPersonalCenter.java

@@ -35,6 +35,7 @@ import com.sheep.gamegroup.util.share.ShareLinkConfig;
 import com.sheep.gamegroup.view.activity.ActMsg;
 import com.sheep.gamegroup.view.activity.PersonalCenterAct;
 import com.sheep.gamegroup.view.adapter.AdpUserCenterModule;
+import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.base.BaseFragment;
@@ -108,6 +109,8 @@ public class FgtPersonalCenter extends BaseFragment {
     LinearLayout moduleLayout;
     @BindView(R.id.my_module_list)
     RecyclerView moduleList;
+    @BindView(R.id.fgt_person_center_my_focus)
+    View fgt_person_center_my_focus;
 
     public UserEntity userEntity;
     private String faqUrl;
@@ -153,6 +156,8 @@ public class FgtPersonalCenter extends BaseFragment {
         ViewUtil.setText(audit_failed, getString(R.string.audit_failed, ViewUtil.INDENT));
         ViewUtil.setVisibility(audit_failed_oval, false);
         initUserModuleItemView();
+        //是否显示我的关注
+        ViewUtil.setVisibility(fgt_person_center_my_focus, TestUtil.isTest() || BuildConfig.VERSION_CODE > 3004002);
     }
 
     private void initData() {

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

@@ -19,6 +19,7 @@ import com.sheep.gamegroup.model.entity.UserComment;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.ApiJSONUtil;
 import com.sheep.gamegroup.util.KeyEventUtil;
+import com.sheep.gamegroup.util.SysAppUtil;
 import com.sheep.gamegroup.util.TestUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.view.adapter.AdpArticleComment;
@@ -146,7 +147,6 @@ public class FgtVideoComment extends BaseListFragment4<UserComment> {
         mEmotionKeyboard.bindToEmotionButton(input_comment_exp);
         mEmotionKeyboard.bindToEditText(input_comment_input);
         mEmotionKeyboard.setEmotionLayout(elEmotion);
-        mEmotionKeyboard.setShowSoftInputWhenHideEmotion(false);
     }
 
     //返回处理

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

@@ -67,7 +67,7 @@
     <LinearLayout
         android:id="@+id/fgt_person_center_my_focus"
         style="@style/style_item_container"
-        android:visibility="visible">
+        android:visibility="gone">
 
         <ImageView
             style="@style/style_item_img"

+ 2 - 2
gradle.properties

@@ -17,8 +17,8 @@
 # org.gradle.parallel=true
 #android.injected.build.model.only.versioned = 3
 
-VERSION_NAME=3.4.0
-VERSION_CODE=3004000
+VERSION_NAME=3.4.2
+VERSION_CODE=3004002
 ANDROID_COMPILE_SDK_VERSION=28
 ANDROID_BUILD_TOOLS_VERSION=28.0.3
 ANDROID_MIN_SDK_VERSION=18