mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-04-11 00:31:12 +02:00
refreshing Group Activity ui
This commit is contained in:
parent
3e542bbf7d
commit
66d734fba5
@ -5,6 +5,7 @@ import android.content.Intent
|
|||||||
import android.media.RingtoneManager
|
import android.media.RingtoneManager
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.helpers.NavigationIcon
|
import com.simplemobiletools.commons.helpers.NavigationIcon
|
||||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||||
@ -32,11 +33,15 @@ class GroupContactsActivity : SimpleActivity(), RemoveFromGroupListener, Refresh
|
|||||||
protected var contact: Contact? = null
|
protected var contact: Contact? = null
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
isMaterialActivity = true
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_group_contacts)
|
setContentView(R.layout.activity_group_contacts)
|
||||||
updateTextColors(group_contacts_coordinator)
|
updateTextColors(group_contacts_coordinator)
|
||||||
setupOptionsMenu()
|
setupOptionsMenu()
|
||||||
|
|
||||||
|
updateMaterialActivityViews(group_contacts_coordinator, group_contacts_list, true)
|
||||||
|
setupMaterialScrollListener(group_contacts_list, group_contacts_toolbar)
|
||||||
|
|
||||||
group = intent.extras?.getSerializable(GROUP) as Group
|
group = intent.extras?.getSerializable(GROUP) as Group
|
||||||
group_contacts_toolbar.title = group.title
|
group_contacts_toolbar.title = group.title
|
||||||
|
|
||||||
@ -60,6 +65,8 @@ class GroupContactsActivity : SimpleActivity(), RemoveFromGroupListener, Refresh
|
|||||||
super.onResume()
|
super.onResume()
|
||||||
refreshContacts()
|
refreshContacts()
|
||||||
setupToolbar(group_contacts_toolbar, NavigationIcon.Arrow)
|
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() {
|
private fun setupOptionsMenu() {
|
||||||
@ -190,5 +197,4 @@ class GroupContactsActivity : SimpleActivity(), RemoveFromGroupListener, Refresh
|
|||||||
ContactsHelper(this).updateRingtone(it.contactId.toString(), uri.toString())
|
ContactsHelper(this).updateRingtone(it.contactId.toString(), uri.toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,27 +5,21 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
android:id="@+id/settings_app_bar_layout"
|
android:id="@+id/group_contacts_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
android:background="@color/color_primary"
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
app:menu="@menu/menu_group"
|
||||||
android:id="@+id/group_contacts_toolbar"
|
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
|
||||||
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>
|
|
||||||
|
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
android:id="@+id/group_contacts_holder"
|
android:id="@+id/group_contacts_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="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
|
<RelativeLayout
|
||||||
android:id="@+id/group_contacts_wrapper"
|
android:id="@+id/group_contacts_wrapper"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user