Commit ec82fb22 authored by fallenstardust's avatar fallenstardust

优化搜索关键词被输入法界面遮挡

parent 7ebe0de5
...@@ -183,10 +183,6 @@ public class HomeFragment extends BaseFragemnt implements OnDuelAssistantListene ...@@ -183,10 +183,6 @@ public class HomeFragment extends BaseFragemnt implements OnDuelAssistantListene
return true; return true;
} }
});*/ });*/
// cv_reset_res = view.findViewById(R.id.action_reset_game_res);
// cv_reset_res.setOnClickListener(this);
// cv_join_QQ = view.findViewById(R.id.action_join_qq_group);
// cv_join_QQ.setOnClickListener(this);
cv_donation = view.findViewById(R.id.nav_webpage); cv_donation = view.findViewById(R.id.nav_webpage);
cv_donation.setOnClickListener(this); cv_donation.setOnClickListener(this);
cv_help = view.findViewById(R.id.action_help); cv_help = view.findViewById(R.id.action_help);
...@@ -204,7 +200,7 @@ public class HomeFragment extends BaseFragemnt implements OnDuelAssistantListene ...@@ -204,7 +200,7 @@ public class HomeFragment extends BaseFragemnt implements OnDuelAssistantListene
//轮播图 //轮播图
public void initBanner(View view, Bundle saveBundle) { public void initBanner(View view, Bundle saveBundle) {
xb_banner = view.findViewById(R.id.xb_banner); xb_banner = view.findViewById(R.id.xb_banner);
cv_banner = (CardView) view.findViewById(R.id.cv_banner); cv_banner = view.findViewById(R.id.cv_banner);
cv_banner.post(() -> { cv_banner.post(() -> {
ViewGroup.LayoutParams layoutParams = cv_banner.getLayoutParams(); ViewGroup.LayoutParams layoutParams = cv_banner.getLayoutParams();
layoutParams.width = cv_banner.getWidth(); layoutParams.width = cv_banner.getWidth();
......
...@@ -10,150 +10,44 @@ ...@@ -10,150 +10,44 @@
android:theme="@style/AppTheme.PopupOverlay.Dark" android:theme="@style/AppTheme.PopupOverlay.Dark"
tools:showIn="@layout/fragment_search"> tools:showIn="@layout/fragment_search">
<LinearLayout <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:layout_marginTop="6dp"
android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_marginTop="6dp"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_ot"
style="@style/itemSpinnerStyle"
android:layout_width="0dp"
android:layout_height="@dimen/label_width_small"
android:layout_weight="1"
android:textSize="12sp" />
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_my_fav"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/transparent"
android:text="@string/my_favorites"
android:textColor="@color/selector_text_color_white_gold"
android:visibility="visible" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/label_width_small"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_limit_list"
style="@style/itemSpinnerStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_limit"
style="@style/itemSpinnerStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:visibility="invisible" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/label_width_small"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_category"
style="@style/itemSpinnerStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_scale"
style="@style/itemSpinnerStyle"
android:layout_width="0dp"
android:layout_height="@dimen/label_width_small"
android:layout_weight="1"
android:visibility="invisible" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/label_width_small"
android:orientation="horizontal">
<cn.garymb.ygomobile.ui.widget.SearchableSpinner
android:id="@+id/sp_setcode"
style="@style/itemSpinnerStyle"
android:layout_width="0dp"
android:layout_height="@dimen/label_width_small"
android:layout_weight="1"
app:searchTitle="@string/label_set" />
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_linkmarker"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/transparent"
android:text="@string/linkmarker"
android:visibility="visible" />
</LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:orientation="vertical">
<androidx.appcompat.widget.AppCompatSpinner <LinearLayout
android:id="@+id/sp_type_card" android:layout_width="match_parent"
style="@style/itemSpinnerStyle" android:layout_height="wrap_content">
android:layout_width="0dp"
android:layout_height="@dimen/label_width_small"
android:layout_weight="1" />
<androidx.appcompat.widget.AppCompatSpinner <androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_race" android:id="@+id/sp_ot"
android:layout_width="0dp" style="@style/itemSpinnerStyle"
android:layout_height="@dimen/label_width_small" android:layout_width="0dp"
android:layout_weight="1" android:layout_height="@dimen/label_width_small"
android:visibility="gone" /> android:layout_weight="1"
android:textSize="12sp" />
<androidx.appcompat.widget.AppCompatSpinner <androidx.appcompat.widget.AppCompatButton
android:id="@+id/sp_type_spell" android:id="@+id/btn_my_fav"
style="@style/itemSpinnerStyle" android:layout_width="0dp"
android:layout_width="0dp" android:layout_height="match_parent"
android:layout_height="@dimen/label_width_small" android:layout_weight="1"
android:layout_weight="1" android:background="@color/transparent"
android:visibility="gone" /> android:text="@string/my_favorites"
<androidx.appcompat.widget.AppCompatSpinner android:textColor="@color/selector_text_color_white_gold"
android:id="@+id/sp_type_trap" android:visibility="visible" />
style="@style/itemSpinnerStyle"
android:layout_width="0dp"
android:layout_height="@dimen/label_width_small"
android:layout_weight="1"
android:visibility="gone" />
</LinearLayout>
<LinearLayout </LinearLayout>
android:id="@+id/layout_monster"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -161,18 +55,19 @@ ...@@ -161,18 +55,19 @@
android:orientation="horizontal"> android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatSpinner <androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_level" android:id="@+id/sp_limit_list"
style="@style/itemSpinnerStyle" style="@style/itemSpinnerStyle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" /> android:layout_weight="1" />
<androidx.appcompat.widget.AppCompatSpinner <androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_attribute" android:id="@+id/sp_limit"
style="@style/itemSpinnerStyle" style="@style/itemSpinnerStyle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" /> android:layout_weight="1"
android:visibility="invisible" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
...@@ -181,110 +76,220 @@ ...@@ -181,110 +76,220 @@
android:orientation="horizontal"> android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatSpinner <androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_type_monster" android:id="@+id/sp_category"
style="@style/itemSpinnerStyle" style="@style/itemSpinnerStyle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" /> android:layout_weight="1" />
<androidx.appcompat.widget.AppCompatSpinner <androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_type_monster2" android:id="@+id/sp_scale"
style="@style/itemSpinnerStyle" style="@style/itemSpinnerStyle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="@dimen/label_width_small"
android:layout_weight="1" /> android:layout_weight="1"
android:visibility="invisible" />
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/label_width_small"
android:orientation="horizontal">
<cn.garymb.ygomobile.ui.widget.SearchableSpinner
android:id="@+id/sp_setcode"
style="@style/itemSpinnerStyle"
android:layout_width="0dp"
android:layout_height="@dimen/label_width_small"
android:layout_weight="1"
app:searchTitle="@string/label_set" />
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_linkmarker"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/transparent"
android:text="@string/linkmarker"
android:visibility="visible" />
</LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:orientation="horizontal"> android:orientation="horizontal">
<com.google.android.material.textfield.TextInputLayout <androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_type_card"
style="@style/itemSpinnerStyle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="@dimen/label_width_small"
android:layout_weight="1"> android:layout_weight="1" />
<androidx.appcompat.widget.AppCompatEditText <androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/edt_atk" android:id="@+id/sp_race"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="@dimen/label_width_small"
android:hint="@string/hit_atk" android:layout_weight="1"
android:maxLines="1" android:visibility="gone" />
android:singleLine="true"
tools:text="100" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout <androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_type_spell"
style="@style/itemSpinnerStyle"
android:layout_width="0dp"
android:layout_height="@dimen/label_width_small"
android:layout_weight="1"
android:visibility="gone" />
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_type_trap"
style="@style/itemSpinnerStyle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="@dimen/label_width_small"
android:layout_weight="1"
android:visibility="gone" />
</LinearLayout>
<LinearLayout
android:id="@+id/layout_monster"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/label_width_small"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_level"
style="@style/itemSpinnerStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_attribute"
style="@style/itemSpinnerStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/label_width_small"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_type_monster"
style="@style/itemSpinnerStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_type_monster2"
style="@style/itemSpinnerStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"> android:layout_marginLeft="10dp"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatEditText <com.google.android.material.textfield.TextInputLayout
android:id="@+id/edt_def" android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/hit_def" android:layout_weight="1">
android:maxLines="1"
android:singleLine="true" <androidx.appcompat.widget.AppCompatEditText
tools:text="100" /> android:id="@+id/edt_atk"
</com.google.android.material.textfield.TextInputLayout> android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hit_atk"
android:maxLines="1"
android:singleLine="true"
tools:text="100" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/edt_def"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hit_def"
android:maxLines="1"
android:singleLine="true"
tools:text="100" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<com.google.android.material.textfield.TextInputLayout
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginTop="10dp"
android:layout_weight="1"> android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatEditText <com.google.android.material.textfield.TextInputLayout
android:id="@+id/edt_word1" android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_marginLeft="10dp"
android:hint="@string/hit_keyword1" android:layout_weight="1">
android:imeOptions="actionSearch"
android:inputType="textNoSuggestions"
android:maxLines="1"
android:singleLine="true"
android:textColorHint="@color/gold" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout> <androidx.appcompat.widget.AppCompatEditText
android:id="@+id/edt_word1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:hint="@string/hit_keyword1"
android:imeOptions="actionSearch"
android:inputType="textNoSuggestions"
android:maxLines="1"
android:singleLine="true"
android:textColorHint="@color/gold" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout </LinearLayout>
android:layout_width="match_parent"
android:layout_height="wrap_content" <LinearLayout
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_reset"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_gravity="center_vertical"
android:background="@drawable/button_bg"
android:text="@string/reset" />
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_search"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="40dp" android:layout_height="wrap_content"
android:layout_marginLeft="20dp" android:orientation="horizontal">
android:layout_marginRight="10dp"
android:layout_gravity="center_vertical" <androidx.appcompat.widget.AppCompatButton
android:background="@drawable/button_bg" android:id="@+id/btn_reset"
android:text="@string/search" /> android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="@drawable/button_bg"
android:text="@string/reset" />
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_search"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="20dp"
android:layout_marginRight="10dp"
android:background="@drawable/button_bg"
android:text="@string/search" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </ScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
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