mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-27 17:08:34 +03:00
tint dialog menu items based onSurface
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
cb44a707a9
commit
1d776ed6bd
3 changed files with 16 additions and 7 deletions
|
@ -39,7 +39,6 @@ import android.view.ViewGroup;
|
|||
import com.facebook.drawee.backends.pipeline.Fresco;
|
||||
import com.facebook.drawee.interfaces.DraweeController;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.nextcloud.talk.R;
|
||||
import com.nextcloud.talk.activities.MainActivity;
|
||||
import com.nextcloud.talk.adapters.items.AdvancedUserItem;
|
||||
import com.nextcloud.talk.api.NcApi;
|
||||
|
@ -118,8 +117,11 @@ public class ChooseAccountDialogFragment extends DialogFragment {
|
|||
viewThemeUtils.themeDialogDivider(binding.divider);
|
||||
|
||||
viewThemeUtils.colorMaterialTextButton(binding.setStatus);
|
||||
viewThemeUtils.colorDialogMenuText(binding.setStatus);
|
||||
viewThemeUtils.colorMaterialTextButton(binding.addAccount);
|
||||
viewThemeUtils.colorDialogMenuText(binding.addAccount);
|
||||
viewThemeUtils.colorMaterialTextButton(binding.manageSettings);
|
||||
viewThemeUtils.colorDialogMenuText(binding.manageSettings);
|
||||
|
||||
// Defining user picture
|
||||
binding.currentAccount.userIcon.setTag("");
|
||||
|
|
|
@ -703,6 +703,13 @@ class ViewThemeUtils @Inject constructor(private val theme: ServerTheme, private
|
|||
}
|
||||
}
|
||||
|
||||
fun colorDialogMenuText(button: MaterialButton) {
|
||||
withScheme(button) { scheme ->
|
||||
button.setTextColor(scheme.onSurface)
|
||||
button.iconTint = ColorStateList.valueOf(scheme.onSurface)
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val THEMEABLE_PLACEHOLDER_IDS = listOf(
|
||||
R.drawable.ic_mimetype_package_x_generic,
|
||||
|
|
|
@ -56,12 +56,12 @@
|
|||
android:text="@string/set_status"
|
||||
android:textAlignment="textStart"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/fontAppbar"
|
||||
android:textColor="@color/high_emphasis_text"
|
||||
android:enabled="false"
|
||||
app:icon="@drawable/ic_edit"
|
||||
app:iconGravity="start"
|
||||
app:iconPadding="22dp"
|
||||
app:iconTint="@color/fontAppbar" />
|
||||
app:iconTint="@color/high_emphasis_text" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
|
@ -99,11 +99,11 @@
|
|||
android:text="@string/nc_account_chooser_add_account"
|
||||
android:textAlignment="textStart"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/fontAppbar"
|
||||
android:textColor="@color/high_emphasis_text"
|
||||
app:icon="@drawable/ic_account_plus"
|
||||
app:iconGravity="start"
|
||||
app:iconPadding="22dp"
|
||||
app:iconTint="@color/fontAppbar"
|
||||
app:iconTint="@color/high_emphasis_text"
|
||||
app:layout_constraintBottom_toTopOf="@+id/manage_settings"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
@ -121,11 +121,11 @@
|
|||
android:text="@string/nc_settings"
|
||||
android:textAlignment="textStart"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/fontAppbar"
|
||||
android:textColor="@color/high_emphasis_text"
|
||||
app:icon="@drawable/ic_settings"
|
||||
app:iconGravity="start"
|
||||
app:iconPadding="22dp"
|
||||
app:iconTint="@color/fontAppbar"
|
||||
app:iconTint="@color/high_emphasis_text"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
|
Loading…
Reference in a new issue