mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-12-17 22:21:57 +03:00
theme account chooser dialog
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
a6ba545aef
commit
53168d1953
3 changed files with 26 additions and 2 deletions
|
@ -114,6 +114,10 @@ public class ChooseAccountDialogFragment extends DialogFragment {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
NextcloudTalkApplication.Companion.getSharedApplication().getComponentApplication().inject(this);
|
NextcloudTalkApplication.Companion.getSharedApplication().getComponentApplication().inject(this);
|
||||||
|
|
||||||
|
viewThemeUtils.themeDialog(binding.getRoot());
|
||||||
|
viewThemeUtils.themeDialogDivider(binding.dividerTop);
|
||||||
|
viewThemeUtils.themeDialogDivider(binding.dividerBottom);
|
||||||
|
|
||||||
// Defining user picture
|
// Defining user picture
|
||||||
binding.currentAccount.userIcon.setTag("");
|
binding.currentAccount.userIcon.setTag("");
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,7 @@ import com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
import com.google.android.material.progressindicator.LinearProgressIndicator
|
import com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
import com.google.android.material.tabs.TabLayout
|
import com.google.android.material.tabs.TabLayout
|
||||||
import com.google.android.material.textfield.TextInputLayout
|
import com.google.android.material.textfield.TextInputLayout
|
||||||
|
import com.google.android.material.textview.MaterialTextView
|
||||||
import com.nextcloud.talk.R
|
import com.nextcloud.talk.R
|
||||||
import com.nextcloud.talk.utils.DisplayUtils
|
import com.nextcloud.talk.utils.DisplayUtils
|
||||||
import com.nextcloud.talk.utils.DrawableUtils
|
import com.nextcloud.talk.utils.DrawableUtils
|
||||||
|
@ -111,6 +112,12 @@ class ViewThemeUtils @Inject constructor(private val theme: ServerTheme, private
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun themeSearchBarText(searchText: MaterialTextView) {
|
||||||
|
withScheme(searchText) { scheme ->
|
||||||
|
searchText.setHintTextColor(scheme.onSurfaceVariant)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun themeStatusBar(activity: Activity, view: View) {
|
fun themeStatusBar(activity: Activity, view: View) {
|
||||||
withScheme(view) { scheme ->
|
withScheme(view) { scheme ->
|
||||||
DisplayUtils.applyColorToStatusBar(activity, scheme.surface)
|
DisplayUtils.applyColorToStatusBar(activity, scheme.surface)
|
||||||
|
@ -128,6 +135,18 @@ class ViewThemeUtils @Inject constructor(private val theme: ServerTheme, private
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun themeDialog(view: View) {
|
||||||
|
withScheme(view) { scheme ->
|
||||||
|
view.setBackgroundColor(scheme.surface)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun themeDialogDivider(view: View) {
|
||||||
|
withScheme(view) { scheme ->
|
||||||
|
view.setBackgroundColor(scheme.surfaceVariant)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun themeFAB(fab: FloatingActionButton) {
|
fun themeFAB(fab: FloatingActionButton) {
|
||||||
withScheme(fab) { scheme ->
|
withScheme(fab) { scheme ->
|
||||||
fab.backgroundTintList = ColorStateList.valueOf(scheme.primaryContainer)
|
fab.backgroundTintList = ColorStateList.valueOf(scheme.primaryContainer)
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
tools:visibility="visible">
|
tools:visibility="visible">
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
android:id="@+id/dividerTop"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
|
@ -71,7 +72,7 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/separator_line"
|
android:id="@+id/dividerBottom"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
|
@ -90,7 +91,7 @@
|
||||||
app:layout_constraintBottom_toTopOf="@+id/add_account"
|
app:layout_constraintBottom_toTopOf="@+id/add_account"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/separator_line"
|
app:layout_constraintTop_toBottomOf="@+id/dividerBottom"
|
||||||
tools:listitem="@layout/account_item" />
|
tools:listitem="@layout/account_item" />
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
|
|
Loading…
Reference in a new issue