Rewrote Theme

This commit is contained in:
NoodleMage
2016-03-12 14:22:40 +01:00
committed by NoodleMage
parent 98d420d5aa
commit 5ef5f9b45f
112 changed files with 1078 additions and 1536 deletions
@@ -71,6 +71,7 @@ public class ReaderActivity extends BaseRxActivity<ReaderPresenter> {
@Override
public void onCreate(Bundle savedState) {
setTheme(R.style.Theme_Reader);
super.onCreate(savedState);
setContentView(R.layout.activity_reader);
ButterKnife.bind(this);
@@ -85,6 +86,7 @@ public class ReaderActivity extends BaseRxActivity<ReaderPresenter> {
initializeSettings();
maxBitmapSize = GLUtil.getMaxTextureSize();
}
@@ -393,12 +395,12 @@ public class ReaderActivity extends BaseRxActivity<ReaderPresenter> {
View rootView = getWindow().getDecorView().getRootView();
if (theme == BLACK_THEME) {
rootView.setBackgroundColor(Color.BLACK);
pageNumber.setTextColor(ContextCompat.getColor(this, R.color.light_grey));
pageNumber.setBackgroundColor(ContextCompat.getColor(this, R.color.page_number_background_black));
pageNumber.setTextColor(ContextCompat.getColor(this, R.color.textColorPrimaryDark));
pageNumber.setBackgroundColor(ContextCompat.getColor(this, R.color.backgroundDark));
} else {
rootView.setBackgroundColor(Color.WHITE);
pageNumber.setTextColor(ContextCompat.getColor(this, R.color.primary_text));
pageNumber.setBackgroundColor(ContextCompat.getColor(this, R.color.page_number_background));
pageNumber.setTextColor(ContextCompat.getColor(this, R.color.textColorPrimaryLight));
pageNumber.setBackgroundColor(ContextCompat.getColor(this, R.color.backgroundLight));
}
}
@@ -17,8 +17,8 @@ import eu.kanade.tachiyomi.ui.reader.ReaderActivity
class PageDecodeErrorLayout(context: Context) : LinearLayout(context) {
private val lightGreyColor = ContextCompat.getColor(context, R.color.light_grey)
private val blackColor = ContextCompat.getColor(context, R.color.primary_text)
private val lightGreyColor = ContextCompat.getColor(context, android.R.attr.textColorHint)
private val blackColor = ContextCompat.getColor(context, android.R.attr.textColorPrimary)
init {
orientation = LinearLayout.VERTICAL
@@ -74,12 +74,12 @@ class PagerReaderFragment : BaseFragment() {
/**
* Text color for black theme.
*/
private val lightGreyColor by lazy { ContextCompat.getColor(context, R.color.light_grey) }
private val lightGreyColor by lazy { ContextCompat.getColor(context, R.color.textColorHintDark) }
/**
* Text color for white theme.
*/
private val blackColor by lazy { ContextCompat.getColor(context, R.color.primary_text) }
private val blackColor by lazy { ContextCompat.getColor(context, R.color.textColorHintLight) }
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedState: Bundle?): View? {
return inflater.inflate(R.layout.item_pager_reader, container, false)