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:
@ -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);
|
||||
|
@ -45,6 +45,20 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/action_back"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:contentDescription="@string/go_back"
|
||||
android:src="@drawable/ic_baseline_arrow_back_24"
|
||||
android:tint="@android:color/white"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/banner_pp"
|
||||
android:layout_width="match_parent"
|
||||
@ -53,7 +67,9 @@
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/default_banner"
|
||||
app:layout_collapseMode="parallax"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/account_pp"
|
||||
@ -65,9 +81,8 @@
|
||||
android:background="@drawable/account_pp_border"
|
||||
android:contentDescription="@string/profile_picture"
|
||||
android:padding="2dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/banner_pp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/action_back"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/banner_pp"
|
||||
app:layout_scrollFlags="scroll" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
@ -75,17 +90,16 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:padding="2dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/banner_pp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/account_pp"
|
||||
app:layout_constraintTop_toBottomOf="@id/banner_pp">
|
||||
app:layout_constraintTop_toBottomOf="@+id/action_back">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginStart="10dp"
|
||||
android:id="@+id/names_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
@ -107,56 +121,37 @@
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/account_follow"
|
||||
style="@style/Widget.AppCompat.Button.Colored"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:contentDescription="@string/make_an_action"
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/names_container" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/header_edit_profile"
|
||||
style="@style/Widget.AppCompat.Button.Colored"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:contentDescription="@string/edit_profile"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_baseline_edit_24"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/names_container" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/account_follow"
|
||||
style="@style/Widget.AppCompat.Button.Colored"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:contentDescription="@string/make_an_action"
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toEndOf="@id/account_pp"
|
||||
app:layout_constraintTop_toBottomOf="@id/banner_pp" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/header_edit_profile"
|
||||
style="@style/Widget.AppCompat.Button.Colored"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:contentDescription="@string/edit_profile"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_baseline_edit_24"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toEndOf="@id/account_pp"
|
||||
app:layout_constraintTop_toBottomOf="@id/banner_pp" />
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:alpha="0.4"
|
||||
android:background="@android:color/black"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/action_back"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:contentDescription="@string/go_back"
|
||||
android:src="@drawable/ic_baseline_arrow_back_24"
|
||||
android:tint="@android:color/white"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
Reference in New Issue
Block a user