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

+ 1 - 1
app/build.gradle

@@ -463,7 +463,7 @@ dependencies {
     //鸿途信达 广告sdk
     implementation(name: 'ad-htxd-201901071720', ext: 'aar')
 
-    //切换皮肤框架
+    //切换皮肤框架 https://github.com/ximsfei/Android-skin-support
 
     //    implementation 'skin.support:skin-support:4.0.1'                   // skin-support
 

+ 9 - 18
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtFind.java

@@ -72,32 +72,23 @@ public class FgtFind extends BaseFragment {
         ViewUtil.setVisibility(add_article_iv, false);
         ViewUtil.setVisibility(add_article_camera, false);
         ViewUtil.setVisibility(add_article_pic, false);
-        add_article.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                if (onlyChooseVideo) {
-                    Jump2View.getInstance().gotoActPublishArticle(MediaStore.Files.FileColumns.MEDIA_TYPE_VIDEO);
-                } else {
-                    changeAddArticle(add_article_iv.getVisibility() == View.VISIBLE);
-                }
+        add_article.setOnClickListener(view -> {
+            if (onlyChooseVideo) {
+                Jump2View.getInstance().gotoActPublishArticle(MediaStore.Files.FileColumns.MEDIA_TYPE_VIDEO);
+            } else {
+                changeAddArticle(add_article_iv.getVisibility() == View.VISIBLE);
             }
         });
         if (!onlyChooseVideo) {
-            add_article_camera.setOnClickListener(new View.OnClickListener() {
-                @Override
-                public void onClick(View view) {
+            add_article_camera.setOnClickListener(view -> {
 //                changeAddArticle(true);
 //                G.showToast("添加视频");
-                    Jump2View.getInstance().gotoActPublishArticle(MediaStore.Files.FileColumns.MEDIA_TYPE_VIDEO);
-                }
+                Jump2View.getInstance().gotoActPublishArticle(MediaStore.Files.FileColumns.MEDIA_TYPE_VIDEO);
             });
-            add_article_pic.setOnClickListener(new View.OnClickListener() {
-                @Override
-                public void onClick(View view) {
+            add_article_pic.setOnClickListener(view -> {
 //                changeAddArticle(true);
 //                G.showToast("添加图片");
-                    Jump2View.getInstance().gotoActPublishArticle(MediaStore.Files.FileColumns.MEDIA_TYPE_IMAGE);
-                }
+                Jump2View.getInstance().gotoActPublishArticle(MediaStore.Files.FileColumns.MEDIA_TYPE_IMAGE);
             });
         }
     }

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

@@ -1,6 +1,5 @@
 package com.sheep.gamegroup.view.fragment;
 
-import android.app.Activity;
 import android.content.Intent;
 import android.os.Bundle;
 import android.support.annotation.Nullable;
@@ -17,10 +16,11 @@ import com.kfzs.android.view.tag.TagFlowLayout;
 import com.sheep.gamegroup.event.BigEvent;
 import com.sheep.gamegroup.greendao.download.DownLoadInfo;
 import com.sheep.gamegroup.model.api.ApiService;
-import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.Applications;
 import com.sheep.gamegroup.model.entity.Article;
 import com.sheep.gamegroup.model.entity.ArticleTag;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.Lp;
 import com.sheep.gamegroup.module.ad_htxd.model.ArticleAd;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.DownloadUtil;
@@ -29,9 +29,11 @@ import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.TestUtil;
 import com.sheep.gamegroup.util.ViewHolder;
 import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.util.viewHelper.LayoutParamsUtil;
 import com.sheep.gamegroup.view.adapter.AdbCommonRecycler;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.PackageUtil;
 
 import org.afinal.simplecache.ApiKey;
@@ -58,6 +60,12 @@ public class FgtFindChild extends BaseListFragment5<Article> {
     private int type;
 
     @Override
+    public void initView() {
+        super.initView();
+        LayoutParamsUtil.resetLayoutParams(view_list, new Lp(G.DENSITY).setTopMargin(4));
+    }
+
+    @Override
     protected RecyclerView.Adapter getAdapter() {
         return new CommonRecycler(ArticleAd.showAd ? allList : list);
     }
@@ -392,12 +400,7 @@ public class FgtFindChild extends BaseListFragment5<Article> {
                 };
                 find_item_tags.setAdapter(adapter);
             }
-            rootConvertView.setOnClickListener(new View.OnClickListener() {
-                @Override
-                public void onClick(View view) {
-                    onClickItem(item);
-                }
-            });
+            rootConvertView.setOnClickListener(view -> onClickItem(item));
         }
     }
 
@@ -412,12 +415,7 @@ public class FgtFindChild extends BaseListFragment5<Article> {
             ViewUtil.setText(find_item_name, item.getTitle());
             ViewUtil.setTextTime(find_item_time, item.getCreated_at(), "yyyy-MM-dd");
             ViewUtil.setImage(find_item_iv, item.getPictures());
-            rootConvertView.setOnClickListener(new View.OnClickListener() {
-                @Override
-                public void onClick(View view) {
-                    onClickItem(item);
-                }
-            });
+            rootConvertView.setOnClickListener(view -> onClickItem(item));
         }
     }
 

+ 5 - 3
app/src/main/res/layout/fgt_find.xml

@@ -3,16 +3,18 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="@color/white">
+
     <ImageView
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:adjustViewBounds="true"
         android:scaleType="fitXY"
-        android:src="@drawable/skin_drawable_selector_bg_home_search"/>
+        android:src="@drawable/skin_drawable_selector_bg_home_search" />
+
     <android.support.design.widget.TabLayout
         android:id="@+id/indicator"
-        android:layout_marginTop="20dp"
-        style="@style/style_tab_2"/>
+        style="@style/style_tab_2"
+        android:layout_marginTop="20dp" />
 
     <android.support.v4.view.ViewPager
         android:id="@+id/pager"

+ 38 - 37
app/src/main/res/layout/find_item_news.xml

@@ -1,48 +1,49 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/find_item_container"
     android:layout_width="match_parent"
-    android:layout_height="wrap_content">
+    android:layout_height="wrap_content"
+    android:paddingTop="16dp"
+    android:paddingStart="16dp"
+    android:paddingEnd="16dp">
 
-    <RelativeLayout
-        android:id="@+id/find_item_container"
+    <TextView
+        android:id="@+id/find_item_name"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:padding="@dimen/content_padding_10">
+        android:layout_toStartOf="@+id/find_item_iv"
+        android:ellipsize="end"
+        android:maxLines="3"
+        android:minLines="2"
+        android:text="abcab"
+        android:textColor="@color/black_6_3"
+        android:textSize="15sp" />
 
-        <TextView
-            android:id="@+id/find_item_name"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_toLeftOf="@+id/find_item_iv"
-            android:ellipsize="end"
-            android:maxLines="3"
-            android:minLines="2"
-            android:text="abcab"
-            android:textColor="@color/black_6_3"
-            android:textSize="15sp" />
-
-        <TextView
-            android:id="@+id/find_item_time"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_below="@+id/find_item_name"
-            android:layout_marginTop="5dp"
-            android:layout_toLeftOf="@+id/find_item_iv"
-            android:text="@string/app_name"
-            android:textColor="#9B9B9B"
-            android:textSize="11sp" />
+    <TextView
+        android:id="@+id/find_item_time"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_below="@+id/find_item_name"
+        android:layout_marginTop="5dp"
+        android:layout_toStartOf="@+id/find_item_iv"
+        android:text="@string/app_name"
+        android:textColor="#9B9B9B"
+        android:textSize="11sp" />
 
-        <ImageView
-            android:id="@+id/find_item_iv"
-            android:layout_width="106dp"
-            android:layout_height="60dp"
-            android:layout_alignParentRight="true"
-            android:layout_marginLeft="@dimen/content_padding_10"
-            android:adjustViewBounds="true"
-            android:scaleType="centerCrop"
-            android:src="@mipmap/icon" />
+    <ImageView
+        android:id="@+id/find_item_iv"
+        android:layout_width="106dp"
+        android:layout_height="60dp"
+        android:layout_alignParentEnd="true"
+        android:layout_marginStart="@dimen/content_padding_10"
+        android:adjustViewBounds="true"
+        android:scaleType="centerCrop"
+        android:src="@mipmap/icon" />
 
-    </RelativeLayout>
+    <View
+        android:id="@+id/item_bottom_line"
+        style="@style/style_item_line_full"
+        android:layout_marginTop="16dp"
+        android:layout_below="@+id/find_item_iv"/>
 
 </RelativeLayout>