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

修改版本号,优化界面等

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

+ 1 - 1
app/build.gradle

@@ -64,7 +64,7 @@ android {
         ]
     }
     productFlavors {
-        sheeptest {
+        developSheeptest {
             applicationId "com.sheep.jiuyan.samllsheep"
             manifestPlaceholders = [DUANDUAN_GRAPH     : "sheeptest",
                                     DUANDUAN_DATASHARE : "sheeptest",

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/absBase/AbsChooseImageActivity.java

@@ -52,7 +52,7 @@ public abstract class AbsChooseImageActivity extends BaseActivity implements UpF
                 .setPhotoCount(photoCount)
                 .setShowCamera(true)
                 .setShowGif(false)
-                .setPreviewEnabled(false)
+                .setPreviewEnabled(true)
                 .start(this, PhotoPicker.REQUEST_CODE);
     }
 

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/util/ConnectAddress.java

@@ -60,7 +60,7 @@ public enum ConnectAddress {
         }
         @Override
         public String getName() {
-            return "测试服";
+            return "黄海测试服";
         }
     },sheepfz {
 

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

@@ -252,16 +252,6 @@ public class SysAppUtil {
                 .map(new Func1<Integer, Integer>() {
                     @Override
                     public Integer call(Integer integer) {
-//                        int result = -1;
-//                        Runtime runtime = Runtime.getRuntime();
-//                        try {
-//                            Process p = runtime.exec("ping -c 1 -w 2 www.baidu.com");//-c 1,表示只发送一个icmp echo_request 包  -w 1 表示等待1s
-//                            result = p.waitFor();
-//                            LogUtil.println("ping", "Process:"+result);
-//                        } catch (Exception e) {
-//                            e.printStackTrace();
-//                        }
-//                        return result;
                         try {
                             Response response = OkHttpUtils.get().url("http://www.baidu.com").build().execute();
                             return response.isSuccessful() ? 0 : -1;

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/ActWeb.java

@@ -160,7 +160,7 @@ public class ActWeb extends BaseCompatActivity {
                         .setPhotoCount(1)
                         .setShowCamera(true)
                         .setShowGif(false)
-                        .setPreviewEnabled(false)
+                        .setPreviewEnabled(true)
                         .start(ActWeb.this, PhotoPicker.REQUEST_CODE);*/
                 Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
                 if (takePictureIntent.resolveActivity(getPackageManager()) != null) {

+ 0 - 85
app/src/main/java/com/sheep/gamegroup/view/activity/GamemakeMoneyAct.java

@@ -44,12 +44,6 @@ public class GamemakeMoneyAct extends BaseActivity {
     TabLayout indicator;
     @BindView(R.id.pager)
     ViewPager pager;
-    @BindView(R.id.tab_gridview)
-    MyGridview tabGridview;
-    @BindView(R.id.select_tab_iv)
-    ImageView selectTabIv;
-    @BindView(R.id.task_gridview_layout)
-    LinearLayout task_gridview_layout;
     @BindView(R.id.show_flow_layout)
     LinearLayout show_flow_layout;
     private Activity activity;
@@ -57,12 +51,7 @@ public class GamemakeMoneyAct extends BaseActivity {
     private AdpTryMakemoney mAdapter;
     private String[] titles = new String[]{"推荐任务", "我的游戏"};
 
-    private AdpTrymakemoneyTabGridview tabGridviewAdp;
-    private ArrayList<Object> gridviewListAll = new ArrayList<>();
-    private ArrayList<Object> gridviewList = new ArrayList<>();
     private boolean clickFlag = false;
-    private GridViewEntity gridViewEntity;//选中的
-    private int select;
 
     private int is_succession;//0:一般任务 1:连续任务
 
@@ -103,45 +92,16 @@ public class GamemakeMoneyAct extends BaseActivity {
         pager.setAdapter(mAdapter);
         indicator.setupWithViewPager(pager);
 
-        tabGridviewAdp = new AdpTrymakemoneyTabGridview(activity, gridviewList);
-        tabGridview.setAdapter(tabGridviewAdp);
         pager.setCurrentItem(currentItem);
         CommonUtil.getInstance().reflex(indicator, activity);
     }
 
     @Override
     public void initListener() {
-        tabGridview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
-            @Override
-            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-                if(gridViewEntity == gridviewList.get(position)){
-                    return;
-                }
-                select = position;
-                gridViewEntity = (GridViewEntity) gridviewList.get(position);
-                for(int i=0;i<gridviewList.size();i++){
-                    if(position == i){
-                        ((GridViewEntity) gridviewList.get(i)).setSelectState(true);
-                    }else {
-                        ((GridViewEntity) gridviewList.get(i)).setSelectState(false);
-
-                    }
-                    tabGridviewAdp.notifyDataSetChanged();
-                }
-                try{
-                    //刷新界面
-                    mAdapter.getItem(indicator.getSelectedTabPosition()).onResume();
-                    Log.e("-----select position",indicator.getSelectedTabPosition()+"");
-                }catch (Exception e){
-                    e.printStackTrace();
-                }
-            }
-        });
     }
 
     @Override
     public void initData() {
-        task_gridview_layout.setVisibility(View.GONE);
         show_flow_layout.setVisibility(View.VISIBLE);
 
     }
@@ -153,20 +113,6 @@ public class GamemakeMoneyAct extends BaseActivity {
         ButterKnife.bind(this);
     }
 
-    @OnClick(R.id.select_tab_iv)
-    public void onViewClicked() {
-        clickFlag = !clickFlag;
-        setValueList2(clickFlag);
-        tabGridviewAdp.notifyDataSetChanged();
-    }
-
-    /**
-     * 获取tab的值,fragment调用
-     */
-    public GridViewEntity getTabValue(){
-        return gridViewEntity;
-    }
-
     /**
      * 获取is_succession,是否是连续任务
      */
@@ -174,37 +120,6 @@ public class GamemakeMoneyAct extends BaseActivity {
         return is_succession;
     }
 
-
-    /**
-     * test
-     * list 赋值
-     */
-    private void setValueList() {
-        gridviewListAll.clear();
-        for (int i = 0; i < 10; i++) {
-            if(i == 0){
-                gridviewListAll.add(new GridViewEntity(true, "click_" + i));
-            }else {
-                gridviewListAll.add(new GridViewEntity(false, "click_" + i));
-            }
-
-        }
-        setValueList2(clickFlag);
-    }
-    private void setValueList2(boolean flag) {
-        gridviewList.clear();
-        if(flag || gridviewListAll.size() <= 4){
-            gridviewList.addAll(gridviewListAll);
-            selectTabIv.setRotation(180);
-        }else {
-            selectTabIv.setRotation(0);
-            for (int i = 0; i < 4; i++) {
-                gridviewList.add(gridviewListAll.get(i));
-            }
-        }
-        tabGridviewAdp.notifyDataSetChanged();
-    }
-
     @Override
     protected void onDestroy() {
         super.onDestroy();

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/view/dialog/DialogChooseImage.java

@@ -45,7 +45,7 @@ public class DialogChooseImage {
                                 .setPhotoCount(1)
                                 .setShowCamera(true)
                                 .setShowGif(false)
-                                .setPreviewEnabled(false)
+                                .setPreviewEnabled(true)
                                 .start(activity, PhotoPicker.REQUEST_CODE);
                     }
                 });

+ 2 - 32
app/src/main/res/layout/act_game_make_money.xml

@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:orientation="vertical"
@@ -11,12 +10,12 @@
 
     <LinearLayout
         android:id="@+id/show_flow_layout"
-        android:layout_width="wrap_content"
+        android:layout_width="match_parent"
         android:layout_height="40dp"
         android:paddingStart="@dimen/content_padding_10"
         android:paddingEnd="@dimen/content_padding_10"
         android:layout_gravity="center_horizontal"
-        android:gravity="center_vertical"
+        android:gravity="center"
         android:orientation="horizontal"
         android:visibility="visible">
         <TextView
@@ -52,35 +51,6 @@
             style="@style/style_ash_tv"
             android:text="领取奖励"/>
     </LinearLayout>
-    <LinearLayout
-        android:id="@+id/task_gridview_layout"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        android:paddingLeft="@dimen/content_padding_3"
-        android:paddingRight="@dimen/content_padding"
-        android:paddingBottom="@dimen/content_padding_small"
-        android:paddingTop="@dimen/content_padding_small"
-        android:background="@color/white"
-        android:visibility="gone">
-        <com.sheep.gamegroup.util.MyGridview
-            android:id="@+id/tab_gridview"
-            android:layout_width="0dp"
-            android:layout_weight="1"
-            android:layout_height="wrap_content"
-            android:numColumns="4"
-            android:scrollbars="none"
-            android:listSelector="@android:color/transparent"
-            android:gravity="center_horizontal"/>
-
-        <ImageView
-            android:id="@+id/select_tab_iv"
-            android:layout_width="@dimen/view_size_30"
-            android:layout_height="@dimen/view_size_30"
-            android:padding="@dimen/content_padding_small"
-            android:src="@mipmap/arrow_down" />
-
-    </LinearLayout>
     <android.support.design.widget.TabLayout
         android:id="@+id/indicator"
         style="@style/style_tab"/>

+ 4 - 2
app/src/main/res/layout/fgt_try_makemoney_layout.xml

@@ -2,6 +2,9 @@
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:paddingBottom="@dimen/content_padding_10"
+    android:paddingStart="@dimen/content_padding_10"
+    android:paddingEnd="@dimen/content_padding_10"
     android:background="@color/bg_gray">
 
     <include
@@ -12,8 +15,7 @@
     <com.sheep.gamegroup.view.customview.SheepmSwipeRefreshLayout
         android:id="@+id/refresh"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_margin="@dimen/content_padding_10">
+        android:layout_height="wrap_content">
 
         <android.support.v7.widget.RecyclerView
             android:id="@+id/recyclerview"

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

@@ -26,7 +26,7 @@
         <android.support.v4.view.ViewPager
             android:id="@+id/pager"
             android:layout_width="match_parent"
-            android:layout_marginTop="27dp"
+            android:layout_marginTop="40dp"
             android:layout_height="match_parent"/>
         <LinearLayout
             android:id="@+id/show_flow_layout"

+ 2 - 2
gradle.properties

@@ -17,8 +17,8 @@
 # org.gradle.parallel=true
 #android.injected.build.model.only.versioned = 3
 
-VERSION_NAME=2.9.0
-VERSION_CODE=2009000
+VERSION_NAME=2.9.5
+VERSION_CODE=2009005
 ANDROID_COMPILE_SDK_VERSION=27
 ANDROID_BUILD_TOOLS_VERSION=27.0.2
 ANDROID_MIN_SDK_VERSION=18