diff --git a/app/src/main/java/com/keylesspalace/tusky/AccountActivity.java b/app/src/main/java/com/keylesspalace/tusky/AccountActivity.java index f3a83f4d0..6711781bb 100644 --- a/app/src/main/java/com/keylesspalace/tusky/AccountActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/AccountActivity.java @@ -165,9 +165,6 @@ public class AccountActivity extends BaseActivity implements SFragment.OnUserRem // Initialise the default UI states. floatingBtn.hide(); - avatar.setImageResource(R.drawable.avatar_default); - header.setImageResource(R.drawable.account_header_default); - // Obtain information to fill out the profile. obtainAccount(); if (!accountId.equals(loggedInAccountId)) { @@ -277,7 +274,7 @@ public class AccountActivity extends BaseActivity implements SFragment.OnUserRem .into(avatar); Picasso.with(this) .load(account.header) - .placeholder(R.drawable.account_header_missing) + .placeholder(R.drawable.account_header_default) .into(header); NumberFormat nf = NumberFormat.getInstance(); diff --git a/app/src/main/java/com/keylesspalace/tusky/EditProfileActivity.java b/app/src/main/java/com/keylesspalace/tusky/EditProfileActivity.java index 23c633b63..03d9811dc 100644 --- a/app/src/main/java/com/keylesspalace/tusky/EditProfileActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/EditProfileActivity.java @@ -179,7 +179,7 @@ public class EditProfileActivity extends BaseActivity { .into(avatar); Picasso.with(header.getContext()) .load(me.header) - .placeholder(R.drawable.account_header_missing) + .placeholder(R.drawable.account_header_default) .into(header); } diff --git a/app/src/main/java/com/keylesspalace/tusky/MainActivity.java b/app/src/main/java/com/keylesspalace/tusky/MainActivity.java index 748d486af..a2347ec93 100644 --- a/app/src/main/java/com/keylesspalace/tusky/MainActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/MainActivity.java @@ -496,7 +496,7 @@ public class MainActivity extends BaseActivity implements SFragment.OnUserRemove Picasso.with(MainActivity.this) .load(me.header) - .placeholder(R.drawable.account_header_missing) + .placeholder(R.drawable.account_header_default) .resize(backgroundWidth, backgroundHeight) .centerCrop() .into(background); diff --git a/app/src/main/res/drawable/account_header_default.png b/app/src/main/res/drawable/account_header_default.png deleted file mode 100644 index c4e44ad25..000000000 Binary files a/app/src/main/res/drawable/account_header_default.png and /dev/null differ diff --git a/app/src/main/res/drawable/account_header_missing.xml b/app/src/main/res/drawable/account_header_default.xml similarity index 100% rename from app/src/main/res/drawable/account_header_missing.xml rename to app/src/main/res/drawable/account_header_default.xml diff --git a/app/src/main/res/layout/activity_account.xml b/app/src/main/res/layout/activity_account.xml index aa2c996bc..ba7e8c41d 100644 --- a/app/src/main/res/layout/activity_account.xml +++ b/app/src/main/res/layout/activity_account.xml @@ -1,26 +1,25 @@ - + android:fitsSystemWindows="true" + android:orientation="vertical"> + android:theme="@style/AppTheme.Account.AppBarLayout"> + android:background="@drawable/account_header_default" + android:contentDescription="@null" + android:fitsSystemWindows="true" + android:scaleType="centerCrop" + app:layout_collapseMode="pin" /> + android:layout_height="wrap_content" + android:background="@drawable/account_header_gradient" + android:orientation="vertical" + android:paddingTop="?attr/actionBarSize" + app:layout_collapseMode="parallax"> + android:paddingTop="16dp"> + android:src="@drawable/avatar_default" + app:shadow="true" /> + android:orientation="vertical"> + android:textSize="18sp" + android:textStyle="normal|bold" /> + + android:maxLines="1" + android:textColor="?android:textColorSecondary" /> + android:contentDescription="@string/description_account_locked" + android:tint="?android:textColorSecondary" + android:visibility="gone" + app:srcCompat="@drawable/reblog_disabled_light" /> + android:paddingTop="10dp" + android:textColor="?android:textColorTertiary" /> @@ -125,9 +127,9 @@ android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" - android:background="@android:color/transparent" - android:layout_gravity="top" android:layout_alignParentTop="true" + android:layout_gravity="top" + android:background="@android:color/transparent" app:layout_collapseMode="pin" app:popupTheme="?attr/account_toolbar_popup_theme" /> @@ -136,16 +138,16 @@ + android:layout_height="wrap_content" + app:tabBackground="?android:colorBackground"> + android:visibility="visible" + app:layout_anchor="@id/tab_layout" + app:layout_anchorGravity="bottom" /> + android:contentDescription="@string/action_follow" + app:srcCompat="@drawable/ic_person_add_24dp" />