Profile redesign: header
This commit is contained in:
@@ -70,7 +70,7 @@ dependencies {
|
|||||||
implementation 'me.grishka.litex:viewpager:1.0.0'
|
implementation 'me.grishka.litex:viewpager:1.0.0'
|
||||||
implementation 'me.grishka.litex:viewpager2:1.0.0'
|
implementation 'me.grishka.litex:viewpager2:1.0.0'
|
||||||
implementation 'me.grishka.litex:palette:1.0.0'
|
implementation 'me.grishka.litex:palette:1.0.0'
|
||||||
implementation 'me.grishka.appkit:appkit:1.2.7'
|
implementation 'me.grishka.appkit:appkit:1.2.8'
|
||||||
implementation 'com.google.code.gson:gson:2.8.9'
|
implementation 'com.google.code.gson:gson:2.8.9'
|
||||||
implementation 'org.jsoup:jsoup:1.14.3'
|
implementation 'org.jsoup:jsoup:1.14.3'
|
||||||
implementation 'com.squareup:otto:1.3.8'
|
implementation 'com.squareup:otto:1.3.8'
|
||||||
|
|||||||
@@ -629,9 +629,9 @@ public abstract class BaseStatusListFragment<T extends DisplayItemsParent> exten
|
|||||||
private int currentMediaHiddenLayoutsWidth=0;
|
private int currentMediaHiddenLayoutsWidth=0;
|
||||||
|
|
||||||
{
|
{
|
||||||
dividerPaint.setColor(UiUtils.getThemeColor(getActivity(), R.attr.colorPollVoted));
|
dividerPaint.setColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Outline));
|
||||||
dividerPaint.setStyle(Paint.Style.STROKE);
|
dividerPaint.setStyle(Paint.Style.STROKE);
|
||||||
dividerPaint.setStrokeWidth(V.dp(1));
|
dividerPaint.setStrokeWidth(V.dp(0.5f));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -66,6 +66,6 @@ public class HashtagTimelineFragment extends StatusListFragment{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onSetFabBottomInset(int inset){
|
protected void onSetFabBottomInset(int inset){
|
||||||
((ViewGroup.MarginLayoutParams) fab.getLayoutParams()).bottomMargin=V.dp(24)+inset;
|
((ViewGroup.MarginLayoutParams) fab.getLayoutParams()).bottomMargin=V.dp(16)+inset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ public class HomeFragment extends AppKitFragment implements OnBackPressedListene
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean wantsLightStatusBar(){
|
public boolean wantsLightStatusBar(){
|
||||||
return currentTab!=R.id.tab_profile && !UiUtils.isDarkTheme();
|
return !UiUtils.isDarkTheme();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -10,16 +10,21 @@ import android.content.ClipData;
|
|||||||
import android.content.ClipboardManager;
|
import android.content.ClipboardManager;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
|
import android.content.res.TypedArray;
|
||||||
import android.graphics.Outline;
|
import android.graphics.Outline;
|
||||||
import android.graphics.drawable.ColorDrawable;
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.graphics.drawable.LayerDrawable;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.SpannableStringBuilder;
|
import android.text.SpannableStringBuilder;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.text.style.ImageSpan;
|
import android.text.style.ImageSpan;
|
||||||
import android.view.Gravity;
|
import android.transition.ChangeBounds;
|
||||||
|
import android.transition.Fade;
|
||||||
|
import android.transition.TransitionManager;
|
||||||
|
import android.transition.TransitionSet;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
@@ -29,12 +34,11 @@ import android.view.ViewGroup;
|
|||||||
import android.view.ViewOutlineProvider;
|
import android.view.ViewOutlineProvider;
|
||||||
import android.view.ViewTreeObserver;
|
import android.view.ViewTreeObserver;
|
||||||
import android.view.WindowInsets;
|
import android.view.WindowInsets;
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
import android.widget.RelativeLayout;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
import android.widget.Toolbar;
|
import android.widget.Toolbar;
|
||||||
@@ -55,9 +59,10 @@ import org.joinmastodon.android.model.Account;
|
|||||||
import org.joinmastodon.android.model.AccountField;
|
import org.joinmastodon.android.model.AccountField;
|
||||||
import org.joinmastodon.android.model.Attachment;
|
import org.joinmastodon.android.model.Attachment;
|
||||||
import org.joinmastodon.android.model.Relationship;
|
import org.joinmastodon.android.model.Relationship;
|
||||||
|
import org.joinmastodon.android.ui.M3AlertDialogBuilder;
|
||||||
|
import org.joinmastodon.android.ui.OutlineProviders;
|
||||||
import org.joinmastodon.android.ui.SimpleViewHolder;
|
import org.joinmastodon.android.ui.SimpleViewHolder;
|
||||||
import org.joinmastodon.android.ui.SingleImagePhotoViewerListener;
|
import org.joinmastodon.android.ui.SingleImagePhotoViewerListener;
|
||||||
import org.joinmastodon.android.ui.drawables.CoverOverlayGradientDrawable;
|
|
||||||
import org.joinmastodon.android.ui.photoviewer.PhotoViewer;
|
import org.joinmastodon.android.ui.photoviewer.PhotoViewer;
|
||||||
import org.joinmastodon.android.ui.tabs.TabLayout;
|
import org.joinmastodon.android.ui.tabs.TabLayout;
|
||||||
import org.joinmastodon.android.ui.tabs.TabLayoutMediator;
|
import org.joinmastodon.android.ui.tabs.TabLayoutMediator;
|
||||||
@@ -67,6 +72,7 @@ import org.joinmastodon.android.ui.utils.UiUtils;
|
|||||||
import org.joinmastodon.android.ui.views.CoverImageView;
|
import org.joinmastodon.android.ui.views.CoverImageView;
|
||||||
import org.joinmastodon.android.ui.views.NestedRecyclerScrollView;
|
import org.joinmastodon.android.ui.views.NestedRecyclerScrollView;
|
||||||
import org.joinmastodon.android.ui.views.ProgressBarButton;
|
import org.joinmastodon.android.ui.views.ProgressBarButton;
|
||||||
|
import org.joinmastodon.android.utils.ElevationOnScrollListener;
|
||||||
import org.parceler.Parcels;
|
import org.parceler.Parcels;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@@ -92,6 +98,7 @@ import me.grishka.appkit.imageloader.ViewImageLoader;
|
|||||||
import me.grishka.appkit.imageloader.requests.UrlImageLoaderRequest;
|
import me.grishka.appkit.imageloader.requests.UrlImageLoaderRequest;
|
||||||
import me.grishka.appkit.utils.CubicBezierInterpolator;
|
import me.grishka.appkit.utils.CubicBezierInterpolator;
|
||||||
import me.grishka.appkit.utils.V;
|
import me.grishka.appkit.utils.V;
|
||||||
|
import me.grishka.appkit.views.FragmentRootLinearLayout;
|
||||||
|
|
||||||
public class ProfileFragment extends LoaderFragment implements OnBackPressedListener, ScrollableToTop{
|
public class ProfileFragment extends LoaderFragment implements OnBackPressedListener, ScrollableToTop{
|
||||||
private static final int AVATAR_RESULT=722;
|
private static final int AVATAR_RESULT=722;
|
||||||
@@ -100,7 +107,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||||||
private ImageView avatar;
|
private ImageView avatar;
|
||||||
private CoverImageView cover;
|
private CoverImageView cover;
|
||||||
private View avatarBorder;
|
private View avatarBorder;
|
||||||
private TextView name, username, bio, followersCount, followersLabel, followingCount, followingLabel, postsCount, postsLabel;
|
private TextView name, username, bio, followersCount, followersLabel, followingCount, followingLabel;
|
||||||
private ProgressBarButton actionButton;
|
private ProgressBarButton actionButton;
|
||||||
private ViewPager2 pager;
|
private ViewPager2 pager;
|
||||||
private NestedRecyclerScrollView scrollView;
|
private NestedRecyclerScrollView scrollView;
|
||||||
@@ -108,19 +115,20 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||||||
private ProfileAboutFragment aboutFragment;
|
private ProfileAboutFragment aboutFragment;
|
||||||
private TabLayout tabbar;
|
private TabLayout tabbar;
|
||||||
private SwipeRefreshLayout refreshLayout;
|
private SwipeRefreshLayout refreshLayout;
|
||||||
private CoverOverlayGradientDrawable coverGradient=new CoverOverlayGradientDrawable();
|
private View followersBtn, followingBtn;
|
||||||
private float titleTransY;
|
|
||||||
private View postsBtn, followersBtn, followingBtn;
|
|
||||||
private EditText nameEdit, bioEdit;
|
private EditText nameEdit, bioEdit;
|
||||||
private ProgressBar actionProgress;
|
private ProgressBar actionProgress;
|
||||||
private FrameLayout[] tabViews;
|
private FrameLayout[] tabViews;
|
||||||
private TabLayoutMediator tabLayoutMediator;
|
private TabLayoutMediator tabLayoutMediator;
|
||||||
private TextView followsYouView;
|
private TextView followsYouView;
|
||||||
|
private LinearLayout countersLayout;
|
||||||
|
private View nameEditWrap, bioEditWrap;
|
||||||
|
private View tabsDivider;
|
||||||
|
private View actionButtonWrap;
|
||||||
|
|
||||||
private Account account;
|
private Account account;
|
||||||
private String accountID;
|
private String accountID;
|
||||||
private Relationship relationship;
|
private Relationship relationship;
|
||||||
private int statusBarHeight;
|
|
||||||
private boolean isOwnProfile;
|
private boolean isOwnProfile;
|
||||||
private ArrayList<AccountField> fields=new ArrayList<>();
|
private ArrayList<AccountField> fields=new ArrayList<>();
|
||||||
|
|
||||||
@@ -132,10 +140,11 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||||||
private WindowInsets childInsets;
|
private WindowInsets childInsets;
|
||||||
private PhotoViewer currentPhotoViewer;
|
private PhotoViewer currentPhotoViewer;
|
||||||
private boolean editModeLoading;
|
private boolean editModeLoading;
|
||||||
|
private ElevationOnScrollListener onScrollListener;
|
||||||
public ProfileFragment(){
|
private Drawable tabsColorBackground;
|
||||||
super(R.layout.loader_fragment_overlay_toolbar);
|
private boolean tabBarIsAtTop;
|
||||||
}
|
private Animator tabBarColorAnim;
|
||||||
|
private MenuItem editSaveMenuItem;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState){
|
public void onCreate(Bundle savedInstanceState){
|
||||||
@@ -180,9 +189,6 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||||||
followingCount=content.findViewById(R.id.following_count);
|
followingCount=content.findViewById(R.id.following_count);
|
||||||
followingLabel=content.findViewById(R.id.following_label);
|
followingLabel=content.findViewById(R.id.following_label);
|
||||||
followingBtn=content.findViewById(R.id.following_btn);
|
followingBtn=content.findViewById(R.id.following_btn);
|
||||||
postsCount=content.findViewById(R.id.posts_count);
|
|
||||||
postsLabel=content.findViewById(R.id.posts_label);
|
|
||||||
postsBtn=content.findViewById(R.id.posts_btn);
|
|
||||||
actionButton=content.findViewById(R.id.profile_action_btn);
|
actionButton=content.findViewById(R.id.profile_action_btn);
|
||||||
pager=content.findViewById(R.id.pager);
|
pager=content.findViewById(R.id.pager);
|
||||||
scrollView=content.findViewById(R.id.scroller);
|
scrollView=content.findViewById(R.id.scroller);
|
||||||
@@ -190,24 +196,22 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||||||
refreshLayout=content.findViewById(R.id.refresh_layout);
|
refreshLayout=content.findViewById(R.id.refresh_layout);
|
||||||
nameEdit=content.findViewById(R.id.name_edit);
|
nameEdit=content.findViewById(R.id.name_edit);
|
||||||
bioEdit=content.findViewById(R.id.bio_edit);
|
bioEdit=content.findViewById(R.id.bio_edit);
|
||||||
|
nameEditWrap=content.findViewById(R.id.name_edit_wrap);
|
||||||
|
bioEditWrap=content.findViewById(R.id.bio_edit_wrap);
|
||||||
actionProgress=content.findViewById(R.id.action_progress);
|
actionProgress=content.findViewById(R.id.action_progress);
|
||||||
fab=content.findViewById(R.id.fab);
|
fab=content.findViewById(R.id.fab);
|
||||||
followsYouView=content.findViewById(R.id.follows_you);
|
followsYouView=content.findViewById(R.id.follows_you);
|
||||||
|
countersLayout=content.findViewById(R.id.profile_counters);
|
||||||
|
tabsDivider=content.findViewById(R.id.tabs_divider);
|
||||||
|
actionButtonWrap=content.findViewById(R.id.profile_action_btn_wrap);
|
||||||
|
|
||||||
avatar.setOutlineProvider(new ViewOutlineProvider(){
|
avatar.setOutlineProvider(OutlineProviders.roundedRect(24));
|
||||||
@Override
|
|
||||||
public void getOutline(View view, Outline outline){
|
|
||||||
outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), V.dp(25));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
avatar.setClipToOutline(true);
|
avatar.setClipToOutline(true);
|
||||||
|
|
||||||
FrameLayout sizeWrapper=new FrameLayout(getActivity()){
|
FrameLayout sizeWrapper=new FrameLayout(getActivity()){
|
||||||
@Override
|
@Override
|
||||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec){
|
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec){
|
||||||
Toolbar toolbar=getToolbar();
|
pager.getLayoutParams().height=MeasureSpec.getSize(heightMeasureSpec)-getPaddingTop()-getPaddingBottom()-V.dp(48);
|
||||||
pager.getLayoutParams().height=MeasureSpec.getSize(heightMeasureSpec)-getPaddingTop()-getPaddingBottom()-toolbar.getLayoutParams().height-statusBarHeight-V.dp(38);
|
|
||||||
coverGradient.setTopPadding(statusBarHeight+toolbar.getLayoutParams().height);
|
|
||||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -235,7 +239,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||||||
|
|
||||||
sizeWrapper.addView(content);
|
sizeWrapper.addView(content);
|
||||||
|
|
||||||
tabbar.setTabTextColors(UiUtils.getThemeColor(getActivity(), android.R.attr.textColorSecondary), UiUtils.getThemeColor(getActivity(), android.R.attr.textColorPrimary));
|
tabbar.setTabTextColors(UiUtils.getThemeColor(getActivity(), R.attr.colorM3OnSurfaceVariant), UiUtils.getThemeColor(getActivity(), R.attr.colorM3Primary));
|
||||||
tabbar.setTabTextSize(V.dp(16));
|
tabbar.setTabTextSize(V.dp(16));
|
||||||
tabLayoutMediator=new TabLayoutMediator(tabbar, pager, new TabLayoutMediator.TabConfigurationStrategy(){
|
tabLayoutMediator=new TabLayoutMediator(tabbar, pager, new TabLayoutMediator.TabConfigurationStrategy(){
|
||||||
@Override
|
@Override
|
||||||
@@ -250,7 +254,6 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
cover.setForeground(coverGradient);
|
|
||||||
cover.setOutlineProvider(new ViewOutlineProvider(){
|
cover.setOutlineProvider(new ViewOutlineProvider(){
|
||||||
@Override
|
@Override
|
||||||
public void getOutline(View view, Outline outline){
|
public void getOutline(View view, Outline outline){
|
||||||
@@ -375,12 +378,23 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
tabsColorBackground=((LayerDrawable)tabbar.getBackground()).findDrawableByLayerId(R.id.color_overlay);
|
||||||
|
|
||||||
|
onScrollListener=new ElevationOnScrollListener((FragmentRootLinearLayout) view, getToolbar());
|
||||||
scrollView.setOnScrollChangeListener(this::onScrollChanged);
|
scrollView.setOnScrollChangeListener(this::onScrollChanged);
|
||||||
titleTransY=getToolbar().getLayoutParams().height;
|
scrollView.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener(){
|
||||||
if(toolbarTitleView!=null){
|
@Override
|
||||||
toolbarTitleView.setTranslationY(titleTransY);
|
public boolean onPreDraw(){
|
||||||
toolbarSubtitleView.setTranslationY(titleTransY);
|
scrollView.getViewTreeObserver().removeOnPreDrawListener(this);
|
||||||
}
|
|
||||||
|
tabBarIsAtTop=!scrollView.canScrollVertically(1) && scrollView.getHeight()>0;
|
||||||
|
tabsColorBackground.setAlpha(tabBarIsAtTop ? 20 : 0);
|
||||||
|
tabbar.setTranslationZ(tabBarIsAtTop ? V.dp(3) : 0);
|
||||||
|
tabsDivider.setAlpha(tabBarIsAtTop ? 0 : 1);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -396,21 +410,18 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onApplyWindowInsets(WindowInsets insets){
|
public void onApplyWindowInsets(WindowInsets insets){
|
||||||
statusBarHeight=insets.getSystemWindowInsetTop();
|
|
||||||
if(contentView!=null){
|
if(contentView!=null){
|
||||||
((ViewGroup.MarginLayoutParams) getToolbar().getLayoutParams()).topMargin=statusBarHeight;
|
|
||||||
refreshLayout.setProgressViewEndTarget(true, statusBarHeight+refreshLayout.getProgressCircleDiameter()+V.dp(24));
|
|
||||||
if(Build.VERSION.SDK_INT>=29 && insets.getTappableElementInsets().bottom==0){
|
if(Build.VERSION.SDK_INT>=29 && insets.getTappableElementInsets().bottom==0){
|
||||||
int insetBottom=insets.getSystemWindowInsetBottom();
|
int insetBottom=insets.getSystemWindowInsetBottom();
|
||||||
childInsets=insets.inset(insets.getSystemWindowInsetLeft(), insets.getSystemWindowInsetTop(), insets.getSystemWindowInsetRight(), 0);
|
childInsets=insets.inset(insets.getSystemWindowInsetLeft(), insets.getSystemWindowInsetTop(), insets.getSystemWindowInsetRight(), 0);
|
||||||
((ViewGroup.MarginLayoutParams) fab.getLayoutParams()).bottomMargin=V.dp(24)+insetBottom;
|
((ViewGroup.MarginLayoutParams) fab.getLayoutParams()).bottomMargin=V.dp(16)+insetBottom;
|
||||||
applyChildWindowInsets();
|
applyChildWindowInsets();
|
||||||
insets=insets.inset(0, 0, 0, insetBottom);
|
insets=insets.inset(0, 0, 0, insetBottom);
|
||||||
}else{
|
}else{
|
||||||
((ViewGroup.MarginLayoutParams) fab.getLayoutParams()).bottomMargin=V.dp(24);
|
((ViewGroup.MarginLayoutParams) fab.getLayoutParams()).bottomMargin=V.dp(16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
super.onApplyWindowInsets(insets.replaceSystemWindowInsets(insets.getSystemWindowInsetLeft(), 0, insets.getSystemWindowInsetRight(), insets.getSystemWindowInsetBottom()));
|
super.onApplyWindowInsets(insets);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void applyChildWindowInsets(){
|
private void applyChildWindowInsets(){
|
||||||
@@ -459,16 +470,20 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||||||
}
|
}
|
||||||
followersCount.setText(UiUtils.abbreviateNumber(account.followersCount));
|
followersCount.setText(UiUtils.abbreviateNumber(account.followersCount));
|
||||||
followingCount.setText(UiUtils.abbreviateNumber(account.followingCount));
|
followingCount.setText(UiUtils.abbreviateNumber(account.followingCount));
|
||||||
postsCount.setText(UiUtils.abbreviateNumber(account.statusesCount));
|
|
||||||
followersLabel.setText(getResources().getQuantityString(R.plurals.followers, (int)Math.min(999, account.followersCount)));
|
followersLabel.setText(getResources().getQuantityString(R.plurals.followers, (int)Math.min(999, account.followersCount)));
|
||||||
followingLabel.setText(getResources().getQuantityString(R.plurals.following, (int)Math.min(999, account.followingCount)));
|
followingLabel.setText(getResources().getQuantityString(R.plurals.following, (int)Math.min(999, account.followingCount)));
|
||||||
postsLabel.setText(getResources().getQuantityString(R.plurals.posts, (int)Math.min(999, account.statusesCount)));
|
|
||||||
|
|
||||||
UiUtils.loadCustomEmojiInTextView(name);
|
UiUtils.loadCustomEmojiInTextView(name);
|
||||||
UiUtils.loadCustomEmojiInTextView(bio);
|
UiUtils.loadCustomEmojiInTextView(bio);
|
||||||
|
|
||||||
if(AccountSessionManager.getInstance().isSelf(accountID, account)){
|
if(AccountSessionManager.getInstance().isSelf(accountID, account)){
|
||||||
actionButton.setText(R.string.edit_profile);
|
actionButton.setText(R.string.edit_profile);
|
||||||
|
TypedArray ta=actionButton.getContext().obtainStyledAttributes(R.style.Widget_Mastodon_M3_Button_Tonal, new int[]{android.R.attr.background});
|
||||||
|
actionButton.setBackground(ta.getDrawable(0));
|
||||||
|
ta.recycle();
|
||||||
|
ta=actionButton.getContext().obtainStyledAttributes(R.style.Widget_Mastodon_M3_Button_Tonal, new int[]{android.R.attr.textColor});
|
||||||
|
actionButton.setTextColor(ta.getColorStateList(0));
|
||||||
|
ta.recycle();
|
||||||
}else{
|
}else{
|
||||||
actionButton.setVisibility(View.GONE);
|
actionButton.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
@@ -503,33 +518,21 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateToolbar(){
|
private void updateToolbar(){
|
||||||
getToolbar().setBackgroundColor(0);
|
|
||||||
if(toolbarTitleView!=null){
|
|
||||||
toolbarTitleView.setTranslationY(titleTransY);
|
|
||||||
toolbarSubtitleView.setTranslationY(titleTransY);
|
|
||||||
}
|
|
||||||
getToolbar().setOnClickListener(v->scrollToTop());
|
getToolbar().setOnClickListener(v->scrollToTop());
|
||||||
getToolbar().setNavigationContentDescription(R.string.back);
|
getToolbar().setNavigationContentDescription(R.string.back);
|
||||||
}
|
UiUtils.setToolbarWithSubtitleAppearance(getToolbar());
|
||||||
|
if(onScrollListener!=null){
|
||||||
@Override
|
onScrollListener.setViews(getToolbar());
|
||||||
public boolean wantsLightStatusBar(){
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){
|
||||||
if(isOwnProfile && isInEditMode){
|
if(isOwnProfile && isInEditMode){
|
||||||
Button cancelButton=new Button(getActivity(), null, 0, R.style.Widget_Mastodon_Button_Secondary_LightOnDark);
|
editSaveMenuItem=menu.add(0, R.id.save, 0, R.string.save_changes);
|
||||||
cancelButton.setText(R.string.cancel);
|
editSaveMenuItem.setIcon(R.drawable.ic_save_24px);
|
||||||
cancelButton.setOnClickListener(v->exitEditMode());
|
editSaveMenuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
|
||||||
FrameLayout wrap=new FrameLayout(getActivity());
|
editSaveMenuItem.setVisible(!isActionButtonInView());
|
||||||
wrap.addView(cancelButton, new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.TOP|Gravity.LEFT));
|
|
||||||
wrap.setPadding(V.dp(16), V.dp(4), V.dp(16), V.dp(8));
|
|
||||||
wrap.setClipToPadding(false);
|
|
||||||
MenuItem item=menu.add(R.string.cancel);
|
|
||||||
item.setActionView(wrap);
|
|
||||||
item.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(relationship==null && !isOwnProfile)
|
if(relationship==null && !isOwnProfile)
|
||||||
@@ -599,15 +602,13 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||||||
Bundle args=new Bundle();
|
Bundle args=new Bundle();
|
||||||
args.putString("account", accountID);
|
args.putString("account", accountID);
|
||||||
Nav.go(getActivity(), FavoritedStatusListFragment.class, args);
|
Nav.go(getActivity(), FavoritedStatusListFragment.class, args);
|
||||||
|
}else if(id==R.id.save){
|
||||||
|
if(isInEditMode)
|
||||||
|
saveAndExitEditMode();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int getToolbarResource(){
|
|
||||||
return R.layout.profile_toolbar;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadRelationship(){
|
private void loadRelationship(){
|
||||||
new GetAccountRelationships(Collections.singletonList(account.id))
|
new GetAccountRelationships(Collections.singletonList(account.id))
|
||||||
.setCallback(new Callback<>(){
|
.setCallback(new Callback<>(){
|
||||||
@@ -630,41 +631,64 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||||||
private void updateRelationship(){
|
private void updateRelationship(){
|
||||||
invalidateOptionsMenu();
|
invalidateOptionsMenu();
|
||||||
actionButton.setVisibility(View.VISIBLE);
|
actionButton.setVisibility(View.VISIBLE);
|
||||||
UiUtils.setRelationshipToActionButton(relationship, actionButton);
|
UiUtils.setRelationshipToActionButtonM3(relationship, actionButton);
|
||||||
actionProgress.setIndeterminateTintList(actionButton.getTextColors());
|
actionProgress.setIndeterminateTintList(actionButton.getTextColors());
|
||||||
followsYouView.setVisibility(relationship.followedBy ? View.VISIBLE : View.GONE);
|
followsYouView.setVisibility(relationship.followedBy ? View.VISIBLE : View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onScrollChanged(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY){
|
private void onScrollChanged(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY){
|
||||||
int topBarsH=getToolbar().getHeight()+statusBarHeight;
|
if(scrollY>cover.getHeight()){
|
||||||
if(scrollY>avatarBorder.getTop()-topBarsH){
|
cover.setTranslationY(scrollY-(cover.getHeight()));
|
||||||
float avaAlpha=Math.max(1f-((scrollY-(avatarBorder.getTop()-topBarsH))/(float)V.dp(38)), 0f);
|
|
||||||
avatarBorder.setAlpha(avaAlpha);
|
|
||||||
}else{
|
|
||||||
avatarBorder.setAlpha(1f);
|
|
||||||
}
|
|
||||||
if(scrollY>cover.getHeight()-topBarsH){
|
|
||||||
cover.setTranslationY(scrollY-(cover.getHeight()-topBarsH));
|
|
||||||
cover.setTranslationZ(V.dp(10));
|
cover.setTranslationZ(V.dp(10));
|
||||||
cover.setTransform(cover.getHeight()/2f-topBarsH/2f, 1f);
|
cover.setTransform(cover.getHeight()/2f);
|
||||||
}else{
|
}else{
|
||||||
cover.setTranslationY(0f);
|
cover.setTranslationY(0f);
|
||||||
cover.setTranslationZ(0f);
|
cover.setTranslationZ(0f);
|
||||||
cover.setTransform(scrollY/2f, 1f);
|
cover.setTransform(scrollY/2f);
|
||||||
}
|
}
|
||||||
coverGradient.setTopOffset(scrollY);
|
|
||||||
cover.invalidate();
|
cover.invalidate();
|
||||||
titleTransY=getToolbar().getHeight();
|
|
||||||
if(scrollY>name.getTop()-topBarsH){
|
|
||||||
titleTransY=Math.max(0f, titleTransY-(scrollY-(name.getTop()-topBarsH)));
|
|
||||||
}
|
|
||||||
if(toolbarTitleView!=null){
|
|
||||||
toolbarTitleView.setTranslationY(titleTransY);
|
|
||||||
toolbarSubtitleView.setTranslationY(titleTransY);
|
|
||||||
}
|
|
||||||
if(currentPhotoViewer!=null){
|
if(currentPhotoViewer!=null){
|
||||||
currentPhotoViewer.offsetView(0, oldScrollY-scrollY);
|
currentPhotoViewer.offsetView(0, oldScrollY-scrollY);
|
||||||
}
|
}
|
||||||
|
onScrollListener.onScrollChange(v, scrollX, scrollY, oldScrollX, oldScrollY);
|
||||||
|
|
||||||
|
boolean newTabBarIsAtTop=!scrollView.canScrollVertically(1);
|
||||||
|
if(newTabBarIsAtTop!=tabBarIsAtTop){
|
||||||
|
tabBarIsAtTop=newTabBarIsAtTop;
|
||||||
|
|
||||||
|
if(tabBarIsAtTop){
|
||||||
|
// ScrollView would sometimes leave 1 pixel unscrolled, force it into the correct scrollY
|
||||||
|
int maxY=scrollView.getChildAt(0).getHeight()-scrollView.getHeight();
|
||||||
|
if(scrollView.getScrollY()!=maxY)
|
||||||
|
scrollView.scrollTo(0, maxY);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tabBarColorAnim!=null)
|
||||||
|
tabBarColorAnim.cancel();
|
||||||
|
AnimatorSet set=new AnimatorSet();
|
||||||
|
set.playTogether(
|
||||||
|
ObjectAnimator.ofInt(tabsColorBackground, "alpha", tabBarIsAtTop ? 20 : 0),
|
||||||
|
ObjectAnimator.ofFloat(tabbar, View.TRANSLATION_Z, tabBarIsAtTop ? V.dp(3) : 0),
|
||||||
|
ObjectAnimator.ofFloat(getToolbar(), View.TRANSLATION_Z, tabBarIsAtTop ? 0 : V.dp(3)),
|
||||||
|
ObjectAnimator.ofFloat(tabsDivider, View.ALPHA, tabBarIsAtTop ? 0 : 1)
|
||||||
|
);
|
||||||
|
set.setDuration(150);
|
||||||
|
set.setInterpolator(CubicBezierInterpolator.DEFAULT);
|
||||||
|
set.addListener(new AnimatorListenerAdapter(){
|
||||||
|
@Override
|
||||||
|
public void onAnimationEnd(Animator animation){
|
||||||
|
tabBarColorAnim=null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
tabBarColorAnim=set;
|
||||||
|
set.start();
|
||||||
|
}
|
||||||
|
if(isInEditMode && editSaveMenuItem!=null){
|
||||||
|
boolean buttonInView=isActionButtonInView();
|
||||||
|
if(buttonInView==editSaveMenuItem.isVisible()){
|
||||||
|
editSaveMenuItem.setVisible(!buttonInView);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Fragment getFragmentForPage(int page){
|
private Fragment getFragmentForPage(int page){
|
||||||
@@ -695,6 +719,8 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||||||
private void setActionProgressVisible(boolean visible){
|
private void setActionProgressVisible(boolean visible){
|
||||||
actionButton.setTextVisible(!visible);
|
actionButton.setTextVisible(!visible);
|
||||||
actionProgress.setVisibility(visible ? View.VISIBLE : View.GONE);
|
actionProgress.setVisibility(visible ? View.VISIBLE : View.GONE);
|
||||||
|
if(visible)
|
||||||
|
actionProgress.setIndeterminateTintList(actionButton.getTextColors());
|
||||||
actionButton.setClickable(!visible);
|
actionButton.setClickable(!visible);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -732,38 +758,38 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||||||
isInEditMode=true;
|
isInEditMode=true;
|
||||||
invalidateOptionsMenu();
|
invalidateOptionsMenu();
|
||||||
pager.setUserInputEnabled(false);
|
pager.setUserInputEnabled(false);
|
||||||
actionButton.setText(R.string.done);
|
actionButton.setText(R.string.save_changes);
|
||||||
pager.setCurrentItem(3);
|
pager.setCurrentItem(3);
|
||||||
ArrayList<Animator> animators=new ArrayList<>();
|
|
||||||
for(int i=0;i<3;i++){
|
for(int i=0;i<3;i++){
|
||||||
animators.add(ObjectAnimator.ofFloat(tabbar.getTabAt(i).view, View.ALPHA, .3f));
|
|
||||||
tabbar.getTabAt(i).view.setEnabled(false);
|
tabbar.getTabAt(i).view.setEnabled(false);
|
||||||
}
|
}
|
||||||
Drawable overlay=getResources().getDrawable(R.drawable.edit_avatar_overlay).mutate();
|
Drawable overlay=getResources().getDrawable(R.drawable.edit_avatar_overlay).mutate();
|
||||||
avatar.setForeground(overlay);
|
avatar.setForeground(overlay);
|
||||||
animators.add(ObjectAnimator.ofInt(overlay, "alpha", 0, 255));
|
|
||||||
|
|
||||||
nameEdit.setVisibility(View.VISIBLE);
|
Toolbar toolbar=getToolbar();
|
||||||
|
Drawable close=getToolbarContext().getDrawable(R.drawable.ic_baseline_close_24).mutate();
|
||||||
|
close.setTint(UiUtils.getThemeColor(getToolbarContext(), R.attr.colorM3OnSurfaceVariant));
|
||||||
|
toolbar.setNavigationIcon(close);
|
||||||
|
toolbar.setNavigationContentDescription(R.string.discard);
|
||||||
|
|
||||||
|
ViewGroup parent=contentView.findViewById(R.id.scrollable_content);
|
||||||
|
TransitionManager.beginDelayedTransition(parent, new TransitionSet()
|
||||||
|
.addTransition(new Fade(Fade.IN | Fade.OUT))
|
||||||
|
.addTransition(new ChangeBounds())
|
||||||
|
.setDuration(250)
|
||||||
|
.setInterpolator(CubicBezierInterpolator.DEFAULT)
|
||||||
|
);
|
||||||
|
|
||||||
|
name.setVisibility(View.GONE);
|
||||||
|
username.setVisibility(View.GONE);
|
||||||
|
bio.setVisibility(View.GONE);
|
||||||
|
countersLayout.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
nameEditWrap.setVisibility(View.VISIBLE);
|
||||||
nameEdit.setText(account.displayName);
|
nameEdit.setText(account.displayName);
|
||||||
RelativeLayout.LayoutParams lp=(RelativeLayout.LayoutParams) username.getLayoutParams();
|
|
||||||
lp.addRule(RelativeLayout.BELOW, R.id.name_edit);
|
|
||||||
username.getParent().requestLayout();
|
|
||||||
animators.add(ObjectAnimator.ofFloat(nameEdit, View.ALPHA, 0f, 1f));
|
|
||||||
|
|
||||||
bioEdit.setVisibility(View.VISIBLE);
|
bioEditWrap.setVisibility(View.VISIBLE);
|
||||||
bioEdit.setText(account.source.note);
|
bioEdit.setText(account.source.note);
|
||||||
animators.add(ObjectAnimator.ofFloat(bioEdit, View.ALPHA, 0f, 1f));
|
|
||||||
animators.add(ObjectAnimator.ofFloat(bio, View.ALPHA, 0f));
|
|
||||||
|
|
||||||
animators.add(ObjectAnimator.ofFloat(postsBtn, View.ALPHA, .3f));
|
|
||||||
animators.add(ObjectAnimator.ofFloat(followersBtn, View.ALPHA, .3f));
|
|
||||||
animators.add(ObjectAnimator.ofFloat(followingBtn, View.ALPHA, .3f));
|
|
||||||
|
|
||||||
AnimatorSet set=new AnimatorSet();
|
|
||||||
set.playTogether(animators);
|
|
||||||
set.setDuration(300);
|
|
||||||
set.setInterpolator(CubicBezierInterpolator.DEFAULT);
|
|
||||||
set.start();
|
|
||||||
|
|
||||||
aboutFragment.enterEditMode(account.source.fields);
|
aboutFragment.enterEditMode(account.source.fields);
|
||||||
}
|
}
|
||||||
@@ -774,39 +800,37 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||||||
isInEditMode=false;
|
isInEditMode=false;
|
||||||
|
|
||||||
invalidateOptionsMenu();
|
invalidateOptionsMenu();
|
||||||
ArrayList<Animator> animators=new ArrayList<>();
|
|
||||||
actionButton.setText(R.string.edit_profile);
|
actionButton.setText(R.string.edit_profile);
|
||||||
for(int i=0;i<3;i++){
|
for(int i=0;i<3;i++){
|
||||||
animators.add(ObjectAnimator.ofFloat(tabbar.getTabAt(i).view, View.ALPHA, 1f));
|
tabbar.getTabAt(i).view.setEnabled(true);
|
||||||
}
|
}
|
||||||
animators.add(ObjectAnimator.ofInt(avatar.getForeground(), "alpha", 0));
|
pager.setUserInputEnabled(true);
|
||||||
animators.add(ObjectAnimator.ofFloat(nameEdit, View.ALPHA, 0f));
|
avatar.setForeground(null);
|
||||||
animators.add(ObjectAnimator.ofFloat(bioEdit, View.ALPHA, 0f));
|
|
||||||
animators.add(ObjectAnimator.ofFloat(bio, View.ALPHA, 1f));
|
|
||||||
animators.add(ObjectAnimator.ofFloat(postsBtn, View.ALPHA, 1f));
|
|
||||||
animators.add(ObjectAnimator.ofFloat(followersBtn, View.ALPHA, 1f));
|
|
||||||
animators.add(ObjectAnimator.ofFloat(followingBtn, View.ALPHA, 1f));
|
|
||||||
|
|
||||||
AnimatorSet set=new AnimatorSet();
|
Toolbar toolbar=getToolbar();
|
||||||
set.playTogether(animators);
|
if(canGoBack()){
|
||||||
set.setDuration(200);
|
Drawable back=getToolbarContext().getDrawable(R.drawable.ic_arrow_back).mutate();
|
||||||
set.setInterpolator(CubicBezierInterpolator.DEFAULT);
|
back.setTint(UiUtils.getThemeColor(getToolbarContext(), R.attr.colorM3OnSurfaceVariant));
|
||||||
set.addListener(new AnimatorListenerAdapter(){
|
toolbar.setNavigationIcon(back);
|
||||||
@Override
|
toolbar.setNavigationContentDescription(0);
|
||||||
public void onAnimationEnd(Animator animation){
|
}else{
|
||||||
for(int i=0;i<3;i++){
|
toolbar.setNavigationIcon(null);
|
||||||
tabbar.getTabAt(i).view.setEnabled(true);
|
}
|
||||||
}
|
editSaveMenuItem=null;
|
||||||
pager.setUserInputEnabled(true);
|
|
||||||
nameEdit.setVisibility(View.GONE);
|
ViewGroup parent=contentView.findViewById(R.id.scrollable_content);
|
||||||
bioEdit.setVisibility(View.GONE);
|
TransitionManager.beginDelayedTransition(parent, new TransitionSet()
|
||||||
RelativeLayout.LayoutParams lp=(RelativeLayout.LayoutParams) username.getLayoutParams();
|
.addTransition(new Fade(Fade.IN | Fade.OUT))
|
||||||
lp.addRule(RelativeLayout.BELOW, R.id.name);
|
.addTransition(new ChangeBounds())
|
||||||
username.getParent().requestLayout();
|
.setDuration(250)
|
||||||
avatar.setForeground(null);
|
.setInterpolator(CubicBezierInterpolator.DEFAULT)
|
||||||
}
|
);
|
||||||
});
|
nameEditWrap.setVisibility(View.GONE);
|
||||||
set.start();
|
bioEditWrap.setVisibility(View.GONE);
|
||||||
|
name.setVisibility(View.VISIBLE);
|
||||||
|
username.setVisibility(View.VISIBLE);
|
||||||
|
bio.setVisibility(View.VISIBLE);
|
||||||
|
countersLayout.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
bindHeaderView();
|
bindHeaderView();
|
||||||
}
|
}
|
||||||
@@ -850,7 +874,11 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||||||
@Override
|
@Override
|
||||||
public boolean onBackPressed(){
|
public boolean onBackPressed(){
|
||||||
if(isInEditMode){
|
if(isInEditMode){
|
||||||
exitEditMode();
|
new M3AlertDialogBuilder(getActivity())
|
||||||
|
.setTitle(R.string.discard_changes)
|
||||||
|
.setPositiveButton(R.string.discard, (dlg, btn)->exitEditMode())
|
||||||
|
.setNegativeButton(R.string.cancel, null)
|
||||||
|
.show();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -901,9 +929,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void startImagePicker(int requestCode){
|
private void startImagePicker(int requestCode){
|
||||||
Intent intent=new Intent(Intent.ACTION_GET_CONTENT);
|
Intent intent=UiUtils.getMediaPickerIntent(new String[]{"image/*"}, 1);
|
||||||
intent.setType("image/*");
|
|
||||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
|
||||||
startActivityForResult(intent, requestCode);
|
startActivityForResult(intent, requestCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -912,10 +938,10 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||||||
if(resultCode==Activity.RESULT_OK){
|
if(resultCode==Activity.RESULT_OK){
|
||||||
if(requestCode==AVATAR_RESULT){
|
if(requestCode==AVATAR_RESULT){
|
||||||
editNewAvatar=data.getData();
|
editNewAvatar=data.getData();
|
||||||
ViewImageLoader.load(avatar, null, new UrlImageLoaderRequest(editNewAvatar, V.dp(100), V.dp(100)));
|
ViewImageLoader.loadWithoutAnimation(avatar, null, new UrlImageLoaderRequest(editNewAvatar, V.dp(100), V.dp(100)));
|
||||||
}else if(requestCode==COVER_RESULT){
|
}else if(requestCode==COVER_RESULT){
|
||||||
editNewCover=data.getData();
|
editNewCover=data.getData();
|
||||||
ViewImageLoader.load(cover, null, new UrlImageLoaderRequest(editNewCover, V.dp(1000), V.dp(1000)));
|
ViewImageLoader.loadWithoutAnimation(cover, null, new UrlImageLoaderRequest(editNewCover, V.dp(1000), V.dp(1000)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -940,6 +966,10 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
|
|||||||
Nav.go(getActivity(), cls, args);
|
Nav.go(getActivity(), cls, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isActionButtonInView(){
|
||||||
|
return actionButton.getVisibility()==View.VISIBLE && actionButtonWrap.getTop()+actionButtonWrap.getHeight()>scrollView.getScrollY();
|
||||||
|
}
|
||||||
|
|
||||||
private class ProfilePagerAdapter extends RecyclerView.Adapter<SimpleViewHolder>{
|
private class ProfilePagerAdapter extends RecyclerView.Adapter<SimpleViewHolder>{
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -89,13 +89,6 @@ public class AccountActivationFragment extends ToolbarFragment{
|
|||||||
return !UiUtils.isDarkTheme();
|
return !UiUtils.isDarkTheme();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState){
|
|
||||||
super.onViewCreated(view, savedInstanceState);
|
|
||||||
setStatusBarColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background));
|
|
||||||
view.setBackgroundColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onUpdateToolbar(){
|
protected void onUpdateToolbar(){
|
||||||
super.onUpdateToolbar();
|
super.onUpdateToolbar();
|
||||||
|
|||||||
@@ -123,16 +123,12 @@ public class GoogleMadeMeAddThisFragment extends ToolbarFragment{
|
|||||||
@Override
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState){
|
public void onViewCreated(View view, Bundle savedInstanceState){
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
setStatusBarColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background));
|
|
||||||
view.setBackgroundColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background));
|
|
||||||
list.addOnScrollListener(onScrollListener=new ElevationOnScrollListener((FragmentRootLinearLayout) view, buttonBar, getToolbar()));
|
list.addOnScrollListener(onScrollListener=new ElevationOnScrollListener((FragmentRootLinearLayout) view, buttonBar, getToolbar()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onUpdateToolbar(){
|
protected void onUpdateToolbar(){
|
||||||
super.onUpdateToolbar();
|
super.onUpdateToolbar();
|
||||||
getToolbar().setBackgroundResource(R.drawable.bg_onboarding_panel);
|
|
||||||
getToolbar().setElevation(0);
|
|
||||||
if(onScrollListener!=null){
|
if(onScrollListener!=null){
|
||||||
onScrollListener.setViews(buttonBar, getToolbar());
|
onScrollListener.setViews(buttonBar, getToolbar());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,7 +164,6 @@ public class InstanceChooserLoginFragment extends InstanceCatalogFragment{
|
|||||||
@Override
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState){
|
public void onViewCreated(View view, Bundle savedInstanceState){
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
setStatusBarColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background));
|
|
||||||
|
|
||||||
list.addItemDecoration(new RecyclerView.ItemDecoration(){
|
list.addItemDecoration(new RecyclerView.ItemDecoration(){
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -90,16 +90,12 @@ public class InstanceRulesFragment extends ToolbarFragment{
|
|||||||
@Override
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState){
|
public void onViewCreated(View view, Bundle savedInstanceState){
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
setStatusBarColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background));
|
|
||||||
view.setBackgroundColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background));
|
|
||||||
list.addOnScrollListener(onScrollListener=new ElevationOnScrollListener((FragmentRootLinearLayout) view, buttonBar, getToolbar()));
|
list.addOnScrollListener(onScrollListener=new ElevationOnScrollListener((FragmentRootLinearLayout) view, buttonBar, getToolbar()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onUpdateToolbar(){
|
protected void onUpdateToolbar(){
|
||||||
super.onUpdateToolbar();
|
super.onUpdateToolbar();
|
||||||
getToolbar().setBackgroundResource(R.drawable.bg_onboarding_panel);
|
|
||||||
getToolbar().setElevation(0);
|
|
||||||
if(onScrollListener!=null){
|
if(onScrollListener!=null){
|
||||||
onScrollListener.setViews(buttonBar, getToolbar());
|
onScrollListener.setViews(buttonBar, getToolbar());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,8 +77,6 @@ public class OnboardingFollowSuggestionsFragment extends BaseRecyclerFragment<Pa
|
|||||||
public void onViewCreated(View view, Bundle savedInstanceState){
|
public void onViewCreated(View view, Bundle savedInstanceState){
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
buttonBar=view.findViewById(R.id.button_bar);
|
buttonBar=view.findViewById(R.id.button_bar);
|
||||||
setStatusBarColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background));
|
|
||||||
view.setBackgroundColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background));
|
|
||||||
list.addOnScrollListener(onScrollListener=new ElevationOnScrollListener((FragmentRootLinearLayout) view, buttonBar, getToolbar()));
|
list.addOnScrollListener(onScrollListener=new ElevationOnScrollListener((FragmentRootLinearLayout) view, buttonBar, getToolbar()));
|
||||||
|
|
||||||
view.findViewById(R.id.btn_next).setOnClickListener(UiUtils.rateLimitedClickListener(this::onFollowAllClick));
|
view.findViewById(R.id.btn_next).setOnClickListener(UiUtils.rateLimitedClickListener(this::onFollowAllClick));
|
||||||
@@ -88,8 +86,6 @@ public class OnboardingFollowSuggestionsFragment extends BaseRecyclerFragment<Pa
|
|||||||
@Override
|
@Override
|
||||||
protected void onUpdateToolbar(){
|
protected void onUpdateToolbar(){
|
||||||
super.onUpdateToolbar();
|
super.onUpdateToolbar();
|
||||||
getToolbar().setBackgroundResource(R.drawable.bg_onboarding_panel);
|
|
||||||
getToolbar().setElevation(0);
|
|
||||||
if(onScrollListener!=null){
|
if(onScrollListener!=null){
|
||||||
onScrollListener.setViews(buttonBar, getToolbar());
|
onScrollListener.setViews(buttonBar, getToolbar());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,16 +118,12 @@ public class OnboardingProfileSetupFragment extends ToolbarFragment implements R
|
|||||||
@Override
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState){
|
public void onViewCreated(View view, Bundle savedInstanceState){
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
setStatusBarColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background));
|
|
||||||
view.setBackgroundColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background));
|
|
||||||
scroller.setOnScrollChangeListener(onScrollListener=new ElevationOnScrollListener((FragmentRootLinearLayout) view, buttonBar, getToolbar()));
|
scroller.setOnScrollChangeListener(onScrollListener=new ElevationOnScrollListener((FragmentRootLinearLayout) view, buttonBar, getToolbar()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onUpdateToolbar(){
|
protected void onUpdateToolbar(){
|
||||||
super.onUpdateToolbar();
|
super.onUpdateToolbar();
|
||||||
getToolbar().setBackgroundResource(R.drawable.bg_onboarding_panel);
|
|
||||||
getToolbar().setElevation(0);
|
|
||||||
if(onScrollListener!=null){
|
if(onScrollListener!=null){
|
||||||
onScrollListener.setViews(buttonBar, getToolbar());
|
onScrollListener.setViews(buttonBar, getToolbar());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,16 +148,12 @@ public class SignupFragment extends ToolbarFragment{
|
|||||||
@Override
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState){
|
public void onViewCreated(View view, Bundle savedInstanceState){
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
setStatusBarColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background));
|
|
||||||
view.setBackgroundColor(UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background));
|
|
||||||
view.findViewById(R.id.scroller).setOnScrollChangeListener(onScrollListener=new ElevationOnScrollListener((FragmentRootLinearLayout) view, buttonBar, getToolbar()));
|
view.findViewById(R.id.scroller).setOnScrollChangeListener(onScrollListener=new ElevationOnScrollListener((FragmentRootLinearLayout) view, buttonBar, getToolbar()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onUpdateToolbar(){
|
protected void onUpdateToolbar(){
|
||||||
super.onUpdateToolbar();
|
super.onUpdateToolbar();
|
||||||
getToolbar().setBackgroundResource(R.drawable.bg_onboarding_panel);
|
|
||||||
getToolbar().setElevation(0);
|
|
||||||
if(onScrollListener!=null){
|
if(onScrollListener!=null){
|
||||||
onScrollListener.setViews(buttonBar, getToolbar());
|
onScrollListener.setViews(buttonBar, getToolbar());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
package org.joinmastodon.android.ui.drawables;
|
|
||||||
|
|
||||||
import android.graphics.Canvas;
|
|
||||||
import android.graphics.ColorFilter;
|
|
||||||
import android.graphics.LinearGradient;
|
|
||||||
import android.graphics.Matrix;
|
|
||||||
import android.graphics.Paint;
|
|
||||||
import android.graphics.PixelFormat;
|
|
||||||
import android.graphics.Rect;
|
|
||||||
import android.graphics.Shader;
|
|
||||||
import android.graphics.drawable.Drawable;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import me.grishka.appkit.utils.V;
|
|
||||||
|
|
||||||
public class CoverOverlayGradientDrawable extends Drawable{
|
|
||||||
private LinearGradient gradient=new LinearGradient(0f, 0f, 0f, 100f, 0xB0000000, 0, Shader.TileMode.CLAMP);
|
|
||||||
private Matrix gradientMatrix=new Matrix();
|
|
||||||
private int topPadding, topOffset;
|
|
||||||
private Paint paint=new Paint();
|
|
||||||
|
|
||||||
public CoverOverlayGradientDrawable(){
|
|
||||||
paint.setShader(gradient);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void draw(@NonNull Canvas canvas){
|
|
||||||
Rect bounds=getBounds();
|
|
||||||
gradientMatrix.setScale(1f, (bounds.height()-V.dp(40)-topPadding)/100f);
|
|
||||||
gradientMatrix.postTranslate(0, topPadding+topOffset);
|
|
||||||
gradient.setLocalMatrix(gradientMatrix);
|
|
||||||
canvas.drawRect(bounds, paint);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setAlpha(int alpha){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setColorFilter(@Nullable ColorFilter colorFilter){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getOpacity(){
|
|
||||||
return PixelFormat.TRANSLUCENT;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTopPadding(int topPadding){
|
|
||||||
this.topPadding=topPadding;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTopOffset(int topOffset){
|
|
||||||
this.topOffset=topOffset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -35,6 +35,7 @@ import android.widget.Button;
|
|||||||
import android.widget.PopupMenu;
|
import android.widget.PopupMenu;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
import android.widget.Toolbar;
|
||||||
|
|
||||||
import org.joinmastodon.android.E;
|
import org.joinmastodon.android.E;
|
||||||
import org.joinmastodon.android.GlobalUserPreferences;
|
import org.joinmastodon.android.GlobalUserPreferences;
|
||||||
@@ -700,4 +701,9 @@ 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import android.widget.ImageView;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
public class CoverImageView extends ImageView{
|
public class CoverImageView extends ImageView{
|
||||||
private float imageTranslationY, imageScale=1f;
|
private float imageTranslationY;
|
||||||
|
|
||||||
public CoverImageView(Context context){
|
public CoverImageView(Context context){
|
||||||
super(context);
|
super(context);
|
||||||
@@ -30,8 +30,7 @@ public class CoverImageView extends ImageView{
|
|||||||
canvas.restore();
|
canvas.restore();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTransform(float transY, float scale){
|
public void setTransform(float transY){
|
||||||
imageTranslationY=transY;
|
imageTranslationY=transY;
|
||||||
imageScale=scale;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class ElevationOnScrollListener extends RecyclerView.OnScrollListener imp
|
|||||||
this.fragmentRootLayout=fragmentRootLayout;
|
this.fragmentRootLayout=fragmentRootLayout;
|
||||||
this.views=views;
|
this.views=views;
|
||||||
for(View v:views){
|
for(View v:views){
|
||||||
Drawable bg=v.getBackground().mutate();
|
Drawable bg=v.getContext().getDrawable(R.drawable.bg_onboarding_panel).mutate();
|
||||||
v.setBackground(bg);
|
v.setBackground(bg);
|
||||||
if(bg instanceof LayerDrawable ld){
|
if(bg instanceof LayerDrawable ld){
|
||||||
Drawable overlay=ld.findDrawableByLayerId(R.id.color_overlay);
|
Drawable overlay=ld.findDrawableByLayerId(R.id.color_overlay);
|
||||||
@@ -51,7 +51,7 @@ public class ElevationOnScrollListener extends RecyclerView.OnScrollListener imp
|
|||||||
for(View v:views){
|
for(View v:views){
|
||||||
if(oldViews.contains(v))
|
if(oldViews.contains(v))
|
||||||
continue;
|
continue;
|
||||||
Drawable bg=v.getBackground().mutate();
|
Drawable bg=v.getContext().getDrawable(R.drawable.bg_onboarding_panel).mutate();
|
||||||
v.setBackground(bg);
|
v.setBackground(bg);
|
||||||
if(bg instanceof LayerDrawable ld){
|
if(bg instanceof LayerDrawable ld){
|
||||||
Drawable overlay=ld.findDrawableByLayerId(R.id.color_overlay);
|
Drawable overlay=ld.findDrawableByLayerId(R.id.color_overlay);
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorControlHighlight">
|
||||||
|
<item android:id="@android:id/mask">
|
||||||
|
<shape>
|
||||||
|
<corners android:radius="100dp"/>
|
||||||
|
<solid android:color="#000"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</ripple>
|
||||||
@@ -1,9 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:color="?android:colorControlHighlight">
|
android:color="?android:colorControlHighlight">
|
||||||
|
<item android:id="@android:id/mask">
|
||||||
|
<shape>
|
||||||
|
<solid android:color="#000"/>
|
||||||
|
<corners android:radius="16dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<shape>
|
<shape>
|
||||||
<solid android:color="?colorSecondary"/>
|
<solid android:color="?colorM3Background"/>
|
||||||
|
<corners android:radius="16dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<shape android:tint="?colorM3Primary">
|
||||||
|
<solid android:color="#1C000000"/>
|
||||||
<corners android:radius="16dp"/>
|
<corners android:radius="16dp"/>
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item>
|
<item>
|
||||||
<shape android:tint="@color/gray_800">
|
<color android:color="#80000000"/>
|
||||||
<solid android:color="#CC000000"/>
|
|
||||||
</shape>
|
|
||||||
</item>
|
</item>
|
||||||
<item android:drawable="@drawable/ic_fluent_image_edit_24_regular"
|
<item android:drawable="@drawable/ic_add_photo_alternate_48px_dark_on_surface"
|
||||||
android:width="44dp"
|
android:width="48dp"
|
||||||
android:height="44dp"
|
android:height="48dp"
|
||||||
android:gravity="center"/>
|
android:gravity="center"/>
|
||||||
</layer-list>
|
</layer-list>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="48dp"
|
||||||
|
android:height="48dp"
|
||||||
|
android:viewportWidth="48"
|
||||||
|
android:viewportHeight="48">
|
||||||
|
<path
|
||||||
|
android:fillColor="@color/m3_sys_dark_on_surface"
|
||||||
|
android:pathData="M29.45,6V9H9Q9,9 9,9Q9,9 9,9V39Q9,39 9,39Q9,39 9,39H39Q39,39 39,39Q39,39 39,39V18.6H42V39Q42,40.2 41.1,41.1Q40.2,42 39,42H9Q7.8,42 6.9,41.1Q6,40.2 6,39V9Q6,7.8 6.9,6.9Q7.8,6 9,6ZM38,6V10.05H42.05V13.05H38V17.1H35V13.05H30.95V10.05H35V6ZM12,33.9H36L28.8,24.3L22.45,32.65L17.75,26.45ZM9,9V14.55V18.6V39Q9,39 9,39Q9,39 9,39Q9,39 9,39Q9,39 9,39V9Q9,9 9,9Q9,9 9,9Z"/>
|
||||||
|
</vector>
|
||||||
9
mastodon/src/main/res/drawable/ic_bookmark_24px.xml
Normal file
9
mastodon/src/main/res/drawable/ic_bookmark_24px.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M7,17.95 L12,15.8 17,17.95V5Q17,5 17,5Q17,5 17,5H7Q7,5 7,5Q7,5 7,5ZM5,21V5Q5,4.175 5.588,3.587Q6.175,3 7,3H17Q17.825,3 18.413,3.587Q19,4.175 19,5V21L12,18ZM17,5H12H7Q7,5 7,5Q7,5 7,5H17Q17,5 17,5Q17,5 17,5Z"/>
|
||||||
|
</vector>
|
||||||
9
mastodon/src/main/res/drawable/ic_edit_24px.xml
Normal file
9
mastodon/src/main/res/drawable/ic_edit_24px.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M5,19H6.4L15.025,10.375L13.625,8.975L5,17.6ZM19.3,8.925 L15.05,4.725 16.45,3.325Q17.025,2.75 17.863,2.75Q18.7,2.75 19.275,3.325L20.675,4.725Q21.25,5.3 21.275,6.113Q21.3,6.925 20.725,7.5ZM17.85,10.4 L7.25,21H3V16.75L13.6,6.15ZM14.325,9.675 L13.625,8.975 15.025,10.375Z"/>
|
||||||
|
</vector>
|
||||||
9
mastodon/src/main/res/drawable/ic_save_24px.xml
Normal file
9
mastodon/src/main/res/drawable/ic_save_24px.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M21,7V19Q21,19.825 20.413,20.413Q19.825,21 19,21H5Q4.175,21 3.587,20.413Q3,19.825 3,19V5Q3,4.175 3.587,3.587Q4.175,3 5,3H17ZM19,7.85 L16.15,5H5Q5,5 5,5Q5,5 5,5V19Q5,19 5,19Q5,19 5,19H19Q19,19 19,19Q19,19 19,19ZM12,18Q13.25,18 14.125,17.125Q15,16.25 15,15Q15,13.75 14.125,12.875Q13.25,12 12,12Q10.75,12 9.875,12.875Q9,13.75 9,15Q9,16.25 9.875,17.125Q10.75,18 12,18ZM6,10H15V6H6ZM5,7.85V19Q5,19 5,19Q5,19 5,19Q5,19 5,19Q5,19 5,19V5Q5,5 5,5Q5,5 5,5Z"/>
|
||||||
|
</vector>
|
||||||
9
mastodon/src/main/res/drawable/ic_share_24px.xml
Normal file
9
mastodon/src/main/res/drawable/ic_share_24px.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M18,22Q16.75,22 15.875,21.125Q15,20.25 15,19Q15,18.825 15.025,18.637Q15.05,18.45 15.1,18.3L8.05,14.2Q7.625,14.575 7.1,14.787Q6.575,15 6,15Q4.75,15 3.875,14.125Q3,13.25 3,12Q3,10.75 3.875,9.875Q4.75,9 6,9Q6.575,9 7.1,9.212Q7.625,9.425 8.05,9.8L15.1,5.7Q15.05,5.55 15.025,5.363Q15,5.175 15,5Q15,3.75 15.875,2.875Q16.75,2 18,2Q19.25,2 20.125,2.875Q21,3.75 21,5Q21,6.25 20.125,7.125Q19.25,8 18,8Q17.425,8 16.9,7.787Q16.375,7.575 15.95,7.2L8.9,11.3Q8.95,11.45 8.975,11.637Q9,11.825 9,12Q9,12.175 8.975,12.362Q8.95,12.55 8.9,12.7L15.95,16.8Q16.375,16.425 16.9,16.212Q17.425,16 18,16Q19.25,16 20.125,16.875Q21,17.75 21,19Q21,20.25 20.125,21.125Q19.25,22 18,22ZM18,6Q18.425,6 18.712,5.713Q19,5.425 19,5Q19,4.575 18.712,4.287Q18.425,4 18,4Q17.575,4 17.288,4.287Q17,4.575 17,5Q17,5.425 17.288,5.713Q17.575,6 18,6ZM6,13Q6.425,13 6.713,12.712Q7,12.425 7,12Q7,11.575 6.713,11.287Q6.425,11 6,11Q5.575,11 5.287,11.287Q5,11.575 5,12Q5,12.425 5.287,12.712Q5.575,13 6,13ZM18,20Q18.425,20 18.712,19.712Q19,19.425 19,19Q19,18.575 18.712,18.288Q18.425,18 18,18Q17.575,18 17.288,18.288Q17,18.575 17,19Q17,19.425 17.288,19.712Q17.575,20 18,20ZM18,5Q18,5 18,5Q18,5 18,5Q18,5 18,5Q18,5 18,5Q18,5 18,5Q18,5 18,5Q18,5 18,5Q18,5 18,5ZM6,12Q6,12 6,12Q6,12 6,12Q6,12 6,12Q6,12 6,12Q6,12 6,12Q6,12 6,12Q6,12 6,12Q6,12 6,12ZM18,19Q18,19 18,19Q18,19 18,19Q18,19 18,19Q18,19 18,19Q18,19 18,19Q18,19 18,19Q18,19 18,19Q18,19 18,19Z"/>
|
||||||
|
</vector>
|
||||||
9
mastodon/src/main/res/drawable/ic_star_24px.xml
Normal file
9
mastodon/src/main/res/drawable/ic_star_24px.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M8.85,17.825 L12,15.925 15.15,17.85 14.325,14.25 17.1,11.85 13.45,11.525 12,8.125 10.55,11.5 6.9,11.825 9.675,14.25ZM5.825,22 L7.45,14.975 2,10.25 9.2,9.625 12,3 14.8,9.625 22,10.25 16.55,14.975 18.175,22 12,18.275ZM12,13.25Z"/>
|
||||||
|
</vector>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<corners android:radius="27dp"/>
|
<corners android:radius="26dp"/>
|
||||||
<stroke android:width="2dp" android:color="@color/gray_25"/>
|
<stroke android:width="4dp" android:color="?colorM3Surface"/>
|
||||||
</shape>
|
</shape>
|
||||||
10
mastodon/src/main/res/drawable/tab_indicator_m3.xml
Normal file
10
mastodon/src/main/res/drawable/tab_indicator_m3.xml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:left="2dp" android:right="2dp">
|
||||||
|
<shape>
|
||||||
|
<solid android:color="#fff" />
|
||||||
|
<size android:height="3dp" />
|
||||||
|
<corners android:topLeftRadius="3dp" android:topRightRadius="3dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:id="@+id/appkit_loader_root"
|
android:id="@+id/appkit_loader_root"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:background="?android:colorBackground">
|
android:background="?colorM3Background">
|
||||||
|
|
||||||
<include layout="@layout/appkit_toolbar"/>
|
<include layout="@layout/appkit_toolbar"/>
|
||||||
|
|
||||||
|
|||||||
@@ -82,17 +82,18 @@
|
|||||||
<org.joinmastodon.android.ui.views.FloatingHintEditTextLayout
|
<org.joinmastodon.android.ui.views.FloatingHintEditTextLayout
|
||||||
android:id="@+id/bio_wrap"
|
android:id="@+id/bio_wrap"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="80dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="-8dp"
|
android:layout_marginTop="-8dp"
|
||||||
android:layout_marginBottom="4dp"
|
android:layout_marginBottom="4dp"
|
||||||
android:paddingTop="4dp"
|
android:paddingTop="4dp"
|
||||||
|
android:paddingBottom="12dp"
|
||||||
app:labelTextColor="@color/m3_outlined_text_field_label"
|
app:labelTextColor="@color/m3_outlined_text_field_label"
|
||||||
android:foreground="@drawable/bg_m3_outlined_text_field">
|
android:foreground="@drawable/bg_m3_outlined_text_field">
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/bio"
|
android:id="@+id/bio"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="56dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<me.grishka.appkit.views.RecursiveSwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<me.grishka.appkit.views.RecursiveSwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/refresh_layout"
|
android:id="@+id/refresh_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
@@ -15,23 +15,25 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:nestedScrollingEnabled="true">
|
android:nestedScrollingEnabled="true">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/scrollable_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:clipChildren="false"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:paddingBottom="15dp"
|
|
||||||
android:clipToPadding="false">
|
|
||||||
|
|
||||||
<org.joinmastodon.android.ui.views.CoverImageView
|
<org.joinmastodon.android.ui.views.CoverImageView
|
||||||
android:id="@+id/cover"
|
android:id="@+id/cover"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="229dp"
|
android:layout_height="144dp"
|
||||||
android:background="#808080"
|
android:background="#808080"
|
||||||
android:contentDescription="@string/profile_header"
|
android:contentDescription="@string/profile_header"
|
||||||
android:scaleType="centerCrop"/>
|
android:scaleType="centerCrop" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/follows_you"
|
android:id="@+id/follows_you"
|
||||||
@@ -40,261 +42,296 @@
|
|||||||
android:layout_alignEnd="@id/cover"
|
android:layout_alignEnd="@id/cover"
|
||||||
android:layout_alignBottom="@id/cover"
|
android:layout_alignBottom="@id/cover"
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
android:paddingRight="8dp"
|
|
||||||
android:paddingLeft="8dp"
|
|
||||||
android:textColor="@color/gray_50t"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:fontFamily="sans-serif-medium"
|
|
||||||
android:textSize="14dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:background="@drawable/bg_profile_follows_you"
|
android:background="@drawable/bg_profile_follows_you"
|
||||||
|
android:fontFamily="sans-serif-medium"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingLeft="8dp"
|
||||||
|
android:paddingRight="8dp"
|
||||||
|
android:text="@string/follows_you"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="@color/gray_50t"
|
||||||
|
android:textSize="14dp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible"
|
tools:visibility="visible" />
|
||||||
android:text="@string/follows_you"/>
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/avatar_border"
|
android:id="@+id/avatar_border"
|
||||||
android:layout_width="102dp"
|
android:layout_width="104dp"
|
||||||
android:layout_height="102dp"
|
android:layout_height="104dp"
|
||||||
android:layout_below="@id/cover"
|
android:layout_below="@id/cover"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
android:layout_marginTop="-40dp"
|
android:layout_marginStart="12dp"
|
||||||
android:layout_marginStart="14dp"
|
android:layout_marginTop="-44dp"
|
||||||
android:outlineProvider="@null"
|
android:background="@drawable/profile_ava_bg"
|
||||||
android:background="@drawable/profile_ava_bg">
|
android:outlineProvider="@null">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/avatar"
|
android:id="@+id/avatar"
|
||||||
android:layout_width="98dp"
|
android:layout_width="96dp"
|
||||||
android:layout_height="98dp"
|
android:layout_height="96dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:contentDescription="@string/profile_picture"
|
android:contentDescription="@string/profile_picture"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
tools:src="#0f0" />
|
tools:src="#0f0" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/profile_counters"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@id/cover"
|
|
||||||
android:layout_toEndOf="@id/avatar_border"
|
|
||||||
android:gravity="end">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/posts_btn"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="56dp"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:layout_marginEnd="12dp"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="4dp">
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/posts_count"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/m3_title_large"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:ellipsize="end"
|
|
||||||
tools:text="123" />
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/posts_label"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/m3_title_small"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:ellipsize="middle"
|
|
||||||
tools:text="posts" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/following_btn"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="56dp"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:layout_marginEnd="16dp"
|
|
||||||
android:padding="4dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:background="?android:selectableItemBackgroundBorderless"
|
|
||||||
android:gravity="center_horizontal">
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/following_count"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/m3_title_large"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:ellipsize="end"
|
|
||||||
tools:text="123"/>
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/following_label"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/m3_title_small"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:ellipsize="middle"
|
|
||||||
tools:text="following"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/followers_btn"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="56dp"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:layout_marginEnd="12dp"
|
|
||||||
android:padding="4dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:background="?android:selectableItemBackgroundBorderless"
|
|
||||||
android:gravity="center_horizontal">
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/followers_count"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/m3_title_large"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:ellipsize="end"
|
|
||||||
tools:text="123"/>
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/followers_label"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/m3_title_small"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:ellipsize="middle"
|
|
||||||
tools:text="followers"/>
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/profile_action_btn_wrap"
|
android:id="@+id/profile_action_btn_wrap"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/cover"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_below="@id/profile_counters"
|
android:layout_marginTop="16dp"
|
||||||
android:padding="16dp"
|
android:layout_marginEnd="16dp">
|
||||||
android:clipToPadding="false">
|
|
||||||
<org.joinmastodon.android.ui.views.ProgressBarButton
|
<org.joinmastodon.android.ui.views.ProgressBarButton
|
||||||
android:id="@+id/profile_action_btn"
|
android:id="@+id/profile_action_btn"
|
||||||
android:layout_width="wrap_content"
|
style="@style/Widget.Mastodon.M3.Button.Filled"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="156dp"
|
||||||
tools:text="Edit Profile"/>
|
android:layout_height="40dp"
|
||||||
|
tools:text="Edit Profile" />
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/action_progress"
|
android:id="@+id/action_progress"
|
||||||
|
style="?android:progressBarStyleSmall"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:indeterminate="true"
|
|
||||||
style="?android:progressBarStyleSmall"
|
|
||||||
android:elevation="10dp"
|
android:elevation="10dp"
|
||||||
android:outlineProvider="none"
|
android:indeterminate="true"
|
||||||
android:indeterminateTint="?colorButtonText"
|
android:indeterminateTint="?colorButtonText"
|
||||||
android:visibility="gone"/>
|
android:outlineProvider="none"
|
||||||
|
android:visibility="gone" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<TextView
|
</RelativeLayout>
|
||||||
android:id="@+id/name"
|
|
||||||
android:layout_width="match_parent"
|
<TextView
|
||||||
android:layout_height="wrap_content"
|
android:id="@+id/name"
|
||||||
android:layout_below="@id/avatar_border"
|
android:layout_width="match_parent"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:layout_toStartOf="@id/profile_action_btn_wrap"
|
android:layout_marginRight="16dp"
|
||||||
android:textAppearance="@style/m3_headline_small"
|
android:fontFamily="sans-serif"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
tools:text="Eugen" />
|
android:textAppearance="@style/m3_title_large"
|
||||||
|
android:textColor="?colorM3OnSurface"
|
||||||
|
tools:text="Eugen" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/username"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
android:layout_marginRight="16dp"
|
||||||
|
android:textAppearance="@style/m3_title_small"
|
||||||
|
android:textColor="?colorM3OnSurfaceVariant"
|
||||||
|
tools:text="\@Gargron" />
|
||||||
|
|
||||||
|
<org.joinmastodon.android.ui.views.LinkedTextView
|
||||||
|
android:id="@+id/bio"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginRight="16dp"
|
||||||
|
android:textAppearance="@style/m3_body_medium"
|
||||||
|
android:textSize="16sp"
|
||||||
|
tools:text="Founder, CEO and lead developer @Mastodon, Germany." />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/profile_counters"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:layout_marginRight="8dp"
|
||||||
|
android:layout_marginBottom="4dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/followers_btn"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="28dp"
|
||||||
|
android:background="@drawable/bg_button_borderless_rounded"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingLeft="8dp"
|
||||||
|
android:paddingTop="4dp"
|
||||||
|
android:paddingRight="8dp"
|
||||||
|
android:paddingBottom="4dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/followers_count"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginEnd="4dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:fontFamily="sans-serif-black"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="?colorM3OnSurfaceVariant"
|
||||||
|
android:textSize="14dp"
|
||||||
|
tools:text="123" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/followers_label"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:ellipsize="middle"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textAppearance="@style/m3_label_large"
|
||||||
|
android:textColor="?colorM3OnSurfaceVariant"
|
||||||
|
tools:text="followers" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/username"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="28dp"
|
||||||
android:layout_height="wrap_content"
|
android:gravity="center"
|
||||||
android:layout_below="@id/name"
|
android:text="·"
|
||||||
android:layout_marginStart="16dp"
|
android:textAppearance="@style/m3_label_large"
|
||||||
android:layout_toStartOf="@id/profile_action_btn_wrap"
|
android:textColor="?colorM3OnSurfaceVariant" />
|
||||||
android:textAppearance="@style/m3_title_medium"
|
|
||||||
android:textColor="?android:textColorSecondary"
|
|
||||||
tools:text="\@Gargron"/>
|
|
||||||
|
|
||||||
<org.joinmastodon.android.ui.views.LinkedTextView
|
<LinearLayout
|
||||||
android:id="@+id/bio"
|
android:id="@+id/following_btn"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="28dp"
|
||||||
android:layout_below="@id/username"
|
android:background="@drawable/bg_button_borderless_rounded"
|
||||||
android:layout_marginLeft="16dp"
|
android:gravity="center_horizontal"
|
||||||
android:layout_marginTop="8dp"
|
android:orientation="horizontal"
|
||||||
android:layout_marginRight="16dp"
|
android:paddingLeft="8dp"
|
||||||
android:textAppearance="@style/m3_body_large"
|
android:paddingTop="4dp"
|
||||||
android:textSize="16sp"
|
android:paddingRight="8dp"
|
||||||
tools:text="Founder, CEO and lead developer @Mastodon, Germany." />
|
android:paddingBottom="4dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/following_count"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginEnd="4dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="?colorM3OnSurfaceVariant"
|
||||||
|
android:textSize="14dp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="123" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/following_label"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:ellipsize="middle"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textAppearance="@style/m3_label_large"
|
||||||
|
android:textColor="?colorM3OnSurfaceVariant"
|
||||||
|
tools:text="following" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<org.joinmastodon.android.ui.views.FloatingHintEditTextLayout
|
||||||
|
android:id="@+id/name_edit_wrap"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:foreground="@drawable/bg_m3_outlined_text_field"
|
||||||
|
android:paddingTop="4dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:labelTextColor="@color/m3_outlined_text_field_label">
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/name_edit"
|
android:id="@+id/name_edit"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="56dp"
|
||||||
android:layout_below="@id/avatar_border"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_toStartOf="@id/profile_action_btn_wrap"
|
android:layout_marginEnd="16dp"
|
||||||
android:textAppearance="@style/m3_body_large"
|
android:background="@null"
|
||||||
android:textSize="16sp"
|
|
||||||
android:background="@drawable/edit_text_border"
|
|
||||||
android:inputType="textPersonName|textCapWords"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:elevation="0dp"
|
android:elevation="0dp"
|
||||||
|
android:hint="@string/display_name"
|
||||||
|
android:inputType="textPersonName|textCapWords"
|
||||||
|
android:padding="16dp"
|
||||||
tools:text="Eugen" />
|
tools:text="Eugen" />
|
||||||
|
</org.joinmastodon.android.ui.views.FloatingHintEditTextLayout>
|
||||||
|
|
||||||
|
<org.joinmastodon.android.ui.views.FloatingHintEditTextLayout
|
||||||
|
android:id="@+id/bio_edit_wrap"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="-8dp"
|
||||||
|
android:layout_marginBottom="-4dp"
|
||||||
|
android:paddingBottom="12dp"
|
||||||
|
android:foreground="@drawable/bg_m3_outlined_text_field"
|
||||||
|
android:paddingTop="4dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:labelTextColor="@color/m3_outlined_text_field_label">
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/bio_edit"
|
android:id="@+id/bio_edit"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/username"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginLeft="16dp"
|
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:textAppearance="@style/m3_body_large"
|
android:background="@null"
|
||||||
android:textSize="16sp"
|
|
||||||
android:background="@drawable/edit_text_border"
|
|
||||||
android:inputType="textMultiLine|textCapSentences"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:elevation="0dp"
|
android:elevation="0dp"
|
||||||
|
android:hint="@string/profile_bio"
|
||||||
|
android:inputType="textMultiLine|textCapSentences"
|
||||||
|
android:padding="16dp"
|
||||||
tools:text="Founder, CEO and lead developer @Mastodon, Germany." />
|
tools:text="Founder, CEO and lead developer @Mastodon, Germany." />
|
||||||
|
</org.joinmastodon.android.ui.views.FloatingHintEditTextLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
<org.joinmastodon.android.ui.tabs.TabLayout
|
<org.joinmastodon.android.ui.tabs.TabLayout
|
||||||
android:id="@+id/tabbar"
|
android:id="@+id/tabbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="38dp"
|
android:layout_height="48dp"
|
||||||
android:layout_marginLeft="4dp"
|
android:background="@drawable/bg_onboarding_panel"
|
||||||
android:layout_marginRight="4dp"
|
app:tabGravity="fill"
|
||||||
app:tabPaddingStart="12dp"
|
app:tabIndicator="@drawable/tab_indicator_m3"
|
||||||
app:tabPaddingEnd="12dp"
|
|
||||||
app:tabMinWidth="0dp"
|
|
||||||
app:tabIndicator="@drawable/tab_indicator_inset"
|
|
||||||
app:tabIndicatorAnimationMode="elastic"
|
app:tabIndicatorAnimationMode="elastic"
|
||||||
app:tabIndicatorColor="?android:textColorPrimary"
|
app:tabIndicatorColor="?colorM3Primary"
|
||||||
app:tabMode="scrollable"
|
app:tabIndicatorFullWidth="false"
|
||||||
app:tabGravity="start"/>
|
app:tabMinWidth="0dp"
|
||||||
<androidx.viewpager2.widget.ViewPager2
|
app:tabMode="fixed" />
|
||||||
android:id="@+id/pager"
|
|
||||||
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.viewpager2.widget.ViewPager2
|
||||||
|
android:id="@+id/pager"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/tabs_divider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="?colorM3SurfaceVariant"/>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</org.joinmastodon.android.ui.views.NestedRecyclerScrollView>
|
</org.joinmastodon.android.ui.views.NestedRecyclerScrollView>
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/fab"
|
android:id="@+id/fab"
|
||||||
android:layout_width="64dp"
|
android:layout_width="56dp"
|
||||||
android:layout_height="64dp"
|
android:layout_height="56dp"
|
||||||
android:layout_gravity="end|bottom"
|
android:layout_gravity="end|bottom"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:layout_marginBottom="24dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:background="@drawable/bg_fab"
|
android:background="@drawable/bg_fab"
|
||||||
android:tint="@color/fab_icon"
|
android:contentDescription="@string/new_post"
|
||||||
android:scaleType="center"
|
android:scaleType="center"
|
||||||
|
android:src="@drawable/ic_edit_24px"
|
||||||
android:stateListAnimator="@animator/fab_shadow"
|
android:stateListAnimator="@animator/fab_shadow"
|
||||||
android:src="@drawable/ic_edit_34"/>
|
android:tint="?colorM3Primary" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -22,17 +22,17 @@
|
|||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/fab"
|
android:id="@+id/fab"
|
||||||
android:layout_width="64dp"
|
android:layout_width="56dp"
|
||||||
android:layout_height="64dp"
|
android:layout_height="56dp"
|
||||||
android:layout_gravity="end|bottom"
|
android:layout_gravity="end|bottom"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:layout_marginBottom="24dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:background="@drawable/bg_fab"
|
android:background="@drawable/bg_fab"
|
||||||
android:tint="@color/fab_icon"
|
android:tint="?colorM3Primary"
|
||||||
android:scaleType="center"
|
android:scaleType="center"
|
||||||
android:stateListAnimator="@animator/fab_shadow"
|
android:stateListAnimator="@animator/fab_shadow"
|
||||||
android:contentDescription="@string/new_post"
|
android:contentDescription="@string/new_post"
|
||||||
android:src="@drawable/ic_edit_34"/>
|
android:src="@drawable/ic_edit_24px"/>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</me.grishka.appkit.views.RecursiveSwipeRefreshLayout>
|
</me.grishka.appkit.views.RecursiveSwipeRefreshLayout>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:id="@+id/bookmarks" android:title="@string/bookmarks" android:icon="@drawable/ic_fluent_bookmark_24_regular" android:showAsAction="always"/>
|
<item android:id="@+id/bookmarks" android:title="@string/bookmarks" android:icon="@drawable/ic_bookmark_24px" android:showAsAction="always"/>
|
||||||
<item android:id="@+id/favorites" android:title="@string/your_favorites" android:icon="@drawable/ic_fluent_star_24_regular" android:showAsAction="always"/>
|
<item android:id="@+id/favorites" android:title="@string/your_favorites" android:icon="@drawable/ic_star_24px" android:showAsAction="always"/>
|
||||||
<item android:id="@+id/share" android:title="@string/share_user" android:icon="@drawable/ic_fluent_share_24_regular" android:showAsAction="always"/>
|
<item android:id="@+id/share" android:title="@string/share_user" android:icon="@drawable/ic_share_24px" android:showAsAction="always"/>
|
||||||
</menu>
|
</menu>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="navigation_bar_bg">@color/gray_50</color>
|
<color name="navigation_bar_bg_light">@color/m3_sys_light_background</color>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
<color name="purple_900">#3E1C96</color>
|
<color name="purple_900">#3E1C96</color>
|
||||||
|
|
||||||
<color name="fab_icon">#282C37</color>
|
<color name="fab_icon">#282C37</color>
|
||||||
<color name="navigation_bar_bg">#282C37</color>
|
<color name="navigation_bar_bg_light">#282C37</color>
|
||||||
<color name="highlight_over_dark">#30FFFFFF</color>
|
<color name="highlight_over_dark">#30FFFFFF</color>
|
||||||
<color name="highlight_over_light">#18000000</color>
|
<color name="highlight_over_light">#18000000</color>
|
||||||
|
|
||||||
|
|||||||
@@ -15,4 +15,6 @@
|
|||||||
|
|
||||||
<item name="notifications_all" type="id"/>
|
<item name="notifications_all" type="id"/>
|
||||||
<item name="notifications_mentions" type="id"/>
|
<item name="notifications_mentions" type="id"/>
|
||||||
|
|
||||||
|
<item name="save" type="id"/>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -441,4 +441,5 @@
|
|||||||
<string name="spoiler_show">Show anyway</string>
|
<string name="spoiler_show">Show anyway</string>
|
||||||
<string name="spoiler_hide">Re-hide</string>
|
<string name="spoiler_hide">Re-hide</string>
|
||||||
<string name="poll_multiple_choice">Choose one or more</string>
|
<string name="poll_multiple_choice">Choose one or more</string>
|
||||||
|
<string name="save_changes">Save changes</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -12,7 +12,6 @@
|
|||||||
<item name="secondaryButtonStyle">@style/Widget.Mastodon.Button.Secondary_DarkOnLight</item>
|
<item name="secondaryButtonStyle">@style/Widget.Mastodon.Button.Secondary_DarkOnLight</item>
|
||||||
<item name="primaryLargeButtonStyle">@style/Widget.Mastodon.Button.Large.Primary_DarkOnLight</item>
|
<item name="primaryLargeButtonStyle">@style/Widget.Mastodon.Button.Large.Primary_DarkOnLight</item>
|
||||||
<item name="secondaryLargeButtonStyle">@style/Widget.Mastodon.Button.Large.Secondary_DarkOnLight</item>
|
<item name="secondaryLargeButtonStyle">@style/Widget.Mastodon.Button.Large.Secondary_DarkOnLight</item>
|
||||||
<item name="android:colorAccent">@color/primary_700</item>
|
|
||||||
<item name="android:colorPrimary">@color/gray_800</item>
|
<item name="android:colorPrimary">@color/gray_800</item>
|
||||||
<item name="android:colorBackground">@color/gray_100</item>
|
<item name="android:colorBackground">@color/gray_100</item>
|
||||||
<item name="android:textColorPrimary">@color/gray_800</item>
|
<item name="android:textColorPrimary">@color/gray_800</item>
|
||||||
@@ -22,8 +21,6 @@
|
|||||||
<item name="colorBackgroundLight">@color/gray_50</item>
|
<item name="colorBackgroundLight">@color/gray_50</item>
|
||||||
<item name="colorBackgroundLightest">@color/gray_25</item>
|
<item name="colorBackgroundLightest">@color/gray_25</item>
|
||||||
<item name="colorDarkIcon">@color/gray_900</item>
|
<item name="colorDarkIcon">@color/gray_900</item>
|
||||||
<item name="android:statusBarColor">@color/gray_50</item>
|
|
||||||
<item name="android:navigationBarColor">@color/navigation_bar_bg</item>
|
|
||||||
<item name="android:actionBarTheme">@style/Theme.Mastodon.Toolbar</item>
|
<item name="android:actionBarTheme">@style/Theme.Mastodon.Toolbar</item>
|
||||||
<item name="android:alertDialogTheme">@style/Theme.Mastodon.Dialog.Alert</item>
|
<item name="android:alertDialogTheme">@style/Theme.Mastodon.Dialog.Alert</item>
|
||||||
<item name="colorPollMostVoted">@color/primary_500</item>
|
<item name="colorPollMostVoted">@color/primary_500</item>
|
||||||
@@ -70,6 +67,9 @@
|
|||||||
<item name="colorM3OnErrorContainer">#410E0B</item>
|
<item name="colorM3OnErrorContainer">#410E0B</item>
|
||||||
|
|
||||||
<item name="colorWindowBackground">?colorM3Background</item>
|
<item name="colorWindowBackground">?colorM3Background</item>
|
||||||
|
<item name="android:statusBarColor">?colorM3Background</item>
|
||||||
|
<item name="android:navigationBarColor">@color/navigation_bar_bg_light</item>
|
||||||
|
<item name="android:colorAccent">?colorM3Primary</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Dark" parent="Theme.AppKit">
|
<style name="Theme.Mastodon.Dark" parent="Theme.AppKit">
|
||||||
@@ -84,7 +84,6 @@
|
|||||||
<item name="secondaryButtonStyle">@style/Widget.Mastodon.Button.Secondary_LightOnDark</item>
|
<item name="secondaryButtonStyle">@style/Widget.Mastodon.Button.Secondary_LightOnDark</item>
|
||||||
<item name="primaryLargeButtonStyle">@style/Widget.Mastodon.Button.Large.Primary_LightOnDark</item>
|
<item name="primaryLargeButtonStyle">@style/Widget.Mastodon.Button.Large.Primary_LightOnDark</item>
|
||||||
<item name="secondaryLargeButtonStyle">@style/Widget.Mastodon.Button.Large.Secondary_LightOnDark</item>
|
<item name="secondaryLargeButtonStyle">@style/Widget.Mastodon.Button.Large.Secondary_LightOnDark</item>
|
||||||
<item name="android:colorAccent">@color/primary_400</item>
|
|
||||||
<item name="android:colorPrimary">@color/gray_50</item>
|
<item name="android:colorPrimary">@color/gray_50</item>
|
||||||
<item name="android:colorBackground">@color/gray_700</item>
|
<item name="android:colorBackground">@color/gray_700</item>
|
||||||
<item name="android:textColorPrimary">@color/gray_50</item>
|
<item name="android:textColorPrimary">@color/gray_50</item>
|
||||||
@@ -94,10 +93,7 @@
|
|||||||
<item name="colorBackgroundLight">@color/gray_700</item>
|
<item name="colorBackgroundLight">@color/gray_700</item>
|
||||||
<item name="colorBackgroundLightest">@color/gray_900</item>
|
<item name="colorBackgroundLightest">@color/gray_900</item>
|
||||||
<item name="colorDarkIcon">@color/gray_25</item>
|
<item name="colorDarkIcon">@color/gray_25</item>
|
||||||
<item name="colorWindowBackground">@color/gray_800</item>
|
<item name="android:actionBarTheme">@style/Theme.Mastodon.Toolbar</item>
|
||||||
<item name="android:statusBarColor">@color/gray_800</item>
|
|
||||||
<item name="android:navigationBarColor">@color/gray_800</item>
|
|
||||||
<item name="android:actionBarTheme">@style/Theme.Mastodon.Toolbar.Dark</item>
|
|
||||||
<item name="android:alertDialogTheme">@style/Theme.Mastodon.Dialog.Alert.Dark</item>
|
<item name="android:alertDialogTheme">@style/Theme.Mastodon.Dialog.Alert.Dark</item>
|
||||||
<item name="colorPollMostVoted">@color/primary_700</item>
|
<item name="colorPollMostVoted">@color/primary_700</item>
|
||||||
<item name="colorPollVoted">@color/gray_600</item>
|
<item name="colorPollVoted">@color/gray_600</item>
|
||||||
@@ -143,6 +139,11 @@
|
|||||||
<item name="colorM3OnError">#601410</item>
|
<item name="colorM3OnError">#601410</item>
|
||||||
<item name="colorM3ErrorContainer">#8C1D18</item>
|
<item name="colorM3ErrorContainer">#8C1D18</item>
|
||||||
<item name="colorM3OnErrorContainer">#F9DEDC</item>
|
<item name="colorM3OnErrorContainer">#F9DEDC</item>
|
||||||
|
|
||||||
|
<item name="colorWindowBackground">?colorM3Background</item>
|
||||||
|
<item name="android:statusBarColor">?colorM3Background</item>
|
||||||
|
<item name="android:navigationBarColor">?colorM3Background</item>
|
||||||
|
<item name="android:colorAccent">?colorM3Primary</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Dark.TrueBlack">
|
<style name="Theme.Mastodon.Dark.TrueBlack">
|
||||||
@@ -155,17 +156,13 @@
|
|||||||
<style name="Theme.Mastodon.AutoLightDark.TrueBlack" parent="Theme.Mastodon.Light"/>
|
<style name="Theme.Mastodon.AutoLightDark.TrueBlack" parent="Theme.Mastodon.Light"/>
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Toolbar" parent="android:ThemeOverlay.Material.ActionBar">
|
<style name="Theme.Mastodon.Toolbar" parent="android:ThemeOverlay.Material.ActionBar">
|
||||||
<item name="android:colorPrimary">@color/gray_50</item>
|
<item name="android:colorPrimary">?colorM3Background</item>
|
||||||
<item name="android:textColorPrimary">@color/gray_800</item>
|
<item name="android:textColorPrimary">?colorM3OnSurface</item>
|
||||||
<item name="android:textColorSecondary">@color/gray_800</item>
|
<item name="android:textColorSecondary">?colorM3OnSurfaceVariant</item>
|
||||||
<item name="android:toolbarStyle">@style/Widget.Mastodon.Toolbar</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="Theme.Mastodon.Toolbar.Dark" parent="android:ThemeOverlay.Material.Dark.ActionBar">
|
|
||||||
<item name="android:colorPrimary">@color/gray_800</item>
|
|
||||||
<item name="android:textColorPrimary">@color/gray_50</item>
|
|
||||||
<item name="android:textColorSecondary">@color/gray_50</item>
|
|
||||||
<item name="android:toolbarStyle">@style/Widget.Mastodon.Toolbar</item>
|
<item name="android:toolbarStyle">@style/Widget.Mastodon.Toolbar</item>
|
||||||
|
<item name="appkitToolbarElevation">0px</item>
|
||||||
|
<item name="appkitToolbarBackground">?colorM3Background</item>
|
||||||
|
<item name="actionBarIconTint">?colorM3OnSurfaceVariant</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Widget.Mastodon.Toolbar" parent="android:Widget.Material.Toolbar">
|
<style name="Widget.Mastodon.Toolbar" parent="android:Widget.Material.Toolbar">
|
||||||
@@ -295,6 +292,8 @@
|
|||||||
<item name="android:minHeight">40dp</item>
|
<item name="android:minHeight">40dp</item>
|
||||||
<item name="android:fontFamily">sans-serif-medium</item>
|
<item name="android:fontFamily">sans-serif-medium</item>
|
||||||
<item name="android:stateListAnimator">@null</item>
|
<item name="android:stateListAnimator">@null</item>
|
||||||
|
<item name="android:singleLine">true</item>
|
||||||
|
<item name="android:ellipsize">end</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Widget.Mastodon.M3.Button.Filled">
|
<style name="Widget.Mastodon.M3.Button.Filled">
|
||||||
|
|||||||
Reference in New Issue
Block a user