Some improvements
This commit is contained in:
parent
c0ea4723e5
commit
27acd3ec1d
|
@ -36,6 +36,6 @@
|
|||
"accent_light":"#FF606984",
|
||||
"background":"#FF000000",
|
||||
"background_dark":"#FF000000",
|
||||
"background_light":"#FF000000",
|
||||
"background_light":"#FF000000"
|
||||
}
|
||||
]
|
|
@ -59,6 +59,7 @@ import androidx.appcompat.widget.PopupMenu;
|
|||
import androidx.appcompat.widget.SearchView;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
|
||||
import android.util.Log;
|
||||
import android.util.Patterns;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
|
@ -284,15 +285,16 @@ public abstract class BaseMainActivity extends BaseActivity
|
|||
return;
|
||||
}
|
||||
final int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
|
||||
int themeSwitcher;
|
||||
switch (theme) {
|
||||
case Helper.THEME_LIGHT:
|
||||
themeSwitcher = R.style.AppTheme_NoActionBar_Fedilab;
|
||||
setTheme(R.style.AppTheme_NoActionBar_Fedilab);
|
||||
break;
|
||||
case Helper.THEME_BLACK:
|
||||
setTheme(R.style.AppThemeBlack_NoActionBar);
|
||||
break;
|
||||
default:
|
||||
themeSwitcher = R.style.AppThemeDark_NoActionBar;
|
||||
setTheme(R.style.AppThemeDark_NoActionBar);
|
||||
}
|
||||
ThemeHelper.changeTheme(BaseMainActivity.this, themeSwitcher);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
//Test if user is still log in
|
||||
|
|
|
@ -207,18 +207,7 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt
|
|||
TextView account_type = findViewById(R.id.account_type);
|
||||
account_bot = findViewById(R.id.account_bot);
|
||||
addToList = null;
|
||||
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;
|
||||
}
|
||||
|
||||
account_pp.setBackgroundResource(R.drawable.account_pp_border);
|
||||
if (b != null) {
|
||||
account = b.getParcelable("account");
|
||||
if (account == null) {
|
||||
|
|
|
@ -2000,11 +2000,12 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
if( holder.status_boosted_by_info != null && reblogColor != -1){
|
||||
holder.status_boosted_by_info.setBackgroundColor(reblogColor);
|
||||
}
|
||||
int statusColor = prefs.getInt("theme_statuses_color", ThemeHelper.getAttColor(context, R.attr.cardviewColor));
|
||||
if( holder.main_card_container != null ) {
|
||||
int statusColor = prefs.getInt("theme_statuses_color", -1);
|
||||
if( holder.main_card_container != null && statusColor != -1) {
|
||||
holder.main_card_container.setCardBackgroundColor(statusColor);
|
||||
}else if(holder.main_card_container != null){
|
||||
holder.main_card_container.setCardBackgroundColor(ThemeHelper.getAttColor(context, R.attr.cardviewColor));
|
||||
}
|
||||
|
||||
if( holder.main_linear_container != null && statusColor != -1 ){
|
||||
holder.main_linear_container.setBackgroundColor(statusColor);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<stroke
|
||||
android:width="2dp"
|
||||
android:color="#ff000000" />
|
||||
android:color="@color/transparent" />
|
||||
|
||||
<corners android:radius="4dp" />
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?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>
|
|
@ -1,18 +0,0 @@
|
|||
<?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="#ffffffff" />
|
||||
|
||||
<corners android:radius="4dp" />
|
||||
|
||||
<padding
|
||||
android:bottom="2dp"
|
||||
android:left="2dp"
|
||||
android:right="2dp"
|
||||
android:top="2dp" />
|
||||
|
||||
</shape>
|
|
@ -4,7 +4,7 @@
|
|||
<stroke
|
||||
android:width="1dip"
|
||||
android:color="@color/mastodonC4" />
|
||||
<corners android:radius="2dp"></corners>
|
||||
<corners android:radius="2dp"/>
|
||||
<padding
|
||||
android:bottom="1dip"
|
||||
android:left="4dip"
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@color/mastodonC4" />
|
||||
</selector>
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@color/mastodonC4_" android:state_pressed="true" />
|
||||
<item android:drawable="@color/mastodonC4__" android:state_enabled="false" />
|
||||
<item android:drawable="@color/mastodonC4" />
|
||||
</selector>
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@color/black_button_pressed" android:state_pressed="true" />
|
||||
<item android:drawable="@color/black_button_disabled" android:state_enabled="false" />
|
||||
<item android:drawable="@color/dark_icon" />
|
||||
</selector>
|
|
@ -62,7 +62,7 @@
|
|||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_margin="10dp"
|
||||
android:background="@drawable/account_pp_border_light"
|
||||
android:background="@drawable/account_pp_border"
|
||||
android:contentDescription="@string/profile_picture"
|
||||
android:padding="2dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/banner_pp"
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
android:layout_height="100dp"
|
||||
android:layout_margin="10dp"
|
||||
style="@style/Widget.AppCompat.Button.Colored"
|
||||
android:background="@drawable/account_pp_border_light"
|
||||
android:background="@drawable/account_pp_border"
|
||||
android:contentDescription="@string/profile_picture"
|
||||
android:padding="2dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/banner_pp"
|
||||
|
|
Loading…
Reference in New Issue