fix [爱好会遮挡]

This commit is contained in:
zlzw 2024-04-02 16:10:04 +08:00
parent 4c760e60b1
commit d44df09e5c
3 changed files with 49 additions and 29 deletions

View File

@ -44,6 +44,7 @@ public class EditUserHobbyActivity extends AbsActivity {
mCancel = findViewById(R.id.btn_cancel); mCancel = findViewById(R.id.btn_cancel);
adapter = new EditUserHobbyAdapter(); adapter = new EditUserHobbyAdapter();
recyclerView.setAdapter(adapter); recyclerView.setAdapter(adapter);
recyclerView.setNestedScrollingEnabled(false);
adapter.setOnItemClickListener(new OnItemClickListener<List<String>>() { adapter.setOnItemClickListener(new OnItemClickListener<List<String>>() {
@Override @Override
public void onItemClick(List<String> bean, int position) { public void onItemClick(List<String> bean, int position) {

View File

@ -34,45 +34,63 @@
app:layout_constraintStart_toStartOf="@+id/titleView" app:layout_constraintStart_toStartOf="@+id/titleView"
app:layout_constraintTop_toBottomOf="@+id/titleView" /> app:layout_constraintTop_toBottomOf="@+id/titleView" />
<androidx.recyclerview.widget.RecyclerView <ScrollView
android:id="@+id/recyclerView"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/number" app:layout_constraintTop_toBottomOf="@+id/number">
app:spanCount="4"
tools:listitem="@layout/item_edit_user_hobby" /> <LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="4"
tools:listitem="@layout/item_edit_user_hobby" />
<LinearLayout
android:orientation="horizontal"
android:layout_marginBottom="112dp"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:id="@+id/btn_cancel"
android:layout_width="122dp"
android:layout_height="54dp"
android:textAllCaps="false"
android:background="@drawable/dialog_bg_chat_status_config"
android:text="@string/edit_profile_hobby_cancel"
/>
<Button
android:id="@+id/btn_save"
android:layout_width="186dp"
android:layout_height="54dp"
android:textColor="#FFFFFF"
android:layout_marginStart="21dp"
android:background="@drawable/bg_msg_address_book_user_btn_fan"
android:textAllCaps="false"
android:text="@string/back_community_sure" />
</LinearLayout>
</LinearLayout>
</ScrollView>
<Button
android:id="@+id/btn_save"
android:layout_width="186dp"
android:layout_height="54dp"
android:textColor="#FFFFFF"
android:layout_marginEnd="21dp"
android:layout_marginBottom="112dp"
android:background="@drawable/bg_msg_address_book_user_btn_fan"
android:textAllCaps="false"
android:text="@string/back_community_sure"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<Button
android:id="@+id/btn_cancel"
android:layout_width="122dp"
android:layout_height="54dp"
android:textAllCaps="false"
android:layout_marginStart="21dp"
android:layout_marginBottom="112dp"
android:background="@drawable/dialog_bg_chat_status_config"
android:text="@string/edit_profile_hobby_cancel"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/btn_save"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -11,5 +11,6 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:background="@drawable/dialog_bg_chat_status_config" android:background="@drawable/dialog_bg_chat_status_config"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAllCaps="false"
android:text="Button" /> android:text="Button" />
</LinearLayout> </LinearLayout>