1
0
mirror of https://framagit.org/tom79/fedilab-tube synced 2025-06-05 21:09:11 +02:00

Add README.md

This commit is contained in:
Thomas
2020-07-01 17:39:15 +02:00
parent 3b42207003
commit e70d99a602
3 changed files with 100 additions and 56 deletions

View File

@ -24,6 +24,7 @@ import android.text.Html;
import android.text.SpannableString;
import android.text.method.LinkMovementMethod;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
@ -220,7 +221,11 @@ public class ShowAccountActivity extends AppCompatActivity implements OnPostActi
PagerAdapter mPagerAdapter = new ScreenSlidePagerAdapter(getSupportFragmentManager());
mPager.setAdapter(mPagerAdapter);
if( ischannel) {
ViewGroup.LayoutParams params = tabLayout.getLayoutParams();
params.height = 0;
tabLayout.setLayoutParams(params);
}
mPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
@ -298,6 +303,7 @@ public class ShowAccountActivity extends AppCompatActivity implements OnPostActi
Helper.loadGiF(ShowAccountActivity.this, account, account_pp);
//Follow button
String target = account.getAcct();
account_follow.setOnClickListener(v -> {
if (doAction == action.NOTHING) {
Toasty.info(ShowAccountActivity.this, getString(R.string.nothing_to_do), Toast.LENGTH_LONG).show();
@ -395,11 +401,19 @@ public class ShowAccountActivity extends AppCompatActivity implements OnPostActi
}
doAction = action.UNFOLLOW;
account_follow.setContentDescription(getString(R.string.action_unfollow));
account_follow.setVisibility(View.VISIBLE);
if(ischannel) {
account_follow.setVisibility(View.VISIBLE);
}else{
account_follow.setVisibility(View.GONE);
}
} else if (!relationship.isFollowing()) {
account_follow.setImageResource(R.drawable.ic_user_plus);
doAction = action.FOLLOW;
account_follow.setVisibility(View.VISIBLE);
if(ischannel) {
account_follow.setVisibility(View.VISIBLE);
}else{
account_follow.setVisibility(View.GONE);
}
account_follow.setContentDescription(getString(R.string.action_follow));
} else {
account_follow.setVisibility(View.GONE);