Skip to content

Commit

Permalink
Merge branch 'chris-dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscarman-mp committed Dec 15, 2021
2 parents 55d2e35 + 3c7a576 commit 10df3a8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
24 changes: 12 additions & 12 deletions folioreader/res/layout/folio_page_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@
android:paddingBottom="2dp"
android:visibility="visible">

<TextView
android:id="@+id/minutesLeft"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#888888"
android:textSize="12sp" />
<!-- <TextView-->
<!-- android:id="@+id/minutesLeft"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:textColor="#888888"-->
<!-- android:textSize="12sp" />-->

<TextView
android:id="@+id/pagesLeft"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#bbbbbb"
android:textSize="13sp" />
<!-- <TextView-->
<!-- android:id="@+id/pagesLeft"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:textColor="#bbbbbb"-->
<!-- android:textSize="13sp" />-->
</LinearLayout>
</RelativeLayout>
6 changes: 3 additions & 3 deletions folioreader/src/main/java/com/folioreader/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class Config implements Parcelable {
private int themeColor = DEFAULT_THEME_COLOR_INT;
private int nightThemeColor = themeColor;
private boolean showTts = true;
private boolean showTextSelection = true;
private boolean showTextSelection = false;
private AllowedDirection allowedDirection = DEFAULT_ALLOWED_DIRECTION;
private Direction direction = DEFAULT_DIRECTION;
private boolean showRemainingIndicator = false;
Expand Down Expand Up @@ -136,7 +136,7 @@ private void setDefaults() {
allowedDirection = DEFAULT_ALLOWED_DIRECTION;
direction = DEFAULT_DIRECTION;
showRemainingIndicator = false;
showTextSelection = true;
showTextSelection = false;
}

@SuppressWarnings("unchecked")
Expand All @@ -161,7 +161,7 @@ public Config(JSONObject obj) {
themeColor = getValidColorInt(getJsonItem(obj, CONFIG_THEME_COLOR_INT, DEFAULT_THEME_COLOR_INT));
nightThemeColor = getValidColorInt(getJsonItem(obj, CONFIG_NIGHT_THEME_COLOR_INT, DEFAULT_THEME_COLOR_INT));
showTts = getJsonItem(obj, CONFIG_IS_TTS, true);
showTextSelection = getJsonItem(obj, CONFIG_TEXT_SELECTION, true);
showTextSelection = getJsonItem(obj, CONFIG_TEXT_SELECTION, false);
allowedDirection = getAllowedDirectionFromString(
LOG_TAG,
getJsonItem(obj, CONFIG_ALLOWED_DIRECTION, DEFAULT_ALLOWED_DIRECTION.toString())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ class FolioPageFragment : Fragment(),
highlightStyle =
HighlightImpl.HighlightStyle.classForStyle(HighlightImpl.HighlightStyle.Normal)
mRootView = inflater.inflate(R.layout.folio_page_fragment, container, false)
mPagesLeftTextView = mRootView!!.findViewById<View>(R.id.pagesLeft) as TextView
mMinutesLeftTextView = mRootView!!.findViewById<View>(R.id.minutesLeft) as TextView
// mPagesLeftTextView = mRootView!!.findViewById<View>(R.id.pagesLeft) as TextView
// mMinutesLeftTextView = mRootView!!.findViewById<View>(R.id.minutesLeft) as TextView

mConfig = AppUtil.getSavedConfig(context)

Expand Down Expand Up @@ -515,7 +515,7 @@ class FolioPageFragment : Fragment(),
if (!urlOfEpub) {
// Otherwise, give the default behavior (open in browser)
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
startActivity(intent)
// startActivity(intent)
}

return true
Expand Down Expand Up @@ -732,8 +732,8 @@ class FolioPageFragment : Fragment(),
getString(R.string.less_than_minute)
}

mMinutesLeftTextView!!.text = minutesRemainingStr
mPagesLeftTextView!!.text = pagesRemainingStr
// mMinutesLeftTextView!!.text = minutesRemainingStr
// mPagesLeftTextView!!.text = pagesRemainingStr
} catch (exp: java.lang.ArithmeticException) {
Log.e("divide error", exp.toString())
} catch (exp: IllegalStateException) {
Expand Down

0 comments on commit 10df3a8

Please sign in to comment.