convert image buttons to fab

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2022-08-01 19:11:56 +02:00
parent 4b4bd2bb6f
commit 2f71a33c05
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
2 changed files with 29 additions and 26 deletions

View file

@ -262,8 +262,10 @@ class ProfileController : NewBaseController(R.layout.controller_profile) {
}
private fun colorIcons() {
viewThemeUtils.colorImageView(binding.avatarChoose)
viewThemeUtils.colorImageView(binding.avatarCamera)
viewThemeUtils.themeFAB(binding.avatarChoose)
viewThemeUtils.themeFAB(binding.avatarCamera)
viewThemeUtils.themeFAB(binding.avatarUpload)
viewThemeUtils.themeFAB(binding.avatarDelete)
}
private fun isAllEmpty(items: Array<String?>): Boolean {

View file

@ -77,49 +77,50 @@
android:visibility="invisible"
tools:visibility="visible">
<ImageButton
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/avatar_upload"
android:layout_width="@dimen/min_size_clickable_area"
android:layout_height="@dimen/min_size_clickable_area"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/standard_half_margin"
android:layout_marginRight="@dimen/standard_half_margin"
android:background="@drawable/round_corner"
android:contentDescription="@string/upload_new_avatar_from_device"
android:src="@drawable/upload"
app:tint="@color/black" />
android:tint="@android:color/white"
app:fabCustomSize="@dimen/min_size_clickable_area"
app:srcCompat="@drawable/upload" />
<ImageButton
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/avatar_choose"
android:layout_width="@dimen/min_size_clickable_area"
android:layout_height="@dimen/min_size_clickable_area"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/standard_half_margin"
android:layout_marginRight="@dimen/standard_half_margin"
android:background="@drawable/round_corner"
android:contentDescription="@string/choose_avatar_from_cloud"
android:src="@drawable/ic_mimetype_folder"
app:tint="@color/colorPrimary" />
android:tint="@android:color/white"
app:fabCustomSize="@dimen/min_size_clickable_area"
app:srcCompat="@drawable/ic_mimetype_folder" />
<ImageButton
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/avatar_camera"
android:layout_width="@dimen/min_size_clickable_area"
android:layout_height="@dimen/min_size_clickable_area"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/standard_half_margin"
android:layout_marginRight="@dimen/standard_half_margin"
android:background="@drawable/round_corner"
android:contentDescription="@string/set_avatar_from_camera"
android:src="@drawable/ic_baseline_photo_camera_24"
app:tint="@color/colorPrimary" />
android:tint="@android:color/white"
app:fabCustomSize="@dimen/min_size_clickable_area"
app:srcCompat="@drawable/ic_baseline_photo_camera_24" />
<ImageButton
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/avatar_delete"
android:layout_width="@dimen/min_size_clickable_area"
android:layout_height="@dimen/min_size_clickable_area"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/standard_half_margin"
android:layout_marginRight="@dimen/standard_half_margin"
android:background="@drawable/round_corner"
android:contentDescription="@string/delete_avatar"
android:src="@drawable/trashbin"
app:tint="@color/black" />
android:tint="@android:color/white"
app:fabCustomSize="@dimen/min_size_clickable_area"
app:srcCompat="@drawable/trashbin" />
</LinearLayout>
</RelativeLayout>