Explorar o código

完成游戏代充中的搜索游戏

zengjiebin %!s(int64=7) %!d(string=hai) anos
pai
achega
9fd16d6592

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

@@ -120,6 +120,14 @@ public interface ApiService {
                                         @Query("platform") int platform, @Query("is_hot") int is_hot,
                                         @Query("is_recommend") int is_recommend, @Query("about_to_begin") int about_to_begin,
                                         @Query("task_type") String task_type, @Query("is_succession") int is_succession);
+    /**
+     * 搜索游戏
+     */
+    @GET("app/release_task")
+    Observable<BaseMessage> releaseTask(@Query("page") int page, @Query("per_page") int per_page,
+                                        @Query("platform") int platform, @Query("is_hot") int is_hot,
+                                        @Query("is_recommend") int is_recommend, @Query("about_to_begin") int about_to_begin,
+                                        @Query("task_type") String task_type, @Query("is_succession") int is_succession, @Query("name") String name);
 
 
 
@@ -630,7 +638,7 @@ public interface ApiService {
      *获取游戏任务下拉列表
      */
     @GET("app/release_task/recharge_Game_List")
-    Observable<BaseMessage> rechargeGameList(@Query("task_type") int task_type, @Query("name") String name);
+    Observable<BaseMessage> rechargeGameList(@Query("task_type") String task_type, @Query("name") String name);
 
     /**
      *领取游戏账号

+ 38 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/SearchGameRecord.java

@@ -0,0 +1,38 @@
+package com.sheep.gamegroup.model.entity;
+
+import org.xutils.db.annotation.Column;
+import org.xutils.db.annotation.Table;
+
+/**
+ * Created by realicing on 2018/7/11.
+ * realicing@sina.com
+ */
+@Table(name = "search_game_record")
+public class SearchGameRecord {
+    @Column(name = "input", isId = true)
+    private String input;
+    @Column(name = "time")
+    private long time;
+
+    public String getInput() {
+        return input;
+    }
+
+    public void setInput(String input) {
+        this.input = input;
+    }
+
+    public long getTime() {
+        return time;
+    }
+
+    public void setTime(long time) {
+        this.time = time;
+    }
+
+
+    @Override
+    public String toString() {
+        return input;
+    }
+}

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

@@ -173,7 +173,11 @@ public class ImageGlarryDrawable<T> {
                         return;
                     }
                     int lastIndex = (mViewPager.getCurrentItem() + 1) % ListUtil.size(mList);
-                    mViewPager.setCurrentItem(lastIndex, true);
+                    try {
+                        mViewPager.setCurrentItem(lastIndex, true);
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
                     pagerAdapter.notifyDataSetChanged();
                     handler.removeMessages(1);
                     sendEmptyMessageDelayed(1, mIntDelayTime);

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

@@ -58,6 +58,7 @@ import com.sheep.gamegroup.view.activity.ActNewAboutUs;
 import com.sheep.gamegroup.view.activity.ActNewbieTaskList;
 import com.sheep.gamegroup.view.activity.ActNotice;
 import com.sheep.gamegroup.view.activity.ActReservation;
+import com.sheep.gamegroup.view.activity.ActSearchGame;
 import com.sheep.gamegroup.view.activity.ActUnderstandSheep;
 import com.sheep.gamegroup.view.activity.ActUserLabelList;
 import com.sheep.gamegroup.view.activity.ActWeb;
@@ -120,6 +121,7 @@ import rx.schedulers.Schedulers;
 
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.RECHARGE;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.RECHARGE_QQ;
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.SEARCH_GAME;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.USER_ABOUT_US;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.USER_ACCOUNT_SAFE;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.USER_FEEDBACK;
@@ -1400,4 +1402,12 @@ public class Jump2View {
         activity.startActivity(intent);
 
     }
+    /**
+     * 游戏搜索
+     */
+    public void goGameSearch(Activity activity, Object o){
+        Intent intent = new Intent(activity, ActSearchGame.class);
+        activity.startActivity(intent);
+        SEARCH_GAME.onEvent();
+    }
 }

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

@@ -7,6 +7,7 @@ import com.sheep.gamegroup.model.entity.AppRecord;
 import com.sheep.gamegroup.model.entity.AppUsage;
 import com.sheep.gamegroup.model.entity.LoginUser;
 import com.sheep.gamegroup.model.entity.NewbieTaskRecord;
+import com.sheep.gamegroup.model.entity.SearchGameRecord;
 import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
@@ -225,4 +226,13 @@ public class MyDbManager {
         }
         return null;
     }
