소스 검색

ui tune up

hanjing 6 년 전
부모
커밋
14c288081f

+ 9 - 5
app/src/main/java/com/sheep/gamegroup/module/game/activity/ActGameGroupOrGameDetail.java

@@ -394,8 +394,12 @@ public class ActGameGroupOrGameDetail extends BaseActivity {
     @Override
     public void initData() {
         GameEntity gameEntity = DataUtil.getInstance().getCacheResult(ApiKey.playGameDetail(id), GameEntity.class);
-        checkData(gameEntity);
-        refreshData();
+        if (gameEntity != null) {
+            checkData(gameEntity);
+            refreshData();
+        } else {
+            initDetailFromNet();
+        }
     }
 
     private int refreshDataCount = 0;
@@ -486,9 +490,9 @@ public class ActGameGroupOrGameDetail extends BaseActivity {
 
     @OnClick(R.id.gc_game_app_detail_bt3)
     public void onGoDirectionalPay(View v) {
-        CommonUtil.getInstance().getUserInfo(false, user->{
-            if(user!=null) return;
-            if(user.isVIP()){
+        CommonUtil.getInstance().getUserInfo(false, user -> {
+            if (user != null) return;
+            if (user.isVIP()) {
                 Jump2View.getInstance().gotoGameVipRecharge(gameEntity.getApp());
             } else {
                 Jump2View.getInstance().gotoVip(this);

+ 0 - 1
app/src/main/java/com/sheep/gamegroup/module/home/adapter/AdpHomeList.java

@@ -39,7 +39,6 @@ public class AdpHomeList<T extends IHomeList> extends BaseQuickAdapter<T, BaseVi
         if(item instanceof HomeListEntity) {
             helper.setText(R.id.my_item_text2, ((HomeListEntity) item).getCustomTag());
         }
-        ViewUtil.updateTag(helper.getView(R.id.my_item_tag), item);
         Glide.with(SheepApp.getInstance()).load(item.getIcon()).into((ImageView) helper.getView(R.id.my_item_img));
     }
 }

+ 30 - 1
app/src/main/java/com/sheep/gamegroup/module/home/fragment/FgtHome.java

@@ -67,6 +67,8 @@ public class FgtHome extends BaseFragment {
     View line_recommend;
     @BindView(R.id.line_news)
     View line_news;
+    @BindView(R.id.show_hide_pwd_btn)
+    ImageView show_hide_pwd_btn;
 
     private UserEntity user;
 
@@ -82,6 +84,18 @@ public class FgtHome extends BaseFragment {
     }
 
     @Override
+    public void onResume() {
+        super.onResume();
+    }
+
+    @Override
+    public void onPause() {
+        super.onPause();
+        show_hide_pwd_btn.setImageResource(R.mipmap.pwd_hide);
+        tv_user_asset.setText("****");
+    }
+
+    @Override
     public void onDestroy() {
         EventBus.getDefault().unregister(this);
         super.onDestroy();
@@ -111,10 +125,22 @@ public class FgtHome extends BaseFragment {
     private void showUserProfile() {
         GlideImageLoader.setAvatar(iv_user_face, user.getAvatar(), Color.argb(128, 255, 255, 255));
         ViewUtil.setVisibility(iv_flag_vip, user.isVIP());
-        tv_user_asset.setText(String.format(Locale.CHINA, "%s\u0020元", NumberFormatUtils.retainMost2W(user.getBalance())));
         ViewUtil.setText(tv_nickname, user.getNickname());
     }
 
+    @OnClick(R.id.show_hide_pwd_btn)
+    public void showAsset(View v) {
+        ImageView btn = (ImageView) v;
+        btn.setSelected(!btn.isSelected());
+        if (btn.isSelected()) {
+            btn.setImageResource(R.mipmap.pwd_show);
+            tv_user_asset.setText(String.format(Locale.CHINA, "%s\u0020元", NumberFormatUtils.retainMost2W(user.getBalance())));
+        } else {
+            btn.setImageResource(R.mipmap.pwd_hide);
+            tv_user_asset.setText("****");
+        }
+    }
+
     @OnClick(R.id.iv_user_face)
     public void onFaceClick() {
         Jump2View.getInstance().goPersonnalCenterView(getActivity(), null);
@@ -148,6 +174,9 @@ public class FgtHome extends BaseFragment {
         line_recommend.setVisibility(isRecommend ? View.VISIBLE : View.GONE);
         tv_news.setAlpha(!isRecommend ? 1 : 0.8f);
         line_news.setVisibility(!isRecommend ? View.VISIBLE : View.GONE);
+        if (v.getId() == R.id.news_btn) {
+            ViewUtil.setVisibility(tip_news, false);
+        }
     }
 
     private void configFragments(Bundle savedInstanceState) {

+ 9 - 3
app/src/main/java/com/sheep/gamegroup/view/activity/ActMain.java

@@ -2,6 +2,7 @@ package com.sheep.gamegroup.view.activity;
 
 import android.content.Intent;
 import android.graphics.Color;
+import android.graphics.drawable.Drawable;
 import android.os.Build;
 import android.os.Bundle;
 import android.support.annotation.Nullable;
@@ -16,6 +17,7 @@ import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
 import android.widget.TextView;
 
+import com.kfzs.duanduan.cardview.ScreenUtil;
 import com.kfzs.duanduan.utils.StatusBarUtils;
 import com.kfzs.duanduan.view.DialogStorageLow;
 import com.sheep.gamegroup.absBase.AbsObserver;
@@ -194,6 +196,7 @@ public class ActMain extends BaseActYmPermissionCheck {
         FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
         MainTab[] mainTabs = MainTab.values();
         int index = 0;
+        int iconSize = ScreenUtil.dip2px(this, 30);
         for (MainTab mainTab : mainTabs) {
             Fragment fragment = getSupportFragmentManager().findFragmentByTag("fragment_" + index);
             if (fragment == null) {
@@ -210,9 +213,12 @@ public class ActMain extends BaseActYmPermissionCheck {
             View view = tab_container.getChildAt(index);
             if (view instanceof TextView) {
                 ((TextView) view).setText(mainTab.getStringId());
-//                if (mainTab.getDrawableId() == R.drawable.drawable_selector_askgetmoney) {
-//                    new DrawablesHelper((TextView) view).direction(DrawablesHelper.TOP).drawable(mainTab.getDrawableId(), 150 / 170.0f).commit();
-//                }
+                Drawable[] drawables = ((TextView) view).getCompoundDrawables();
+                if (drawables[1] != null) {
+                    drawables[1].setBounds(0, 0, iconSize, iconSize);
+                    ((TextView) view).setCompoundDrawables(drawables[0], drawables[1], drawables[2],
+                            drawables[3]);
+                }
             }
             tabs.add(view);
             final int position = index;

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

@@ -42,6 +42,7 @@ import com.alibaba.fastjson.JSONArray;
 import com.bumptech.glide.Glide;
 import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
 import com.bumptech.glide.request.RequestOptions;
+import com.kfzs.duanduan.cardview.ScreenUtil;
 import com.kfzs.duanduan.utils.NumberFormatUtils;
 import com.scwang.smartrefresh.layout.SmartRefreshLayout;
 import com.scwang.smartrefresh.layout.api.RefreshLayout;
@@ -83,6 +84,7 @@ import com.sheep.gamegroup.presenter.TryMakeMoneyPresenter;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.DataKey;
 import com.sheep.gamegroup.util.DataUtil;
+import com.sheep.gamegroup.util.DeviceUtil;
 import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.ListUtil;
@@ -581,7 +583,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
     private int bannerHeight;
 
     private void initBannerHeight() {
-        bannerHeight = G.WIDTH * 17 / 40;
+        bannerHeight = ScreenUtil.getScreenWidth(getContext()) * 17 / 40;
     }
 
     //游戏福利专区入口与刷新福利

+ 1 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/Config.java

@@ -109,6 +109,7 @@ public class Config {
     }
     public static void initSMALL_STATION_URL(){
         SMALL_STATION_URL = TextUtils.equals(SheepApp.getInstance().getConnectAddress().name(), "sheep") ? SMALL_STATION_URL_SHEEP : SMALL_STATION_URL_TEST;
+//        SMALL_STATION_URL = SMALL_STATION_URL_SHEEP;
     }
     public static String getUrlByPath(String path, Object...query){
         String url = SMALL_STATION_URL + path;

BIN
app/src/main/res/drawable-xxhdpi/index_download.png


BIN
app/src/main/res/drawable-xxhdpi/index_download.webp


+ 0 - 3
app/src/main/res/layout/act_game_group_or_game_detail.xml

@@ -150,7 +150,6 @@
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_marginStart="7dp"
-                        android:text="8.6分"
                         android:textColor="#ffffd042"
                         android:textSize="12sp"
                         app:layout_constraintBottom_toBottomOf="@id/gc_game_app_comment_score"
@@ -164,7 +163,6 @@
                         android:layout_marginStart="23dp"
                         android:layout_marginEnd="16dp"
                         android:gravity="center_vertical"
-                        android:text="永恒仙域"
                         android:textColor="#ff333333"
                         android:textSize="18sp"
                         app:layout_constraintBottom_toTopOf="@id/gc_game_app_detail_tag_list"
@@ -186,7 +184,6 @@
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:lineSpacingExtra="5dp"
-                        android:text="418M     230万人在玩"
                         android:textColor="#ff999999"
                         android:textSize="12sp"
                         app:layout_constraintBottom_toTopOf="@id/gc_game_app_detail_bt1"

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

@@ -19,7 +19,7 @@
         android:layout_below="@+id/indicator"
         android:layout_width="match_parent"
         android:layout_height="0.5dp"
-        android:background="@color/media_white_DEDEDE"/>
+        android:background="@color/media_white_ededed"/>
 
     <android.support.v4.view.ViewPager
         android:id="@+id/pager"

+ 19 - 6
app/src/main/res/layout/fgt_home.xml

@@ -8,7 +8,7 @@
     <RelativeLayout
         android:layout_width="match_parent"
         android:layout_height="40dp"
-        android:layout_marginTop="26dp">
+        android:layout_marginTop="32dp">
 
         <ImageView
             android:id="@+id/iv_user_face"
@@ -30,7 +30,6 @@
             android:layout_width="wrap_content"
             android:layout_height="20dp"
             android:layout_marginLeft="12dp"
-            android:layout_marginTop="2dp"
             android:layout_toRightOf="@+id/iv_user_face"
             android:text="七天的绵羊"
             android:textColor="@color/white"
@@ -54,12 +53,25 @@
             android:layout_alignBottom="@+id/iv_user_face"
             android:layout_marginLeft="4dp"
             android:layout_toRightOf="@+id/tv_coin_flag"
-            android:text="100"
+            android:text="****"
             android:textColor="@color/white"
             android:textSize="11sp"
             android:textStyle="bold" />
 
         <ImageView
+            android:id="@+id/show_hide_pwd_btn"
+            android:layout_width="25dp"
+            android:layout_height="wrap_content"
+            android:layout_toRightOf="@+id/tv_user_asset"
+            android:layout_below="@+id/tv_nickname"
+            android:layout_marginLeft="6dp"
+            android:layout_marginTop="4dp"
+            android:padding="3dp"
+            android:adjustViewBounds="true"
+            android:src="@mipmap/pwd_hide"
+            android:tint="#1299C4" />
+
+        <ImageView
             android:id="@+id/iv_flag_vip"
             android:layout_width="28dp"
             android:layout_height="13dp"
@@ -89,7 +101,7 @@
             android:gravity="center"
             android:minWidth="14dp"
             android:paddingStart="4dp"
-            android:paddingEnd="8dp"
+            android:paddingEnd="4dp"
             android:text="0"
             android:textColor="@color/white"
             android:textSize="9sp" />
@@ -99,7 +111,7 @@
             android:layout_width="40dp"
             android:layout_height="40dp"
             android:layout_alignParentEnd="true"
-            android:layout_marginEnd="40dp"
+            android:layout_marginEnd="48dp"
             android:padding="10dp"
             android:src="@drawable/drawable_selector_ic_home_download"
             android:tint="@color/white" />
@@ -109,7 +121,7 @@
             android:layout_width="40dp"
             android:layout_height="40dp"
             android:layout_alignParentEnd="true"
-            android:layout_marginEnd="74dp"
+            android:layout_marginEnd="90dp"
             android:padding="10dp"
             android:src="@drawable/drawable_selector_ic_home_search"
             android:tint="@color/white" />
@@ -117,6 +129,7 @@
     </RelativeLayout>
 
     <LinearLayout
+        android:layout_marginTop="4dp"
         android:layout_width="match_parent"
         android:layout_height="40dp"
         android:orientation="horizontal">

+ 1 - 0
app/src/main/res/layout/find_item.xml

@@ -3,6 +3,7 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
+    android:paddingTop="12dp"
     android:orientation="vertical">
 
     <LinearLayout

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

@@ -65,7 +65,7 @@
 
                 <View
                     android:layout_width="match_parent"
-                    android:layout_height="8dp"
+                    android:layout_height="13dp"
                     android:layout_below="@id/home_notice_ll"
                     android:background="@color/bg_home_color"/>
 

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

@@ -26,7 +26,7 @@
         android:maxLines="2"
         android:text="永恒仙域"
         android:textColor="#ff333333"
-        android:textSize="14sp"
+        android:textSize="15sp"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toEndOf="@id/item_icon_iv"
         app:layout_constraintTop_toTopOf="@id/item_icon_iv" />

+ 0 - 12
app/src/main/res/layout/item_my_list_but.xml

@@ -39,16 +39,4 @@
         android:singleLine="true"
         android:gravity="center"
         />
-
-    <TextView
-        android:id="@+id/my_item_tag"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentTop="true"
-        android:layout_alignParentEnd="true"
-        android:layout_marginEnd="5dp"
-        android:gravity="center"
-        android:text="试玩"
-        android:textColor="@color/black_6_3"
-        android:textSize="7sp" />
 </RelativeLayout>

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

@@ -1,9 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:fitsSystemWindows="true"
-    android:background="@color/bg">
+    android:layout_height="match_parent">
 
     <include
         android:id="@+id/check_net_ll"

+ 4 - 0
app/src/main/res/layout/tablayout_viewpager_layout.xml

@@ -6,6 +6,10 @@
     android:layout_height="match_parent"
     android:orientation="vertical">
 
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="12dp"
+        android:background="@color/bg_home_color"/>
 
     <android.support.design.widget.TabLayout
         android:id="@+id/tabLayout"

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

@@ -48,7 +48,7 @@
         <View
             android:id="@+id/item_top_v"
             android:layout_width="match_parent"
-            android:layout_height="@dimen/content_padding_10" />
+            android:layout_height="@dimen/content_padding_16" />
 
         <ImageView
             android:id="@+id/item_icon_iv"
@@ -262,7 +262,7 @@
 
     <View
         android:layout_width="match_parent"
-        android:layout_height="@dimen/content_padding_10" />
+        android:layout_height="@dimen/content_padding_16" />
 
     <View
         android:id="@+id/line_tv"