updating vCard viewers UI

This commit is contained in:
tibbi 2023-01-01 22:55:34 +01:00
parent e52cb19059
commit d42fa509b4
3 changed files with 18 additions and 21 deletions

View File

@ -21,9 +21,13 @@ import kotlinx.android.synthetic.main.activity_vcard_viewer.*
class VCardViewerActivity : SimpleActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
isMaterialActivity = true
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_vcard_viewer)
updateMaterialActivityViews(vcard_viewer_coordinator, contacts_list, true)
setupMaterialScrollListener(contacts_list, vcard_toolbar)
val vCardUri = intent.getParcelableExtra(EXTRA_VCARD_URI) as? Uri
if (vCardUri != null) {
setupOptionsMenu(vCardUri)

View File

@ -42,6 +42,7 @@
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:drawableEnd="@drawable/ic_edit_vector"
android:drawablePadding="@dimen/normal_margin"
android:ellipsize="end"
android:focusable="true"
android:maxLines="1"

View File

@ -1,35 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/vcard_viewer_coordinator"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/main_app_bar_layout"
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/vcard_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/vcard_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/color_primary"
app:menu="@menu/menu_vcard"
app:title="@string/contact_details"
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
</com.google.android.material.appbar.AppBarLayout>
android:layout_height="?attr/actionBarSize"
android:background="@color/color_primary"
app:menu="@menu/menu_vcard"
app:title="@string/contact_details"
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
<com.simplemobiletools.commons.views.MyRecyclerView
android:id="@+id/contacts_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize"
android:clipToPadding="false"
android:overScrollMode="ifContentScrolls"
android:scrollbars="none"
app:layoutManager="com.simplemobiletools.commons.views.MyLinearLayoutManager" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.coordinatorlayout.widget.CoordinatorLayout>