+
+    public List<SearchGameRecord> getAllSearchGameRecord() {
+        try{
+            return db.selector(SearchGameRecord.class).findAll();
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        return ListUtil.emptyList();
+    }
 }

+ 6 - 2
app/src/main/java/com/sheep/gamegroup/util/TestUtil.java

@@ -282,8 +282,9 @@ public class TestUtil {
      * @param activity
      */
     public static void test(final Activity activity) {
-        final String[] items = {"游戏帐号","游戏代充","复制打点数据","尝试开启第三方应用使用情况","测试代理页面","第三方应用使用情况","开启第三方应用使用情况","h5跳转","新手对话框","md5","空间不足提示框",
-                "显示已经安装应用列表","复制token","复制faq地址","复制代理地址","复制世界杯地址","任务游戏列表","世界杯活动","交通银行信用卡测试",
+        final String[] items = {"复制token","复制打点数据","游戏搜索","游戏帐号","游戏代充","尝试开启第三方应用使用情况","测试代理页面","第三方应用使用情况",
+                "开启第三方应用使用情况","h5跳转","新手对话框","md5","空间不足提示框",
+                "显示已经安装应用列表","复制faq地址","复制代理地址","复制世界杯地址","任务游戏列表","世界杯活动","交通银行信用卡测试",
                 "浦发银行信用卡测试", "测试游戏模块","打卡成功提示","定向货币详情","进入绑定身份认证界面时的提示","提交身份认证时的提示", "检查标签",
                 "友盟分享", "了解小绵羊", "提现成功"};
         AlertDialog dialog = new AlertDialog.Builder(activity).setTitle("请选择测试项目")
@@ -301,6 +302,9 @@ public class TestUtil {
                             case "复制打点数据":
                                 UMConfigUtils.copyDaDianData();
                                 break;
+                            case "游戏搜索":
+                                Jump2View.getInstance().goGameSearch(activity, null);
+                                break;
                             case "测试代理页面":
                                 Jump2View.getInstance().goWeb(activity, "http://10.8.210.172:8081/#/?authorization=123123", "代理服务");
                                 break;

+ 213 - 7
app/src/main/java/com/sheep/gamegroup/view/activity/ActSearchGame.java

@@ -1,19 +1,36 @@
 package com.sheep.gamegroup.view.activity;
 
 import android.support.v7.widget.AppCompatAutoCompleteTextView;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.text.Editable;
+import android.text.TextUtils;
+import android.text.TextWatcher;
+import android.view.KeyEvent;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.inputmethod.EditorInfo;
+import android.widget.AdapterView;
 import android.widget.GridView;
+import android.widget.ImageView;
 import android.widget.TextView;
 
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.SearchGameRecord;
+import com.sheep.gamegroup.model.entity.TaskEty;
 import com.sheep.gamegroup.model.entity.TaskReleaseEty;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.MyDbManager;
+import com.sheep.gamegroup.util.ViewHolder;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.view.adapter.AdbCommonRecycler;
 import com.sheep.gamegroup.view.adapter.ArrayAdapter;
 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.TitleBarUtils;
 
 import java.util.ArrayList;
@@ -38,48 +55,177 @@ public class ActSearchGame extends BaseActivity {
     TextView search_game_bt;
     @BindView(R.id.search_game_hot_list)
     GridView search_game_hot_list;
+    @BindView(R.id.search_game_list)
+    RecyclerView search_game_list;
+    @BindView(R.id.search_game_hot)
+    View search_game_hot;
+    @BindView(R.id.download_mgr_empty_view)
+    View download_mgr_empty_view;
 
     @Override
     protected int getLayoutId() {
         return R.layout.act_search_game;
     }
+
     private ActSearchGame activity;
-    private ArrayAdapter<TaskReleaseEty> hotAdapter;
+
     @Override
     public void initView() {
         activity = this;
         TitleBarUtils.getInstance()
                 .setTitle(this, "搜索游戏")
                 .setTitleFinish(this);
-        hotAdapter = new ArrayAdapter<TaskReleaseEty>(activity, R.layout.hot_tag_item){
+        download_mgr_empty_view.setVisibility(View.GONE);
+        initHotList();
+        initList();
+        initInput();
+
+    }
+    private ArrayAdapter<SearchGameRecord> inputAdapter;
+    private void initInput() {
+        inputAdapter = new ArrayAdapter<>(activity, android.R.layout.simple_list_item_1, searchGameRecordList);
+        search_game_input.setAdapter(inputAdapter);
+        search_game_input.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+
+            @Override
+
+            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                Object obj = parent.getItemAtPosition(position);
+                if(obj instanceof SearchGameRecord){
+                    search_game_input.setText(((SearchGameRecord) obj).getInput());
+                }
+            }
+
+        });
+//        search_game_input.setThreshold(1);
+    }
+
+    private AdbCommonRecycler<TaskReleaseEty> adapter;
+    private void initList() {
+        search_game_list.setLayoutManager(new LinearLayoutManager(activity));
+        adapter = new AdbCommonRecycler<TaskReleaseEty>(activity, list) {
+
             @Override
-            public boolean convert(int position, View convertView, ViewGroup parent, TaskReleaseEty item) {
-                if(convertView instanceof TextView){
+            public int getViewIdByType(int type) {
+                return R.layout.item_search_game;
+            }
+
+            @Override
+            public void convert(ViewHolder holder, final TaskReleaseEty item) {
+                View itemView = holder.itemView;
+                final TaskEty taskEty;
+                if (item == null || (taskEty = item.getTask()) == null) {
+                    return;
+                }
+                ImageView find_information_game_icon = (ImageView) itemView.findViewById(R.id.find_information_game_icon);
+                TextView find_information_game_name = (TextView) itemView.findViewById(R.id.find_information_game_name);
+                TextView find_information_game_surplus = (TextView) itemView.findViewById(R.id.find_information_game_surplus);
+                TextView find_information_game_time = (TextView) itemView.findViewById(R.id.find_information_game_time);
+                TextView find_information_game_yuan = (TextView) itemView.findViewById(R.id.find_information_game_yuan);
+                TextView find_information_game_task = (TextView) itemView.findViewById(R.id.find_information_game_task);
+                ViewUtil.setImage(find_information_game_icon, taskEty.getIcon());
+                ViewUtil.setText(find_information_game_name, item.getName());
+                ViewUtil.setText(find_information_game_surplus);
+                ViewUtil.setText(find_information_game_time, taskEty.getTask_name());
+                find_information_game_yuan.setVisibility(View.GONE);
+                find_information_game_task.setText("立即充值");
+                find_information_game_task.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        ViewUtil.showGamePayAccount(activity, taskEty.getThird_task_id());
+                    }
+                });
+                itemView.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        Jump2View.getInstance().goTaskDetailView(activity, item.getId());
+                    }
+                });
+            }
+        };
+        search_game_list.setAdapter(adapter);
+    }
+
+    private ArrayAdapter<TaskReleaseEty> hotAdapter;
+    private void initHotList() {
+        hotAdapter = new ArrayAdapter<TaskReleaseEty>(activity, R.layout.item_search_game_hot, hotList) {
+            @Override
+            public boolean convert(int position, View convertView, ViewGroup parent, final TaskReleaseEty item) {
+                if (convertView instanceof TextView) {
                     ((TextView) convertView).setText(item.getName());
                 }
+                convertView.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        Jump2View.getInstance().goTaskDetailView(activity, item.getId());
+                    }
+                });
                 return true;
             }
         };
         search_game_hot_list.setAdapter(hotAdapter);
     }
 
