feat: update profile note edit design

This commit is contained in:
LucasGGamerM 2023-08-26 17:48:53 -03:00
parent d7e48c2917
commit 9732c48fde
3 changed files with 30 additions and 9 deletions

View File

@ -270,7 +270,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
noteEdit = content.findViewById(R.id.note_edit);
noteWrap = content.findViewById(R.id.note_edit_wrap);
Button noteEditConfirm = content.findViewById(R.id.note_edit_confirm);
ImageButton noteEditConfirm = content.findViewById(R.id.note_edit_confirm);
noteEditConfirm.setOnClickListener((v -> {
if (!noteEdit.getText().toString().trim().equals(note)) {

View File

@ -1,5 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="?colorM3SurfaceVariant"/>
<corners android:radius="10dp"/>
</shape>
<ripple android:color="@color/m3_primary_overlay" xmlns:android="http://schemas.android.com/apk/res/android">
<item android:gravity="center_vertical">
<selector>
<item android:state_enabled="true">
<shape>
<stroke android:color="?colorM3Outline" android:width="1dp"/>
<corners android:radius="32dp"/>
</shape>
</item>
<item>
<shape>
<stroke android:color="@color/m3_on_surface_overlay" android:width="1dp"/>
<corners android:radius="32dp"/>
</shape>
</item>
</selector>
</item>
<item android:id="@android:id/mask" android:gravity="center_vertical">
<shape>
<solid android:color="#000"/>
<corners android:radius="32dp"/>
</shape>
</item>
</ripple>

View File

@ -206,18 +206,19 @@
android:visibility="gone"
android:hint="@string/mo_personal_note"/>
<Button
<ImageButton
android:id="@+id/note_edit_confirm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:paddingBottom="8dp"
android:paddingHorizontal="6dp"
android:layout_marginBottom="8dp"
android:visibility="invisible"
android:backgroundTint="?colorM3SurfaceVariant"
android:layout_gravity="right|bottom"
android:background="@drawable/bg_button_m3_tonal_circle"
android:tooltipText="@string/mo_personal_note_confirm"
android:contentDescription="@string/mo_personal_note_confirm"
android:drawableStart="@drawable/ic_fluent_checkmark_24_regular"
android:src="@drawable/ic_fluent_checkmark_24_regular"
/>
</FrameLayout>