Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/src/main/java/com/foobnix/model/AppState.java
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ public class AppState {
public boolean isShowPanelBookNameScrollMode = true;
public boolean isShowPanelBookNameBookMode = false;
public boolean isShowReadingProgress = true;
public boolean isShowBottomSeekBar = true;
public boolean isShowChaptersOnProgress = true;
public boolean isShowSubChaptersOnProgress = true;
public int antiAliasLevel = 8;//0-8
Expand Down
11 changes: 11 additions & 0 deletions app/src/main/java/com/foobnix/pdf/info/view/DragingDialogs.java
Original file line number Diff line number Diff line change
Expand Up @@ -3295,6 +3295,7 @@ public static void dialogStatusBarSettings(final FrameLayout anchor,
View inflate = inflater.inflate(R.layout.dialog_status_bar_settings, null, false);

final CheckBox isShowReadingProgress = inflate.findViewById(R.id.isShowReadingProgress);
final CheckBox isShowBottomSeekBar = inflate.findViewById(R.id.isShowBottomSeekBar);
final CheckBox isShowChaptersOnProgress = inflate.findViewById(R.id.isShowChaptersOnProgress);
final CheckBox isShowSubChaptersOnProgress = inflate.findViewById(R.id.isShowSubChaptersOnProgress);

Expand All @@ -3316,6 +3317,16 @@ public static void dialogStatusBarSettings(final FrameLayout anchor,
}
});

isShowBottomSeekBar.setChecked(AppState.get().isShowBottomSeekBar);
isShowBottomSeekBar.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
AppState.get().isShowBottomSeekBar = isChecked;
if (onRefresh != null) {
onRefresh.run();
}
}
});