+    private Runnable autoSearchRunnable = new Runnable() {
+        @Override
+        public void run() {
+            search_game_bt.performClick();
+        }
+    };
     @Override
     public void initListener() {
+        search_game_input.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+            @Override
+            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                if (actionId == EditorInfo.IME_ACTION_SEARCH) {
+                    search_game_bt.performClick();
+                }
+                return false;
+            }
+        });
+        search_game_input.addTextChangedListener(new TextWatcher() {
+            @Override
+            public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+
+            }
+
+            @Override
+            public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+                search_game_input.removeCallbacks(autoSearchRunnable);
+                search_game_input.postDelayed(autoSearchRunnable, 1000L);//1秒后自动搜索
+            }
+
+            @Override
+            public void afterTextChanged(Editable editable) {
+
+            }
+        });
     }
 
+    List<SearchGameRecord> searchGameRecordList = new ArrayList<>();
     List<TaskReleaseEty> hotList = new ArrayList<>();
+    List<TaskReleaseEty> list = new ArrayList<>();
+
     @Override
     public void initData() {
+        //初始化搜索历史
+        List<SearchGameRecord> newSgrList = MyDbManager.getInstance().getAllSearchGameRecord();
+        ListUtil.addAll(searchGameRecordList, newSgrList);
+        inputAdapter.notifyDataSetChanged();
+        //初始化热门列表
         SheepApp.getInstance().getNetComponent().getApiService()
-                .releaseTask(1,9,
-                        SheepApp.getInstance().getConnectAddress().getPlatForm(),1,
+                .releaseTask(1, 9,
+                        SheepApp.getInstance().getConnectAddress().getPlatForm(), 1,
                         0, 0,
-                        "-1", 3)
+                        "1002,1003,1004", 3)
                 .subscribeOn(Schedulers.io())
                 .observeOn(AndroidSchedulers.mainThread())
                 .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.mContext) {
                     @Override
                     public void onError(BaseMessage baseMessage) {
+                        download_mgr_empty_view.setVisibility(View.VISIBLE);
+                        search_game_hot.setVisibility(View.GONE);
+                        search_game_list.setVisibility(View.GONE);
                     }
 
                     @Override
@@ -97,8 +243,68 @@ public class ActSearchGame extends BaseActivity {
         switch (view.getId()) {
             case R.id.search_game_bt:
                 SEARCH_GAME_COMMIT.onEvent();
+                toSearchGame();
                 break;
         }
     }
 
+    private void toSearchGame() {
+        String inputText = search_game_input.getText().toString();
+        if (TextUtils.isEmpty(inputText)) {
+            list.clear();
+            notifyDataSetChanged();
+            return;
+        }
+        //保存搜索到数据库
+        SearchGameRecord searchGameRecord = new SearchGameRecord();
+        searchGameRecord.setInput(inputText);
+        searchGameRecord.setTime(System.currentTimeMillis());
+        MyDbManager.getInstance().saveOrUpdate(searchGameRecord);
+        searchGameRecordList.add(searchGameRecord);
+//        inputAdapter.notifyDataSetChanged();
+        //执行搜索
+        SheepApp.getInstance().getNetComponent().getApiService()
+                .releaseTask(1, 9,
+                        SheepApp.getInstance().getConnectAddress().getPlatForm(), 1,
+                        0, 0,
+                        "1002,1003,1004", 3, inputText)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        List<TaskReleaseEty> newList = baseMessage.getDatas(TaskReleaseEty.class);
+                        list.clear();
+                        ListUtil.addAll(list, newList);
+                        notifyDataSetChanged();
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        G.showToast("暂无游戏");
+                        list.clear();
+                        notifyDataSetChanged();
+                    }
+                });
+    }
+
+    private void notifyDataSetChanged() {
+        adapter.notifyDataSetChanged();
+        if (list.isEmpty()) {
+            if(hotList.isEmpty()) {
+                download_mgr_empty_view.setVisibility(View.VISIBLE);
+            } else {
+                search_game_hot.setVisibility(View.VISIBLE);
+            }
+            search_game_list.setVisibility(View.GONE);
+        } else {
+            search_game_list.setVisibility(View.VISIBLE);
+            if(hotList.isEmpty()) {
+                download_mgr_empty_view.setVisibility(View.GONE);
+            } else {
+                search_game_hot.setVisibility(View.GONE);
+            }
+        }
+    }
+
 }

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

