Minor UI tweaks

This commit is contained in:
Grishka 2024-11-18 22:59:38 +03:00
parent 878067368a
commit ea31da7f61
3 changed files with 14 additions and 9 deletions

View File

@ -13,8 +13,8 @@ android {
applicationId "org.joinmastodon.android" applicationId "org.joinmastodon.android"
minSdk 23 minSdk 23
targetSdk 34 targetSdk 34
versionCode 129 versionCode 130
versionName "2.9.1" versionName "2.9.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }

View File

@ -292,13 +292,17 @@ public class ProfileFragment extends LoaderFragment implements ScrollableToTop,
tabbar.setTabTextColors(UiUtils.getThemeColor(getActivity(), R.attr.colorM3OnSurfaceVariant), UiUtils.getThemeColor(getActivity(), R.attr.colorM3Primary)); tabbar.setTabTextColors(UiUtils.getThemeColor(getActivity(), R.attr.colorM3OnSurfaceVariant), UiUtils.getThemeColor(getActivity(), R.attr.colorM3Primary));
tabbar.setTabTextSize(V.dp(14)); tabbar.setTabTextSize(V.dp(14));
tabLayoutMediator=new TabLayoutMediator(tabbar, pager, (tab, position)->tab.setText(switch(position){ tabLayoutMediator=new TabLayoutMediator(tabbar, pager, (tab, position)->{
tab.setText(switch(position){
case 0 -> R.string.profile_featured; case 0 -> R.string.profile_featured;
case 1 -> R.string.profile_timeline; case 1 -> R.string.profile_timeline;
case 2 -> R.string.profile_about; case 2 -> R.string.profile_about;
case 3 -> R.string.profile_saved_posts; case 3 -> R.string.profile_saved_posts;
default -> throw new IllegalStateException(); default -> throw new IllegalStateException();
})); });
tab.view.textView.setSingleLine();
tab.view.textView.setEllipsize(TextUtils.TruncateAt.END);
});
tabbar.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener(){ tabbar.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener(){
@Override @Override
public void onTabSelected(TabLayout.Tab tab){} public void onTabSelected(TabLayout.Tab tab){}

View File

@ -24,6 +24,7 @@
android:id="@+id/banner_text" android:id="@+id/banner_text"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textAppearance="@style/m3_body_medium" android:textAppearance="@style/m3_body_medium"
android:textColor="?colorM3OnSurface" android:textColor="?colorM3OnSurface"
tools:text="@string/trending_posts_info_banner"/> tools:text="@string/trending_posts_info_banner"/>