Explorar o código

2.2 修改提交

liujiangyao %!s(int64=8) %!d(string=hai) anos
pai
achega
25ecce4e66

+ 11 - 5
app/src/main/java/com/kfzs/duanduan/fragment/FgtSmallSheep.java

@@ -112,6 +112,8 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
     LinearLayout homepageItemNoticeLayout;
     @BindView(R.id.homepage_item_banner_layout)
     RelativeLayout homepage_item_banner_layout;
+    @BindView(R.id.icon_layout)
+    RelativeLayout icon_layout;
 
     @BindView(R.id.icon_img_iv)
     ImageView iconImgIv;
@@ -120,7 +122,7 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
     @BindView(R.id.sheep_num_tv)
     TextView sheepNumTv;
     @BindView(R.id.user_layout)
-    RelativeLayout userLayout;
+    LinearLayout userLayout;
     @BindView(R.id.withdrawal)
     TextView withdrawal;
     @BindView(R.id.my_price)
@@ -215,9 +217,10 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
         if (BuildConfig.DEBUG || ReactUtil.isSmallDebug()) {
             sheepNumTv.append("  邀请人:" + userEntity.getParent_code());
         }
-        Glide.with(getActivity())
+        Glide.with(activity)
                 .load(userEntity.getAvatar())
-                .apply(new RequestOptions().circleCrop().placeholder(R.drawable.icon))
+                .apply(new RequestOptions().centerCrop()
+                        .placeholder(R.drawable.icon))
                 .into(iconImgIv);
 
     }
@@ -359,13 +362,13 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
                 });
     }
 
-    @OnClick({R.id.icon_img_iv, R.id.user_layout, R.id.withdrawal, R.id.couple_red_packets_iv, R.id.try_play_layout, R.id.invitation_layout, R.id.lying_layout, R.id.newbie_task, R.id.card_layout})
+    @OnClick({R.id.icon_img_iv, R.id.user_layout, R.id.withdrawal, R.id.couple_red_packets_iv, R.id.try_play_layout,
+            R.id.invitation_layout, R.id.lying_layout, R.id.newbie_task, R.id.card_layout, R.id.icon_layout})
     public void onViewClicked(View view) {
         switch (view.getId()) {
             case R.id.icon_img_iv:
                 break;
             case R.id.user_layout:
-                Jump2View.getInstance().goPersonnalCenterView(activity, null);
                 break;
             case R.id.withdrawal:
                 Jump2View.getInstance().goWithdrawal(activity, null);
@@ -412,6 +415,9 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
                             }
                         });
                 break;
+            case R.id.icon_layout://头像
+                Jump2View.getInstance().goPersonnalCenterView(activity, null);
+                break;
         }
     }
 

+ 3 - 3
app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java

@@ -126,10 +126,10 @@ public interface ApiService {
     /**
      * 获取正在运行的任务
      */
-    @GET("app/release_task/")
+    @GET("app/release_task")
     Observable<BaseMessage> releaseTask(@Query("page") int page, @Query("per_page") int per_page,
-                                        @Query("per_page") int platform, @Query("per_page") int is_hot,
-                                        @Query("per_page") int is_recommend, @Query("per_page") int about_to_begin);
+                                        @Query("platform") int platform, @Query("is_hot") int is_hot,
+                                        @Query("is_recommend") int is_recommend, @Query("about_to_begin") int about_to_begin);
 
 
 

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

@@ -20,7 +20,7 @@
             android:orientation="vertical">
 
             <include
-                layout="@layout/homepage_item_top"/>
+                layout="@layout/homepage_item_top2"/>
 
             <include
                 layout="@layout/homepage_item_notice"/>

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

@@ -26,7 +26,7 @@
         android:layout_width="match_parent"
         android:layout_height="30dp"
         app:mvAnimDuration="1000"
-        app:mvDirection="bottom_to_top"
+        app:mvDirection="right_to_left"
         app:mvInterval="1000"
         style="@style/txt_style_12"
         app:mvSingleLine="true"

+ 18 - 15
app/src/main/res/layout/homepage_item_top.xml

@@ -14,21 +14,24 @@
             android:layout_height="wrap_content">
             <RelativeLayout
                 android:id="@+id/icon_layout"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content">
+                android:layout_width="@dimen/view_size_50"
+                android:layout_height="@dimen/view_size_50">
 
-            </RelativeLayout>
+                <ImageView
+                    android:id="@+id/icon_img_iv"
+                    android:layout_width="@dimen/view_size_45"
+                    android:layout_height="@dimen/view_size_45"
+                    android:src="@drawable/icon"/>
+                <ImageView
+                    android:id="@+id/edit_img_iv"
+                    android:layout_width="@dimen/view_size_15"
+                    android:layout_height="@dimen/view_size_15"
+                    android:src="@mipmap/head_edit_icon"
+                    android:layout_alignParentRight="true"
+                    android:layout_marginRight="@dimen/content_padding_small"
+                    android:layout_marginTop="@dimen/content_padding_3"/>
 
-            <ImageView
-                android:id="@+id/icon_img_iv"
-                android:layout_width="@dimen/view_size_45"
-                android:layout_height="@dimen/view_size_45"
-                android:src="@drawable/icon"/>
-            <ImageView
-                android:id="@+id/edit_img_iv"
-                android:layout_width="@dimen/view_size_20"
-                android:layout_height="@dimen/view_size_20"
-                android:src="@drawable/icon"/>
+            </RelativeLayout>
 
             <TextView
                 android:id="@+id/name_tv"