isShowChaptersOnProgress.setChecked(AppState.get().isShowChaptersOnProgress);
isShowChaptersOnProgress.setEnabled(AppState.get().isShowReadingProgress);
isShowChaptersOnProgress.setOnCheckedChangeListener(new OnCheckedChangeListener() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public boolean onMenuItemClick(MenuItem item) {
batteryIcon, fullscreen, onTextReplacement;
ImageView showSearch, nextScreenType, moveCenter, autoScroll, textToSpeach, onModeChange, imageMenuArrow, editTop2,
goToPage1, goToPage1Top;
View titleBar, overlay, menuLayout, moveLeft, moveRight, bottomBar, onCloseBook, seekSpeedLayot, zoomPlus,
View titleBar, overlay, menuLayout, moveLeft, moveRight, bottomBar, seekLine, onCloseBook, seekSpeedLayot, zoomPlus,
zoomMinus;
public View.OnLongClickListener onCloseLongClick = new View.OnLongClickListener() {

Expand Down Expand Up @@ -327,19 +327,20 @@ public void onClick(final View v) {

@Override
public void onStopTrackingTouch(final SeekBar seekBar) {
showHideHistory();
}

@Override
public void onStartTrackingTouch(final SeekBar seekBar) {
dc.getLinkHistory().add(dc.getCurentPageFirst1());
}

@Override
public void onProgressChanged(final SeekBar seekBar, final int progress, final boolean fromUser) {

dc.onGoToPage(progress + 1);

if (fromUser) {
dc.onGoToPage(progress + 1);
}
Apps.accessibilityText(a, a.getString(R.string.m_current_page) + " " + dc.getCurentPageFirst1());
//updateUI();
}
};
public View.OnClickListener onShowHideEditPanel = new View.OnClickListener() {
Expand Down Expand Up @@ -1231,6 +1232,7 @@ public void run() {
pagesCountIndicator.setVisibility(View.GONE);

currentSeek = (TextView) a.findViewById(R.id.currentSeek);
seekLine = a.findViewById(R.id.seekLine);
maxSeek = (TextView) a.findViewById(R.id.maxSeek);
bookName = (TextView) a.findViewById(R.id.bookName);

Expand Down Expand Up @@ -1796,13 +1798,15 @@ public void onClick(final View arg0) {
};

public void show() {
showHideHistory();
menuLayout.setVisibility(View.VISIBLE);

titleBar.setVisibility(View.VISIBLE);

updateLock();

bottomBar.setVisibility(View.VISIBLE);
seekLine.setVisibility(AppState.get().isShowBottomSeekBar ? View.VISIBLE : View.GONE);
//adFrame.setVisibility(View.VISIBLE);
// adFrame.setClickable(true);
// adFrame.setTag(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ public class HorizontalViewActivity extends AdsFragmentActivity {
volatile Boolean isInitPosistion = null;
volatile int isInitOrientation;
ProgressDraw progressDraw;
View seekLine;
LinearLayout pageshelper;
String quickBookmark;
ClickUtils clickUtils;
Expand Down Expand Up @@ -407,6 +408,7 @@ public void run() {
moveCenter = findViewById(R.id.moveCenter);

currentSeek = (TextView) findViewById(R.id.currentSeek);
seekLine = findViewById(R.id.seekLine);
maxSeek = (TextView) findViewById(R.id.maxSeek);

toastBrightnessText = (TextView) findViewById(R.id.toastBrightnessText);
Expand Down Expand Up @@ -2091,6 +2093,10 @@ public void hideShow(boolean animated) {
updateBannnerTop();
showPagesHelper();

if (seekLine != null) {
seekLine.setVisibility(AppState.get().isEditMode && AppState.get().isShowBottomSeekBar ? View.VISIBLE : View.GONE);
}

if (prev == AppState.get().isEditMode) {
return;
}
Expand All @@ -2103,6 +2109,9 @@ public void hideShow(boolean animated) {
if (!animated || AppState.get().appTheme == AppState.THEME_INK) {
actionBar.setVisibility(AppState.get().isEditMode ? View.VISIBLE : View.GONE);
bottomBar.setVisibility(AppState.get().isEditMode ? View.VISIBLE : View.GONE);
if (seekLine != null) {
seekLine.setVisibility(AppState.get().isEditMode && AppState.get().isShowBottomSeekBar ? View.VISIBLE : View.GONE);
}
//adFrame.setVisibility(AppState.get().isEditMode ? View.VISIBLE : View.GONE);

DocumentController.chooseFullScreen(this, AppState.get().fullScreenMode);
Expand Down Expand Up @@ -2144,6 +2153,9 @@ public void onAnimationEnd(final Animation animation) {
try {
actionBar.setVisibility(View.VISIBLE);
bottomBar.setVisibility(View.VISIBLE);
if (seekLine != null) {
seekLine.setVisibility(AppState.get().isShowBottomSeekBar ? View.VISIBLE : View.GONE);
}
//adFrame.setVisibility(View.VISIBLE);
///adFrame.setTag(null);

Expand Down Expand Up @@ -2498,10 +2510,12 @@ private void updateAnimation(final TranslateAnimation a) {

@Override
public void onStopTrackingTouch(final SeekBar seekBar) {
showHideHistory();
}

@Override
public void onStartTrackingTouch(final SeekBar seekBar) {
dc.getLinkHistory().add(dc.getCurentPageFirst1());
}

@Override
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/layout/dialog_status_bar_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@
android:layout_marginLeft="10dip"
android:text="@string/show_book_title" />

<CheckBox
android:id="@+id/isShowBottomSeekBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dip"
android:text="@string/show_reading_slider" />

<CheckBox
android:id="@+id/isShowReadingProgress"
android:layout_width="wrap_content"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/document_footer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
</LinearLayout>

<LinearLayout
android:id="@+id/seekLine"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
<string name="status_bar">Status Bar</string>
<string name="show_status_bar">Show status bar</string>
<string name="show_progress_of_reading">Enable progress bar</string>
<string name="show_reading_slider">Show progress slider</string>
<string name="enable_rewind_of_pages_using_the_read_progress_line">Navigate by sliding across status bar</string>
<string name="text_size">Font size</string>
<string name="line_height">Progress bar height</string>
Expand Down