Commit ec82fb22 authored by fallenstardust's avatar fallenstardust

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

parent 7ebe0de5
......@@ -183,10 +183,6 @@ public class HomeFragment extends BaseFragemnt implements OnDuelAssistantListene
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.setOnClickListener(this);
cv_help = view.findViewById(R.id.action_help);
......@@ -204,7 +200,7 @@ public class HomeFragment extends BaseFragemnt implements OnDuelAssistantListene
//轮播图
public void initBanner(View view, Bundle saveBundle) {
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(() -> {
ViewGroup.LayoutParams layoutParams = cv_banner.getLayoutParams();
layoutParams.width = cv_banner.getWidth();
......
......@@ -10,150 +10,44 @@
android:theme="@style/AppTheme.PopupOverlay.Dark"
tools:showIn="@layout/fragment_search">
<LinearLayout
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="6dp"
android:orientation="vertical">
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="6dp"
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
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_type_card"
style="@style/itemSpinnerStyle"
android:layout_width="0dp"
android:layout_height="@dimen/label_width_small"
android:layout_weight="1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_race"
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_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.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_height="@dimen/label_width_small"
android:layout_weight="1"
android:visibility="gone" />
</LinearLayout>
<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
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"
......@@ -161,18 +55,19 @@
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_level"
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_attribute"
android:id="@+id/sp_limit"
style="@style/itemSpinnerStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
android:layout_weight="1"
android:visibility="invisible" />
</LinearLayout>
<LinearLayout
......@@ -181,110 +76,220 @@
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_type_monster"
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_type_monster2"
android:id="@+id/sp_scale"
style="@style/itemSpinnerStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
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
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
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_height="wrap_content"
android:layout_weight="1">
android:layout_height="@dimen/label_width_small"
android:layout_weight="1" />
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/edt_atk"
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>
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_race"
android:layout_width="0dp"
android:layout_height="@dimen/label_width_small"
android:layout_weight="1"
android:visibility="gone" />
<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_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_weight="1">
android:layout_marginLeft="10dp"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/edt_def"
android:layout_width="match_parent"
<com.google.android.material.textfield.TextInputLayout
android:layout_width="0dp"
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>
android:layout_weight="1">
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/edt_atk"
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
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"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="1">
android:layout_marginTop="10dp"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/edt_word1"
android:layout_width="match_parent"
<com.google.android.material.textfield.TextInputLayout
android:layout_width="0dp"
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>
android:layout_marginLeft="10dp"
android:layout_weight="1">
</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
android:layout_width="match_parent"
android:layout_height="wrap_content"
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"
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="10dp"
android:layout_gravity="center_vertical"
android:background="@drawable/button_bg"
android:text="@string/search" />
android:layout_height="wrap_content"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_reset"
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>
</ScrollView>
</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