mirror of
https://github.com/MinimalBible/MinimalBible
synced 2024-11-24 17:08:18 -05:00
Add some cosmetic tweaks
Text size and color mostly
This commit is contained in:
parent
320159f1bd
commit
3d1e34e586
@ -106,8 +106,9 @@ public class BibleViewerModules {
|
|||||||
@Provides
|
@Provides
|
||||||
@Named("MainAdapter")
|
@Named("MainAdapter")
|
||||||
@Singleton
|
@Singleton
|
||||||
BookAdapter bookAdapter(@Named("MainBook") Book b, VerseLookup v) {
|
BookAdapter bookAdapter(@Named("MainBook") Book b, VerseLookup v,
|
||||||
return new BookAdapter(b, v);
|
BibleViewerPreferences prefs) {
|
||||||
|
return new BookAdapter(b, v, prefs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package org.bspeice.minimalbible.activity.viewer;
|
package org.bspeice.minimalbible.activity.viewer;
|
||||||
|
|
||||||
|
import de.devland.esperandro.annotations.Default;
|
||||||
import de.devland.esperandro.annotations.SharedPreferences;
|
import de.devland.esperandro.annotations.SharedPreferences;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -10,4 +11,9 @@ public interface BibleViewerPreferences {
|
|||||||
|
|
||||||
String defaultBookName();
|
String defaultBookName();
|
||||||
void defaultBookName(String defaultBookName);
|
void defaultBookName(String defaultBookName);
|
||||||
|
|
||||||
|
@Default(ofInt = 14)
|
||||||
|
int baseTextSize();
|
||||||
|
|
||||||
|
void baseTextSize(int baseTextSize);
|
||||||
}
|
}
|
||||||
|
@ -17,13 +17,15 @@ import android.text.style.StyleSpan
|
|||||||
import android.graphics.Typeface
|
import android.graphics.Typeface
|
||||||
import android.text.style.SuperscriptSpan
|
import android.text.style.SuperscriptSpan
|
||||||
import android.text.style.RelativeSizeSpan
|
import android.text.style.RelativeSizeSpan
|
||||||
|
import android.util.TypedValue
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adapter used for displaying a book
|
* Adapter used for displaying a book
|
||||||
* Displays one chapter at a time,
|
* Displays one chapter at a time,
|
||||||
* as each TextView widget is it's own line break
|
* as each TextView widget is it's own line break
|
||||||
*/
|
*/
|
||||||
class BookAdapter(val b: Book, val lookup: VerseLookup)
|
class BookAdapter(val b: Book, val lookup: VerseLookup,
|
||||||
|
val prefs: BibleViewerPreferences)
|
||||||
: RecyclerView.Adapter<PassageView>() {
|
: RecyclerView.Adapter<PassageView>() {
|
||||||
|
|
||||||
val versification = b.getVersification()
|
val versification = b.getVersification()
|
||||||
@ -76,6 +78,9 @@ class BookAdapter(val b: Book, val lookup: VerseLookup)
|
|||||||
val emptyView = LayoutInflater.from(parent?.getContext())
|
val emptyView = LayoutInflater.from(parent?.getContext())
|
||||||
.inflate(R.layout.viewer_passage_view, parent, false) as TextView
|
.inflate(R.layout.viewer_passage_view, parent, false) as TextView
|
||||||
|
|
||||||
|
// TODO: Prefs object for handling this?
|
||||||
|
emptyView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16f)
|
||||||
|
|
||||||
val passage = PassageView(emptyView, b, lookup)
|
val passage = PassageView(emptyView, b, lookup)
|
||||||
return passage
|
return passage
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:orientation="vertical"
|
android:id="@+id/passage"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:id="@+id/passage" />
|
android:orientation="vertical"
|
||||||
|
android:textColor="@color/content_text" />
|
||||||
|
@ -4,4 +4,5 @@
|
|||||||
<color name="actionbar">#ffffff</color>
|
<color name="actionbar">#ffffff</color>
|
||||||
<color name="navbar_highlight">#cc0000</color>
|
<color name="navbar_highlight">#cc0000</color>
|
||||||
<color name="navbar_unhighlighted">#000000</color>
|
<color name="navbar_unhighlighted">#000000</color>
|
||||||
|
<color name="content_text">#000000</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user