@@ -401,6 +401,7 @@ public class ChangeTelAct extends BaseActivity implements PhoneContract.View{
         G.showToast(o.getMsg()+"");
         switch (where_from){
             case 1:
+            case 30001:
                 Jump2View.getInstance().checkLabel(activity, new Action1<BaseMessage>() {
                     @Override
                     public void call(BaseMessage baseMessage) {
@@ -410,9 +411,6 @@ public class ChangeTelAct extends BaseActivity implements PhoneContract.View{
                     }
                 });
                 return;
-            case 30001:
-                Jump2View.getInstance().goLoginView(activity, o);
-                break;
         }
         finish();
     }

+ 9 - 0
app/src/main/res/drawable/shape_ash_stroke_rectangle_small.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <corners android:radius="5dp" />
+    <stroke
+        android:width="1dp"
+        android:color="#cccccc" />
+    <solid android:color="#ffffff" />
+</shape>

+ 9 - 0
app/src/main/res/drawable/shape_blue_white_stroke_rectangle_small.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <corners android:radius="5dp" />
+    <stroke
+        android:width="1dp"
+        android:color="@color/blue_end" />
+    <solid android:color="#ffffff" />
+</shape>

+ 8 - 0
app/src/main/res/drawable/style_button_stroke2.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+  <item android:state_focused="true" android:drawable="@drawable/shape_blue_stroke_rectangle_small" />
+  <item android:state_checked="true" android:drawable="@drawable/shape_blue_stroke_rectangle_small"/>
+  <item android:state_selected="true" android:drawable="@drawable/shape_blue_stroke_rectangle_small"/>
+  <item android:state_pressed="true" android:drawable="@drawable/shape_blue_stroke_rectangle_small"/>
+  <item android:drawable="@drawable/shape_ash_stroke_rectangle_small"/>
+</selector>

+ 85 - 50
app/src/main/res/layout/act_search_game.xml

@@ -1,57 +1,92 @@
 <?xml version="1.0" encoding="utf-8"?>
-<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@color/bg_gray">
+    android:background="@color/bg_gray"
+    android:orientation="vertical">
 
-    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="@color/bg_gray"
-        android:gravity="center_horizontal"
-        android:orientation="vertical">
+    <include layout="@layout/title" />
 
-        <include layout="@layout/title" />
+    <android.support.v4.widget.NestedScrollView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
 
-        <android.support.v7.widget.AppCompatAutoCompleteTextView
-            android:id="@+id/search_game_input"
+        <LinearLayout
             android:layout_width="match_parent"
-            android:layout_height="50dp"
-            android:layout_marginEnd="@dimen/content_padding"
-            android:layout_marginStart="@dimen/content_padding"
-            android:layout_marginTop="@dimen/content_padding_20"
-            android:background="@drawable/shape_blue_stroke_rectangle_small"
-            android:hint="请输入游戏名称"
-            android:maxLength="20"
-            android:paddingEnd="@dimen/dp_10"
-            android:paddingStart="@dimen/dp_10"
-            android:textColor="@color/black_666666"
-            android:textColorHint="@color/txt_gray_929292"
-            android:textSize="@dimen/text_size_3" />
-
-        <TextView
-            android:id="@+id/search_game_bt"
-            style="@style/style_button_newbie_task"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:paddingEnd="50dp"
-            android:paddingStart="50dp"
-            android:text="搜索" />
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="热门游戏:" />
-
-        <GridView
-            android:id="@+id/search_game_hot_list"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="@dimen/content_padding_20"
-            android:gravity="center_horizontal"
-            android:horizontalSpacing="@dimen/content_padding_13"
-            android:listSelector="@color/transparent"
-            android:numColumns="3"
-            android:scrollbars="none" />
-    </LinearLayout>
-</android.support.v4.widget.NestedScrollView>
+            android:layout_height="match_parent"
+            android:orientation="vertical">
+
+
+            <android.support.v7.widget.AppCompatAutoCompleteTextView
+                android:id="@+id/search_game_input"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginEnd="@dimen/content_padding"
+                android:layout_marginStart="@dimen/content_padding"
+                android:layout_marginTop="@dimen/content_padding_30"
+                android:layout_marginBottom="@dimen/content_padding"
+                android:background="@drawable/shape_blue_white_stroke_rectangle_small"
+                android:hint="请输入游戏名称"
+                android:imeOptions="actionSearch"
+                android:maxLength="40"
+                android:paddingBottom="@dimen/dp_10"
+                android:paddingEnd="@dimen/dp_10"
+                android:paddingStart="@dimen/dp_10"
+                android:paddingTop="@dimen/dp_10"
+                android:singleLine="true"
+                android:textColor="@color/black_666666"
+                android:textColorHint="@color/txt_gray_929292"
+                android:textSize="@dimen/text_size_3" />
+            <TextView
+                android:id="@+id/search_game_bt"
+                style="@style/style_button_newbie_task"
+                android:layout_width="wrap_content"
+                android:layout_gravity="center_horizontal"
+                android:paddingEnd="50dp"
+                android:paddingStart="50dp"
+                android:text="搜索" />
+
+            <include
+                layout="@layout/empty_view"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent" />
+
+            <LinearLayout
+                android:id="@+id/search_game_hot"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:gravity="center_horizontal"
+                android:orientation="vertical">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/content_padding_40"
+                    android:text="热门游戏:" />
+
+                <com.sheep.gamegroup.util.MyGridview
+                    android:id="@+id/search_game_hot_list"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginEnd="@dimen/content_padding_30"
+                    android:layout_marginStart="@dimen/content_padding_30"
+                    android:layout_marginTop="@dimen/content_padding_20"
+                    android:gravity="center_horizontal"
+                    android:horizontalSpacing="@dimen/content_padding_13"
+                    android:listSelector="@color/transparent"
+                    android:numColumns="3"
+                    android:scrollbars="none"
+                    android:verticalSpacing="@dimen/content_padding" />
+            </LinearLayout>
+
+            <android.support.v7.widget.RecyclerView
+                android:id="@+id/search_game_list"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_margin="@dimen/content_padding"
+                android:paddingBottom="@dimen/content_padding"
+                android:paddingTop="@dimen/content_padding" />
+        </LinearLayout>
+    </android.support.v4.widget.NestedScrollView>
+</LinearLayout>

+ 10 - 0
app/src/main/res/layout/item_search_game.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="@color/white"
+    android:padding="@dimen/content_padding">
+
+    <include layout="@layout/find_information_bottom_item" />
+
+</LinearLayout>

+ 6 - 0
app/src/main/res/layout/item_search_game_hot.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+    style="@style/style_button_stroke2"
+    android:paddingTop="@dimen/content_padding_8"
+    android:paddingBottom="@dimen/content_padding_8"
+    android:text="@string/app_name"/>

+ 6 - 5
app/src/main/res/layout/x_real_name_auther_layout.xml

@@ -64,8 +64,9 @@
                 android:background="@null"
                 android:drawablePadding="10dp"
                 android:gravity="end"
+                android:maxLength="20"
                 android:hint="请填写姓名"
-                android:lines="1"
+                android:singleLine="true"
                 android:textColor="@color/txt_black_9e9c9c"
                 android:textSize="@dimen/text_size_2" />
 
@@ -107,7 +108,7 @@
                 android:background="@null"
                 android:drawablePadding="10dp"
                 android:gravity="end"
-                android:lines="1"
+                android:singleLine="true"
                 android:hint="请填写银行卡"
                 android:inputType="number"
                 android:maxLength="19"
@@ -144,10 +145,10 @@
                 android:background="@null"
                 android:drawablePadding="10dp"
                 android:gravity="end"
-                android:lines="1"
+                android:singleLine="true"
                 android:hint="请填写银行卡预留手机号"
                 android:inputType="number"
-                android:maxLength="19"
+                android:maxLength="11"
                 android:textColor="@color/txt_black_9e9c9c"
                 android:textSize="@dimen/text_size_2" />
         </LinearLayout>
@@ -184,7 +185,7 @@
                 android:background="@null"
                 android:drawablePadding="10dp"
                 android:gravity="end"
-                android:lines="1"
+                android:singleLine="true"
                 android:hint="请填写身份证号"
                 android:maxLength="18"
                 android:textColor="@color/txt_black_9e9c9c"

+ 10 - 0
app/src/main/res/values/dd_styles.xml

@@ -94,6 +94,16 @@
         <item name="android:layout_margin">@dimen/dp_10</item>
         <item name="android:textSize">@dimen/text_size_13</item>
     </style>
+    <style name="style_button_stroke2">
+        <item name="android:layout_width">match_parent</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:gravity">center</item>
+        <item name="android:singleLine">true</item>
+        <item name="android:textAlignment">center</item>
+        <item name="android:textColor">@color/selector_color_main_tab</item>
+        <item name="android:background">@drawable/style_button_stroke2</item>
+        <item name="android:textSize">@dimen/text_size_13</item>
+    </style>
 
     <style name="style_button_margin15" parent="button">
         <item name="android:layout_width">match_parent</item>