refreshing Group Activity ui

This commit is contained in:
tibbi 2022-12-31 16:41:20 +01:00
parent 3e542bbf7d
commit 66d734fba5
2 changed files with 16 additions and 16 deletions

View file

@ -5,6 +5,7 @@ import android.content.Intent
import android.media.RingtoneManager
import android.net.Uri
import android.os.Bundle
import androidx.coordinatorlayout.widget.CoordinatorLayout
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.NavigationIcon
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
@ -32,11 +33,15 @@ class GroupContactsActivity : SimpleActivity(), RemoveFromGroupListener, Refresh
protected var contact: Contact? = null
override fun onCreate(savedInstanceState: Bundle?) {
isMaterialActivity = true
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_group_contacts)
updateTextColors(group_contacts_coordinator)
setupOptionsMenu()
updateMaterialActivityViews(group_contacts_coordinator, group_contacts_list, true)
setupMaterialScrollListener(group_contacts_list, group_contacts_toolbar)
group = intent.extras?.getSerializable(GROUP) as Group
group_contacts_toolbar.title = group.title
@ -60,6 +65,8 @@ class GroupContactsActivity : SimpleActivity(), RemoveFromGroupListener, Refresh
super.onResume()
refreshContacts()
setupToolbar(group_contacts_toolbar, NavigationIcon.Arrow)
(group_contacts_fab.layoutParams as CoordinatorLayout.LayoutParams).bottomMargin =
navigationBarHeight + resources.getDimension(R.dimen.activity_margin).toInt()
}
private fun setupOptionsMenu() {
@ -190,5 +197,4 @@ class GroupContactsActivity : SimpleActivity(), RemoveFromGroupListener, Refresh
ContactsHelper(this).updateRingtone(it.contactId.toString(), uri.toString())
}
}
}

View file

@ -5,27 +5,21 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/settings_app_bar_layout"
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/group_contacts_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/group_contacts_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/color_primary"
app:menu="@menu/menu_group"
app:title=""
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_group"
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/group_contacts_holder"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
android:layout_marginTop="?attr/actionBarSize"
android:fillViewport="true"
android:scrollbars="none">
<RelativeLayout
android:id="@+id/group_contacts_wrapper"