Bring toolbar appearance more in line with design
This commit is contained in:
parent
02ddad22e7
commit
a24b4363d7
|
@ -541,7 +541,6 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
||||||
private void updateToolbar(){
|
private void updateToolbar(){
|
||||||
getToolbar().setOnClickListener(v->scrollToTop());
|
getToolbar().setOnClickListener(v->scrollToTop());
|
||||||
getToolbar().setNavigationContentDescription(R.string.back);
|
getToolbar().setNavigationContentDescription(R.string.back);
|
||||||
UiUtils.setToolbarWithSubtitleAppearance(getToolbar());
|
|
||||||
if(onScrollListener!=null){
|
if(onScrollListener!=null){
|
||||||
onScrollListener.setViews(getToolbar());
|
onScrollListener.setViews(getToolbar());
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,12 +76,6 @@ public class SettingsMainFragment extends BaseSettingsFragment<Void>{
|
||||||
@Override
|
@Override
|
||||||
protected void doLoadData(int offset, int count){}
|
protected void doLoadData(int offset, int count){}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onUpdateToolbar(){
|
|
||||||
super.onUpdateToolbar();
|
|
||||||
UiUtils.setToolbarWithSubtitleAppearance(getToolbar());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onHidden(){
|
protected void onHidden(){
|
||||||
super.onHidden();
|
super.onHidden();
|
||||||
|
|
|
@ -754,11 +754,6 @@ public class UiUtils{
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setToolbarWithSubtitleAppearance(Toolbar toolbar){
|
|
||||||
toolbar.setTitleTextAppearance(toolbar.getContext(), R.style.m3_title_medium);
|
|
||||||
toolbar.setSubtitleTextAppearance(toolbar.getContext(), R.style.m3_title_small);
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("DefaultLocale")
|
@SuppressLint("DefaultLocale")
|
||||||
public static String formatMediaDuration(int seconds){
|
public static String formatMediaDuration(int seconds){
|
||||||
if(seconds>=3600)
|
if(seconds>=3600)
|
||||||
|
|
|
@ -189,6 +189,17 @@
|
||||||
<item name="appkitToolbarElevation">0px</item>
|
<item name="appkitToolbarElevation">0px</item>
|
||||||
<item name="appkitToolbarBackground">?colorM3Background</item>
|
<item name="appkitToolbarBackground">?colorM3Background</item>
|
||||||
<item name="actionBarIconTint">@color/action_bar_icons</item>
|
<item name="actionBarIconTint">@color/action_bar_icons</item>
|
||||||
|
<item name="android:titleTextAppearance">@style/action_bar_title</item>
|
||||||
|
<item name="android:subtitleTextAppearance">@style/action_bar_subtitle</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="action_bar_title" parent="android:TextAppearance.Material.Widget.ActionBar.Title">
|
||||||
|
<item name="android:fontFamily">sans-serif</item>
|
||||||
|
<item name="android:textColor">?colorM3OnSurface</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="action_bar_subtitle" parent="m3_title_small">
|
||||||
|
<item name="android:textColor">?colorM3OnSurfaceVariant</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Widget.Mastodon.Toolbar.ActionMode" parent="android:Widget.Material.ActionMode">
|
<style name="Widget.Mastodon.Toolbar.ActionMode" parent="android:Widget.Material.ActionMode">
|
||||||
|
|
Loading…
Reference in New Issue