move locked account icon to the end of username

This commit is contained in:
Kasun 2019-04-21 14:21:37 +05:30
parent 22a1c12159
commit b6deaf7212
2 changed files with 7 additions and 7 deletions

View File

@ -262,9 +262,9 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK); int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
accountUrl = account.getUrl(); accountUrl = account.getUrl();
if( theme == Helper.THEME_BLACK){ if( theme == Helper.THEME_BLACK){
changeDrawableColor(getApplicationContext(), R.drawable.ic_lock_outline,R.color.dark_icon); changeDrawableColor(getApplicationContext(), R.drawable.ic_lock_outline,R.color.black);
}else { }else {
changeDrawableColor(getApplicationContext(), R.drawable.ic_lock_outline,R.color.mastodonC4); changeDrawableColor(getApplicationContext(), R.drawable.ic_lock_outline,R.color.mastodonC3);
} }
String accountIdRelation = accountId; String accountIdRelation = accountId;
if( MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PEERTUBE) { if( MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PEERTUBE) {
@ -309,10 +309,10 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt
if(account.isLocked()){ if(account.isLocked()){
Drawable img = ContextCompat.getDrawable(getApplicationContext(), R.drawable.ic_lock_outline); Drawable img = ContextCompat.getDrawable(getApplicationContext(), R.drawable.ic_lock_outline);
assert img != null; assert img != null;
img.setBounds(0,0,(int) (20 * scale + 0.5f),(int) (20 * scale + 0.5f)); img.setBounds(0,0,(int) (16 * scale + 0.5f),(int) (16 * scale + 0.5f));
account_dn.setCompoundDrawables( img, null, null, null); account_un.setCompoundDrawables( null, null, img, null);
}else{ }else{
account_dn.setCompoundDrawables( null, null, null, null); account_un.setCompoundDrawables( null, null, null, null);
} }
//Peertube account watched by a Mastodon account //Peertube account watched by a Mastodon account

View File

@ -135,14 +135,14 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="1" android:maxLines="1"
android:textSize="16sp" android:textSize="18sp"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
<TextView <TextView
android:textColor="?attr/color_in_account_header" android:textColor="?attr/color_in_account_header"
android:id="@+id/account_un" android:id="@+id/account_un"
android:maxLines="1" android:maxLines="1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:textSize="14sp" android:textSize="16sp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> />
<TextView <TextView