@@ -37,7 +40,7 @@
                 android:text=""
                 android:textSize="@dimen/text_size_12"
                 android:textColor="@color/txt_white"
-                android:layout_toRightOf="@id/icon_img_iv"
+                android:layout_toRightOf="@id/icon_layout"
                 android:layout_marginLeft="@dimen/content_padding_15"
                 android:layout_marginTop="@dimen/content_padding_small"
                 android:layout_marginBottom="@dimen/content_padding_small"/>
@@ -48,7 +51,7 @@
                 android:text="绵羊号:"
                 android:textSize="@dimen/text_size_10"
                 android:textColor="@color/txt_white"
-                android:layout_toRightOf="@id/icon_img_iv"
+                android:layout_toRightOf="@id/icon_layout"
                 android:layout_below="@+id/name_tv"
                 android:layout_marginLeft="@dimen/content_padding_15"
                 android:layout_marginBottom="@dimen/content_padding_small"/>

+ 105 - 0
app/src/main/res/layout/homepage_item_top2.xml

@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/user_layout"
+    android:layout_width="match_parent"
+    android:layout_height="@dimen/view_size_150"
+    android:orientation="horizontal"
+    android:background="@mipmap/home_blue_bg"
+    android:paddingTop="@dimen/content_padding_10"
+    android:paddingStart="@dimen/content_padding_10"
+    android:paddingEnd="@dimen/content_padding_10">
+
+    <RelativeLayout
+        android:id="@+id/icon_layout"
+        android:layout_width="@dimen/view_size_100"
+        android:layout_height="@dimen/view_size_100"
+        android:layout_gravity="center_vertical">
+
+        <ImageView
+            android:id="@+id/icon_img_iv"
+            android:layout_width="@dimen/view_size_90"
+            android:layout_height="@dimen/view_size_90"
+            android:src="@drawable/icon"/>
+        <ImageView
+            android:id="@+id/edit_img_iv"
+            android:layout_width="@dimen/view_size_20"
+            android:layout_height="@dimen/view_size_20"
+            android:src="@mipmap/head_edit_icon"
+            android:layout_alignParentRight="true"
+            android:layout_marginRight="@dimen/content_padding_small"
+            android:layout_marginTop="@dimen/content_padding_3"/>
+
+    </RelativeLayout>
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_vertical">
+
+
+        <TextView
+            android:id="@+id/name_tv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text=""
+            android:textSize="@dimen/text_size_12"
+            android:textColor="@color/txt_white"
+            android:layout_toRightOf="@id/icon_layout"
+            android:layout_marginLeft="@dimen/content_padding_10"
+            android:layout_marginTop="@dimen/content_padding_small"
+            android:layout_marginBottom="@dimen/content_padding_small"/>
+        <TextView
+            android:id="@+id/sheep_num_tv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="绵羊号:"
+            android:textSize="@dimen/text_size_10"
+            android:textColor="@color/txt_white"
+            android:layout_below="@+id/name_tv"
+            android:layout_marginLeft="@dimen/content_padding_10"
+            android:layout_marginBottom="@dimen/content_padding_small"/>
+        <TextView
+            android:id="@+id/my_property"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="账户余额:"
+            android:textColor="@color/txt_white"
+            android:textSize="@dimen/text_size_12"
+            android:layout_below="@+id/sheep_num_tv"
+            android:layout_marginLeft="@dimen/content_padding_10"
+            android:layout_marginBottom="@dimen/content_padding_small"/>
+        <TextView
+            android:layout_below="@+id/my_property"
+            android:id="@+id/my_price"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text=""
+            android:textColor="@color/txt_white"
+            android:textSize="@dimen/text_size_25"
+            android:layout_marginLeft="@dimen/content_padding_10"
+            android:layout_toLeftOf="@id/withdrawal"/>
+
+        <TextView
+            android:id="@+id/withdrawal"
+            android:layout_width="wrap_content"
+            android:layout_height="30dp"
+            android:layout_alignParentEnd="true"
+            android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
+            android:gravity="center"
+            android:minWidth="100dp"
+            android:text="提 现"
+            android:layout_below="@+id/my_property"
+            android:textColor="@color/blue_34a6e7"
+            android:textSize="@dimen/text_size_4"
+            android:layout_marginBottom="@dimen/content_padding_8"/>
+
+        <TextView
+            android:layout_below="@+id/my_price"
+            android:id="@+id/my_all_price"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="累计资产 "
+            android:textColor="@color/txt_white"
+            android:textSize="@dimen/text_size_12"
+            android:visibility="gone"/>
+    </RelativeLayout>
+</LinearLayout>

+ 5 - 0
app/src/main/res/values/common.xml

@@ -111,14 +111,19 @@
         <dimen name="radius_5">5dp</dimen>
         <dimen name="radius_newbie_task">18dp</dimen>
 
+    <dimen name="view_size_15">15dp</dimen>
     <dimen name="view_size_20">20dp</dimen>
     <dimen name="view_size_30">30dp</dimen>
     <dimen name="view_size_35">35dp</dimen>
     <dimen name="view_size_40">40dp</dimen>
     <dimen name="view_size_45">45dp</dimen>
+    <dimen name="view_size_50">50dp</dimen>
     <dimen name="view_size_60">60dp</dimen>
     <dimen name="view_size_73">73dp</dimen>
     <dimen name="view_size_80">80dp</dimen>
+    <dimen name="view_size_90">90dp</dimen>
+    <dimen name="view_size_100">100dp</dimen>
+    <dimen name="view_size_150">150dp</dimen>
     <dimen name="view_size_160">160dp</dimen>