mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-03-20 10:30:07 +01:00
allow clicking on the top strip items
This commit is contained in:
parent
0672614101
commit
b101a17e31
@ -98,9 +98,10 @@ class MainActivity : SimpleActivity() {
|
||||
searchClearBtn = findViewById(R.id.search_clear)
|
||||
|
||||
initViewPager(intent.getLongExtra(OPEN_NOTE_ID, -1L))
|
||||
pager_title_strip.setTextSize(TypedValue.COMPLEX_UNIT_PX, getPercentageFontSize())
|
||||
pager_title_strip.layoutParams.height =
|
||||
(pager_title_strip.height + resources.getDimension(R.dimen.activity_margin) * 2 * (config.fontSizePercentage / 100f)).toInt()
|
||||
pager_tab_strip.drawFullUnderline = false
|
||||
pager_tab_strip.setTextSize(TypedValue.COMPLEX_UNIT_PX, getPercentageFontSize())
|
||||
pager_tab_strip.layoutParams.height =
|
||||
(pager_tab_strip.height + resources.getDimension(R.dimen.activity_margin) * 2 * (config.fontSizePercentage / 100f)).toInt()
|
||||
checkWhatsNewDialog()
|
||||
checkIntents(intent)
|
||||
|
||||
@ -129,11 +130,12 @@ class MainActivity : SimpleActivity() {
|
||||
}
|
||||
|
||||
refreshMenuItems()
|
||||
pager_title_strip.apply {
|
||||
pager_tab_strip.apply {
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, getPercentageFontSize())
|
||||
setGravity(Gravity.CENTER_VERTICAL)
|
||||
setNonPrimaryAlpha(0.4f)
|
||||
setTextColor(getProperTextColor())
|
||||
setTextColor(getProperPrimaryColor())
|
||||
tabIndicatorColor = getProperPrimaryColor()
|
||||
}
|
||||
updateTextColors(view_pager)
|
||||
|
||||
@ -199,7 +201,7 @@ class MainActivity : SimpleActivity() {
|
||||
!config.autosaveNotes && showSaveButton && (::mCurrentNote.isInitialized && mCurrentNote.type == NoteType.TYPE_TEXT.value)
|
||||
}
|
||||
|
||||
pager_title_strip.beVisibleIf(multipleNotesExist)
|
||||
pager_tab_strip.beVisibleIf(multipleNotesExist)
|
||||
}
|
||||
|
||||
private fun setupOptionsMenu() {
|
||||
|
@ -29,11 +29,12 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.viewpager.widget.PagerTitleStrip
|
||||
android:id="@+id/pager_title_strip"
|
||||
<androidx.viewpager.widget.PagerTabStrip
|
||||
android:id="@+id/pager_tab_strip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top"
|
||||
android:background="@null"
|
||||
android:paddingStart="@dimen/activity_margin"
|
||||
android:paddingEnd="@dimen/activity_margin" />
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user