always show the sidebar info bubble at scrolling by handle
This commit is contained in:
parent
32b9a5db08
commit
c3afe2b6d3
8 changed files with 7 additions and 59 deletions
|
@ -78,7 +78,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:5.29.5'
|
||||
implementation 'com.simplemobiletools:commons:5.29.7'
|
||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
|
||||
implementation 'androidx.multidex:multidex:2.0.1'
|
||||
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
||||
|
|
|
@ -84,7 +84,6 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
private var mStoredCropThumbnails = true
|
||||
private var mStoredScrollHorizontally = true
|
||||
private var mStoredShowMediaCount = true
|
||||
private var mStoredShowInfoBubble = true
|
||||
private var mStoredTextColor = 0
|
||||
private var mStoredPrimaryColor = 0
|
||||
|
||||
|
@ -204,8 +203,6 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
|
||||
directories_horizontal_fastscroller.updateBubbleColors()
|
||||
directories_vertical_fastscroller.updateBubbleColors()
|
||||
directories_horizontal_fastscroller.allowBubbleDisplay = config.showInfoBubble
|
||||
directories_vertical_fastscroller.allowBubbleDisplay = config.showInfoBubble
|
||||
directories_refresh_layout.isEnabled = config.enablePullToRefresh
|
||||
|
||||
directories_empty_placeholder.setTextColor(config.textColor)
|
||||
|
@ -343,7 +340,6 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
mStoredCropThumbnails = cropThumbnails
|
||||
mStoredScrollHorizontally = scrollHorizontally
|
||||
mStoredShowMediaCount = showMediaCount
|
||||
mStoredShowInfoBubble = showInfoBubble
|
||||
mStoredTextColor = textColor
|
||||
mStoredPrimaryColor = primaryColor
|
||||
}
|
||||
|
@ -1177,12 +1173,10 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
directories_horizontal_fastscroller.beVisibleIf(allowHorizontalScroll)
|
||||
|
||||
if (allowHorizontalScroll) {
|
||||
directories_horizontal_fastscroller.allowBubbleDisplay = config.showInfoBubble
|
||||
directories_horizontal_fastscroller.setViews(directories_grid, directories_refresh_layout) {
|
||||
directories_horizontal_fastscroller.updateBubbleText(getBubbleTextItem(it))
|
||||
}
|
||||
} else {
|
||||
directories_vertical_fastscroller.allowBubbleDisplay = config.showInfoBubble
|
||||
directories_vertical_fastscroller.setViews(directories_grid, directories_refresh_layout) {
|
||||
directories_vertical_fastscroller.updateBubbleText(getBubbleTextItem(it))
|
||||
}
|
||||
|
|
|
@ -76,7 +76,6 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
|||
private var mStoredAnimateGifs = true
|
||||
private var mStoredCropThumbnails = true
|
||||
private var mStoredScrollHorizontally = true
|
||||
private var mStoredShowInfoBubble = true
|
||||
private var mStoredShowFileTypes = true
|
||||
private var mStoredTextColor = 0
|
||||
private var mStoredPrimaryColor = 0
|
||||
|
@ -159,8 +158,6 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
|||
|
||||
media_horizontal_fastscroller.updateBubbleColors()
|
||||
media_vertical_fastscroller.updateBubbleColors()
|
||||
media_horizontal_fastscroller.allowBubbleDisplay = config.showInfoBubble
|
||||
media_vertical_fastscroller.allowBubbleDisplay = config.showInfoBubble
|
||||
media_refresh_layout.isEnabled = config.enablePullToRefresh
|
||||
media_empty_text_placeholder.setTextColor(config.textColor)
|
||||
media_empty_text_placeholder_2.setTextColor(getAdjustedPrimaryColor())
|
||||
|
@ -294,7 +291,6 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
|||
mStoredAnimateGifs = animateGifs
|
||||
mStoredCropThumbnails = cropThumbnails
|
||||
mStoredScrollHorizontally = scrollHorizontally
|
||||
mStoredShowInfoBubble = showInfoBubble
|
||||
mStoredShowFileTypes = showThumbnailFileTypes
|
||||
mStoredTextColor = textColor
|
||||
mStoredPrimaryColor = primaryColor
|
||||
|
@ -426,12 +422,10 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
|||
|
||||
val sorting = config.getFolderSorting(if (mShowAll) SHOW_ALL else mPath)
|
||||
if (allowHorizontalScroll) {
|
||||
media_horizontal_fastscroller.allowBubbleDisplay = config.showInfoBubble
|
||||
media_horizontal_fastscroller.setViews(media_grid, media_refresh_layout) {
|
||||
media_horizontal_fastscroller.updateBubbleText(getBubbleTextItem(it, sorting))
|
||||
}
|
||||
} else {
|
||||
media_vertical_fastscroller.allowBubbleDisplay = config.showInfoBubble
|
||||
media_vertical_fastscroller.setViews(media_grid, media_refresh_layout) {
|
||||
media_vertical_fastscroller.updateBubbleText(getBubbleTextItem(it, sorting))
|
||||
}
|
||||
|
|
|
@ -218,12 +218,10 @@ class SearchActivity : SimpleActivity(), MediaOperationsListener {
|
|||
|
||||
val sorting = config.getFolderSorting(SHOW_ALL)
|
||||
if (allowHorizontalScroll) {
|
||||
media_horizontal_fastscroller.allowBubbleDisplay = config.showInfoBubble
|
||||
media_horizontal_fastscroller.setViews(media_grid) {
|
||||
media_horizontal_fastscroller.updateBubbleText(getBubbleTextItem(it, sorting))
|
||||
}
|
||||
} else {
|
||||
media_vertical_fastscroller.allowBubbleDisplay = config.showInfoBubble
|
||||
media_vertical_fastscroller.setViews(media_grid) {
|
||||
media_vertical_fastscroller.updateBubbleText(getBubbleTextItem(it, sorting))
|
||||
}
|
||||
|
|
|
@ -70,7 +70,6 @@ class SettingsActivity : SimpleActivity() {
|
|||
setupThumbnailFileTypes()
|
||||
setupShowMediaCount()
|
||||
setupKeepLastModified()
|
||||
setupShowInfoBubble()
|
||||
setupEnablePullToRefresh()
|
||||
setupAllowZoomingImages()
|
||||
setupShowHighestQuality()
|
||||
|
@ -428,14 +427,6 @@ class SettingsActivity : SimpleActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun setupShowInfoBubble() {
|
||||
settings_show_info_bubble.isChecked = config.showInfoBubble
|
||||
settings_show_info_bubble_holder.setOnClickListener {
|
||||
settings_show_info_bubble.toggle()
|
||||
config.showInfoBubble = settings_show_info_bubble.isChecked
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupEnablePullToRefresh() {
|
||||
settings_enable_pull_to_refresh.isChecked = config.enablePullToRefresh
|
||||
settings_enable_pull_to_refresh_holder.setOnClickListener {
|
||||
|
@ -650,7 +641,6 @@ class SettingsActivity : SimpleActivity() {
|
|||
put(CROP_THUMBNAILS, config.cropThumbnails)
|
||||
put(SHOW_THUMBNAIL_VIDEO_DURATION, config.showThumbnailVideoDuration)
|
||||
put(SHOW_MEDIA_COUNT, config.showMediaCount)
|
||||
put(SHOW_INFO_BUBBLE, config.showInfoBubble)
|
||||
put(SCROLL_HORIZONTALLY, config.scrollHorizontally)
|
||||
put(ENABLE_PULL_TO_REFRESH, config.enablePullToRefresh)
|
||||
put(MAX_BRIGHTNESS, config.maxBrightness)
|
||||
|
@ -786,7 +776,6 @@ class SettingsActivity : SimpleActivity() {
|
|||
CROP_THUMBNAILS -> config.cropThumbnails = value.toBoolean()
|
||||
SHOW_THUMBNAIL_VIDEO_DURATION -> config.showThumbnailVideoDuration = value.toBoolean()
|
||||
SHOW_MEDIA_COUNT -> config.showMediaCount = value.toBoolean()
|
||||
SHOW_INFO_BUBBLE -> config.showInfoBubble = value.toBoolean()
|
||||
SCROLL_HORIZONTALLY -> config.scrollHorizontally = value.toBoolean()
|
||||
ENABLE_PULL_TO_REFRESH -> config.enablePullToRefresh = value.toBoolean()
|
||||
MAX_BRIGHTNESS -> config.maxBrightness = value.toBoolean()
|
||||
|
|
|
@ -134,12 +134,10 @@ class PickDirectoryDialog(val activity: BaseSimpleActivity, val sourcePath: Stri
|
|||
directories_horizontal_fastscroller.beVisibleIf(scrollHorizontally)
|
||||
|
||||
if (scrollHorizontally) {
|
||||
directories_horizontal_fastscroller.allowBubbleDisplay = activity.config.showInfoBubble
|
||||
directories_horizontal_fastscroller.setViews(directories_grid) {
|
||||
directories_horizontal_fastscroller.updateBubbleText(dirs[it].getBubbleText(sorting, activity, dateFormat, timeFormat))
|
||||
}
|
||||
} else {
|
||||
directories_vertical_fastscroller.allowBubbleDisplay = activity.config.showInfoBubble
|
||||
directories_vertical_fastscroller.setViews(directories_grid) {
|
||||
directories_vertical_fastscroller.updateBubbleText(dirs[it].getBubbleText(sorting, activity, dateFormat, timeFormat))
|
||||
}
|
||||
|
|
|
@ -87,13 +87,11 @@ class PickMediumDialog(val activity: BaseSimpleActivity, val path: String, val c
|
|||
media_horizontal_fastscroller.beVisibleIf(scrollHorizontally)
|
||||
|
||||
if (scrollHorizontally) {
|
||||
media_horizontal_fastscroller.allowBubbleDisplay = activity.config.showInfoBubble
|
||||
media_horizontal_fastscroller.setViews(media_grid) {
|
||||
val medium = (media[it] as? Medium)
|
||||
media_horizontal_fastscroller.updateBubbleText(medium?.getBubbleText(sorting, activity, dateFormat, timeFormat) ?: "")
|
||||
}
|
||||
} else {
|
||||
media_vertical_fastscroller.allowBubbleDisplay = activity.config.showInfoBubble
|
||||
media_vertical_fastscroller.setViews(media_grid) {
|
||||
val medium = (media[it] as? Medium)
|
||||
media_vertical_fastscroller.updateBubbleText(medium?.getBubbleText(sorting, activity, dateFormat, timeFormat) ?: "")
|
||||
|
|
|
@ -468,29 +468,6 @@
|
|||
android:textAllCaps="true"
|
||||
android:textSize="@dimen/smaller_text_size" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_show_info_bubble_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_margin"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:paddingStart="@dimen/normal_margin"
|
||||
android:paddingTop="@dimen/activity_margin"
|
||||
android:paddingEnd="@dimen/normal_margin"
|
||||
android:paddingBottom="@dimen/activity_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||
android:id="@+id/settings_show_info_bubble"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:clickable="false"
|
||||
android:paddingStart="@dimen/medium_margin"
|
||||
android:text="@string/show_info_bubble"
|
||||
app:switchPadding="@dimen/medium_margin" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_scroll_horizontally_holder"
|
||||
android:layout_width="match_parent"
|
||||
|
|
Loading…
Reference in a new issue