Fix issue #67 - Reaching profile edition from the account activity
This commit is contained in:
parent
c63048730f
commit
90cfcbb7ae
|
@ -37,6 +37,7 @@ import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||||
import androidx.viewpager.widget.PagerAdapter;
|
import androidx.viewpager.widget.PagerAdapter;
|
||||||
import androidx.viewpager.widget.ViewPager;
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
|
||||||
|
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||||
import com.google.android.material.tabs.TabLayout;
|
import com.google.android.material.tabs.TabLayout;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
@ -97,6 +98,10 @@ public class AccountActivity extends AppCompatActivity {
|
||||||
displayname.setText(account.getDisplayName());
|
displayname.setText(account.getDisplayName());
|
||||||
|
|
||||||
instanceView.setText(account.getHost());
|
instanceView.setText(account.getHost());
|
||||||
|
FloatingActionButton edit_profile = findViewById(R.id.edit_profile);
|
||||||
|
edit_profile.setOnClickListener(v -> {
|
||||||
|
startActivity(new Intent(AccountActivity.this, MyAccountActivity.class));
|
||||||
|
});
|
||||||
|
|
||||||
Button logout_button = findViewById(R.id.logout_button);
|
Button logout_button = findViewById(R.id.logout_button);
|
||||||
logout_button.setOnClickListener(v -> {
|
logout_button.setOnClickListener(v -> {
|
||||||
|
|
|
@ -61,13 +61,28 @@
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/profile_picture"
|
android:id="@+id/profile_picture"
|
||||||
android:layout_width="60dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="60dp"
|
android:layout_height="80dp"
|
||||||
android:contentDescription="@string/profile_picture"
|
android:contentDescription="@string/profile_picture"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
|
android:id="@+id/edit_profile"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="50dp"
|
||||||
|
android:layout_marginTop="50dp"
|
||||||
|
android:contentDescription="@string/edit_profile"
|
||||||
|
android:scaleType="center"
|
||||||
|
android:src="@drawable/ic_baseline_edit_24"
|
||||||
|
android:tint="@color/white"
|
||||||
|
app:fabSize="mini"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/displayname"
|
android:id="@+id/displayname"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
Loading…
Reference in New Issue