Some improvements
This commit is contained in:
parent
c0ea4723e5
commit
27acd3ec1d
|
@ -36,6 +36,6 @@
|
||||||
"accent_light":"#FF606984",
|
"accent_light":"#FF606984",
|
||||||
"background":"#FF000000",
|
"background":"#FF000000",
|
||||||
"background_dark":"#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.SearchView;
|
||||||
import androidx.appcompat.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
|
|
||||||
|
import android.util.Log;
|
||||||
import android.util.Patterns;
|
import android.util.Patterns;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
|
@ -284,15 +285,16 @@ public abstract class BaseMainActivity extends BaseActivity
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
|
final int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
|
||||||
int themeSwitcher;
|
|
||||||
switch (theme) {
|
switch (theme) {
|
||||||
case Helper.THEME_LIGHT:
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
themeSwitcher = R.style.AppThemeDark_NoActionBar;
|
setTheme(R.style.AppThemeDark_NoActionBar);
|
||||||
}
|
}
|
||||||
ThemeHelper.changeTheme(BaseMainActivity.this, themeSwitcher);
|
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
|
|
||||||
//Test if user is still log in
|
//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);
|
TextView account_type = findViewById(R.id.account_type);
|
||||||
account_bot = findViewById(R.id.account_bot);
|
account_bot = findViewById(R.id.account_bot);
|
||||||
addToList = null;
|
addToList = null;
|
||||||
switch (theme) {
|
account_pp.setBackgroundResource(R.drawable.account_pp_border);
|
||||||
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) {
|
if (b != null) {
|
||||||
account = b.getParcelable("account");
|
account = b.getParcelable("account");
|
||||||
if (account == null) {
|
if (account == null) {
|
||||||
|
|
|
@ -2000,11 +2000,12 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
if( holder.status_boosted_by_info != null && reblogColor != -1){
|
if( holder.status_boosted_by_info != null && reblogColor != -1){
|
||||||
holder.status_boosted_by_info.setBackgroundColor(reblogColor);
|
holder.status_boosted_by_info.setBackgroundColor(reblogColor);
|
||||||
}
|
}
|
||||||
int statusColor = prefs.getInt("theme_statuses_color", ThemeHelper.getAttColor(context, R.attr.cardviewColor));
|
int statusColor = prefs.getInt("theme_statuses_color", -1);
|
||||||
if( holder.main_card_container != null ) {
|
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));
|
holder.main_card_container.setCardBackgroundColor(ThemeHelper.getAttColor(context, R.attr.cardviewColor));
|
||||||
}
|
}
|
||||||
|
|
||||||
if( holder.main_linear_container != null && statusColor != -1 ){
|
if( holder.main_linear_container != null && statusColor != -1 ){
|
||||||
holder.main_linear_container.setBackgroundColor(statusColor);
|
holder.main_linear_container.setBackgroundColor(statusColor);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
<stroke
|
<stroke
|
||||||
android:width="2dp"
|
android:width="2dp"
|
||||||
android:color="#ff000000" />
|
android:color="@color/transparent" />
|
||||||
|
|
||||||
<corners android:radius="4dp" />
|
<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
|
<stroke
|
||||||
android:width="1dip"
|
android:width="1dip"
|
||||||
android:color="@color/mastodonC4" />
|
android:color="@color/mastodonC4" />
|
||||||
<corners android:radius="2dp"></corners>
|
<corners android:radius="2dp"/>
|
||||||
<padding
|
<padding
|
||||||
android:bottom="1dip"
|
android:bottom="1dip"
|
||||||
android:left="4dip"
|
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_width="100dp"
|
||||||
android:layout_height="100dp"
|
android:layout_height="100dp"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
android:background="@drawable/account_pp_border_light"
|
android:background="@drawable/account_pp_border"
|
||||||
android:contentDescription="@string/profile_picture"
|
android:contentDescription="@string/profile_picture"
|
||||||
android:padding="2dp"
|
android:padding="2dp"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/banner_pp"
|
app:layout_constraintBottom_toBottomOf="@id/banner_pp"
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
android:layout_height="100dp"
|
android:layout_height="100dp"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
style="@style/Widget.AppCompat.Button.Colored"
|
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:contentDescription="@string/profile_picture"
|
||||||
android:padding="2dp"
|
android:padding="2dp"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/banner_pp"
|
app:layout_constraintBottom_toBottomOf="@id/banner_pp"
|
||||||
|
|
Loading…
Reference in New Issue