Commit 14fe5479 authored by fallenstardust's avatar fallenstardust

添加查询输入框

parent 82fc47cd
...@@ -41,7 +41,7 @@ public class DeckSquareMyDeckFragment extends Fragment { ...@@ -41,7 +41,7 @@ public class DeckSquareMyDeckFragment extends Fragment {
binding = FragmentDeckSquareMyDeckBinding.inflate(inflater, container, false); binding = FragmentDeckSquareMyDeckBinding.inflate(inflater, container, false);
deckListAdapter = new MyDeckListAdapter(R.layout.item_my_deck); deckListAdapter = new MyDeckListAdapter(R.layout.item_my_deck);
GridLayoutManager linearLayoutManager = new GridLayoutManager(getContext(), 2); GridLayoutManager linearLayoutManager = new GridLayoutManager(getContext(), 3);
binding.listMyDeckInfo.setLayoutManager(linearLayoutManager); binding.listMyDeckInfo.setLayoutManager(linearLayoutManager);
binding.listMyDeckInfo.setAdapter(deckListAdapter); binding.listMyDeckInfo.setAdapter(deckListAdapter);
deckListAdapter.loadData(); deckListAdapter.loadData();
......
...@@ -8,8 +8,22 @@ ...@@ -8,8 +8,22 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="0.8"> android:layout_weight="0.8">
<EditText
android:id="@+id/et_deck_square_input_deck_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:hint="@string/intpu_name"
android:imeOptions="actionSearch"
android:inputType="textNoSuggestions"
android:singleLine="true"
android:textSize="15sp"
android:textColor="@color/holo_blue_bright"
android:textColorHint="@color/gray" />
<com.tubb.smrv.SwipeMenuRecyclerView <com.tubb.smrv.SwipeMenuRecyclerView
android:id="@+id/list_deck_info" android:id="@+id/list_deck_info"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -27,11 +41,12 @@ ...@@ -27,11 +41,12 @@
android:orientation="horizontal"> android:orientation="horizontal">
<Button <Button
android:id="@+id/next_page_btn" android:id="@+id/former_page_btn"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:text="下一页"></Button> android:background="@drawable/button_bg"
android:text="◀"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -46,11 +61,12 @@ ...@@ -46,11 +61,12 @@
android:textSize="14sp" /> android:textSize="14sp" />
<Button <Button
android:id="@+id/former_page_btn" android:id="@+id/next_page_btn"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:text="上一页"></Button> android:background="@drawable/button_bg"
android:text="▶"/>
<!-- <Spinner--> <!-- <Spinner-->
<!-- android:id="@+id/spinner_items_per_page"--> <!-- android:id="@+id/spinner_items_per_page"-->
...@@ -72,6 +88,7 @@ ...@@ -72,6 +88,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:text="刷新"></Button> android:background="@drawable/button_bg"
android:text="↑↓"></Button>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
...@@ -9,8 +9,22 @@ ...@@ -9,8 +9,22 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="0.8"> android:layout_weight="0.8">
<EditText
android:id="@+id/et_my_deck_input_deck_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:hint="@string/intpu_name"
android:imeOptions="actionSearch"
android:inputType="textNoSuggestions"
android:singleLine="true"
android:textSize="15sp"
android:textColor="@color/holo_blue_bright"
android:textColorHint="@color/gray" />
<com.tubb.smrv.SwipeMenuRecyclerView <com.tubb.smrv.SwipeMenuRecyclerView
android:id="@+id/list_my_deck_info" android:id="@+id/list_my_deck_info"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -40,8 +54,9 @@ ...@@ -40,8 +54,9 @@
android:id="@+id/refresh_data" android:id="@+id/refresh_data"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right|bottom" android:layout_gravity="center|bottom"
android:text="刷新"></Button> android:background="@drawable/button_bg"
android:text="@string/refresh"/>
</LinearLayout> </LinearLayout>
<!--<com.google.android.material.floatingactionbutton.FloatingActionButton <!--<com.google.android.material.floatingactionbutton.FloatingActionButton
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment