Change drawable borders

This commit is contained in:
tom79 2019-08-03 10:35:04 +02:00
parent 871bf8877e
commit e6fe5f59c2
7 changed files with 57 additions and 6 deletions

View File

@ -1,11 +1,11 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
compileSdkVersion 29
buildToolsVersion "29.0.0"
defaultConfig {
minSdkVersion 18
targetSdkVersion 28
targetSdkVersion 29
versionCode 298
versionName "2.13.0-beta-1"
multiDexEnabled true
@ -54,7 +54,7 @@ allprojects {
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
}
ext.supportLibraryVersion = '28.0.0'
ext.supportLibraryVersion = '29.0.0'
ext.glideLibraryVersion = '4.9.0'
ext.conscryptLibraryVersion = '2.1.0'
ext.evernoteLibraryVersion = '1.3.0-rc1'

View File

@ -105,6 +105,9 @@ import app.fedilab.android.interfaces.OnRetrieveFeedsAccountInterface;
import app.fedilab.android.interfaces.OnRetrieveFeedsInterface;
import app.fedilab.android.interfaces.OnRetrieveRelationshipInterface;
import static app.fedilab.android.helper.Helper.THEME_BLACK;
import static app.fedilab.android.helper.Helper.THEME_DARK;
import static app.fedilab.android.helper.Helper.THEME_LIGHT;
import static app.fedilab.android.helper.Helper.changeDrawableColor;
@ -183,6 +186,18 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt
account_un = findViewById(R.id.account_un);
account_type = findViewById(R.id.account_type);
account_bot = findViewById(R.id.account_bot);
switch (theme){
case THEME_LIGHT:
account_pp.setBackgroundResource(R.drawable.account_pp_border_light);
break;
case THEME_DARK:
account_pp.setBackgroundResource(R.drawable.account_pp_border_dark);
break;
case THEME_BLACK:
account_pp.setBackgroundResource(R.drawable.account_pp_border_black);
break;
}
if(b != null){
account = b.getParcelable("account");
if( account == null){

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@null" />
<stroke
android:width="2dp"
android:color="#ff000000" />
<corners android:radius="4dp" />
<padding
android:bottom="2dp"
android:left="2dp"
android:right="2dp"
android:top="2dp" />
</shape>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@null" />
<stroke
android:width="2dp"
android:color="@color/mastodonC1" />
<corners android:radius="4dp" />
<padding
android:bottom="2dp"
android:left="2dp"
android:right="2dp"
android:top="2dp" />
</shape>

View File

@ -61,7 +61,7 @@
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="10dp"
android:background="@drawable/account_pp_border"
android:background="@drawable/account_pp_border_light"
android:contentDescription="@string/profile_picture"
android:padding="2dp"
app:layout_constraintBottom_toBottomOf="@id/banner_pp"

View File

@ -60,7 +60,7 @@
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="10dp"
android:background="@drawable/account_pp_border"
android:background="@drawable/account_pp_border_light"
android:contentDescription="@string/profile_picture"
android:padding="2dp"
app:layout_constraintBottom_toBottomOf="@id/banner_pp"