mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 08:39:22 +01:00
Add support for mark as unread.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package org.thoughtcrime.securesms.util.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.util.ThemeUtil;
|
||||
|
||||
/**
|
||||
* It seems to be impossible to tint the overflow icon in an ActionMode independently from the
|
||||
* default toolbar overflow icon. So we default the overflow icon to white, then we can use this
|
||||
* subclass to make it the correct themed color for most use cases.
|
||||
*/
|
||||
public class DarkOverflowToolbar extends Toolbar {
|
||||
public DarkOverflowToolbar(Context context) {
|
||||
super(context);
|
||||
init();
|
||||
}
|
||||
|
||||
public DarkOverflowToolbar(Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init();
|
||||
}
|
||||
|
||||
public DarkOverflowToolbar(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init();
|
||||
}
|
||||
|
||||
private void init() {
|
||||
if (getOverflowIcon() != null) {
|
||||
getOverflowIcon().setColorFilter(ThemeUtil.getThemedColor(getContext(), R.attr.icon_tint), PorterDuff.Mode.SRC_ATOP);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user