updating some activity styles
This commit is contained in:
parent
6613e75ce7
commit
1fc696e960
13 changed files with 1862 additions and 1789 deletions
|
@ -15,8 +15,6 @@ import android.provider.ContactsContract.CommonDataKinds.StructuredName
|
|||
import android.provider.ContactsContract.Data
|
||||
import android.text.TextUtils
|
||||
import android.text.method.LinkMovementMethod
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.view.WindowManager
|
||||
import android.view.inputmethod.EditorInfo
|
||||
|
@ -65,7 +63,6 @@ class EventActivity : SimpleActivity() {
|
|||
private var mEventOccurrenceTS = 0L
|
||||
private var mLastSavePromptTS = 0L
|
||||
private var mEventCalendarId = STORED_LOCALLY_ONLY
|
||||
private var mWasActivityInitialized = false
|
||||
private var mWasContactsPermissionChecked = false
|
||||
private var mWasCalendarChanged = false
|
||||
private var mAttendees = ArrayList<Attendee>()
|
||||
|
@ -86,6 +83,8 @@ class EventActivity : SimpleActivity() {
|
|||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_event)
|
||||
setupOptionsMenu()
|
||||
refreshMenuItems()
|
||||
|
||||
if (checkAppSideloading()) {
|
||||
return
|
||||
|
@ -113,6 +112,11 @@ class EventActivity : SimpleActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
setupToolbar(event_toolbar, NavigationIcon.Arrow)
|
||||
}
|
||||
|
||||
private fun gotEvent(savedInstanceState: Bundle?, localEventType: EventType?, event: Event?) {
|
||||
if (localEventType == null || localEventType.caldavCalendarId != 0) {
|
||||
config.lastUsedLocalEventTypeId = REGULAR_EVENT_TYPE_ID
|
||||
|
@ -129,7 +133,7 @@ class EventActivity : SimpleActivity() {
|
|||
|
||||
if (intent.getBooleanExtra(IS_DUPLICATE_INTENT, false)) {
|
||||
mEvent.id = null
|
||||
updateActionBarTitle(getString(R.string.new_event))
|
||||
event_toolbar.title = getString(R.string.new_event)
|
||||
} else {
|
||||
cancelNotification(mEvent.id!!)
|
||||
}
|
||||
|
@ -223,30 +227,29 @@ class EventActivity : SimpleActivity() {
|
|||
updateIconColors()
|
||||
event_time_zone_image.beVisibleIf(config.allowChangingTimeZones)
|
||||
event_time_zone.beVisibleIf(config.allowChangingTimeZones)
|
||||
mWasActivityInitialized = true
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
menuInflater.inflate(R.menu.menu_event, menu)
|
||||
if (mWasActivityInitialized) {
|
||||
menu.findItem(R.id.delete).isVisible = mEvent.id != null
|
||||
menu.findItem(R.id.share).isVisible = mEvent.id != null
|
||||
menu.findItem(R.id.duplicate).isVisible = mEvent.id != null
|
||||
private fun refreshMenuItems() {
|
||||
if (::mEvent.isInitialized) {
|
||||
event_toolbar.menu.apply {
|
||||
findItem(R.id.delete).isVisible = mEvent.id != null
|
||||
findItem(R.id.share).isVisible = mEvent.id != null
|
||||
findItem(R.id.duplicate).isVisible = mEvent.id != null
|
||||
}
|
||||
}
|
||||
|
||||
updateMenuItemColors(menu, true)
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
when (item.itemId) {
|
||||
R.id.save -> saveCurrentEvent()
|
||||
R.id.delete -> deleteEvent()
|
||||
R.id.duplicate -> duplicateEvent()
|
||||
R.id.share -> shareEvent()
|
||||
else -> return super.onOptionsItemSelected(item)
|
||||
private fun setupOptionsMenu() {
|
||||
event_toolbar.setOnMenuItemClickListener { menuItem ->
|
||||
when (menuItem.itemId) {
|
||||
R.id.save -> saveCurrentEvent()
|
||||
R.id.delete -> deleteEvent()
|
||||
R.id.duplicate -> duplicateEvent()
|
||||
R.id.share -> shareEvent()
|
||||
else -> return@setOnMenuItemClickListener false
|
||||
}
|
||||
return@setOnMenuItemClickListener true
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
private fun getStartEndTimes(): Pair<Long, Long> {
|
||||
|
@ -326,7 +329,7 @@ class EventActivity : SimpleActivity() {
|
|||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
super.onSaveInstanceState(outState)
|
||||
if (!mWasActivityInitialized) {
|
||||
if (!::mEvent.isInitialized) {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -435,7 +438,7 @@ class EventActivity : SimpleActivity() {
|
|||
mOriginalEndTS = realStart + duration
|
||||
|
||||
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN)
|
||||
updateActionBarTitle(getString(R.string.edit_event))
|
||||
event_toolbar.title = getString(R.string.edit_event)
|
||||
mOriginalTimeZone = mEvent.timeZone
|
||||
if (config.allowChangingTimeZones) {
|
||||
try {
|
||||
|
@ -478,7 +481,7 @@ class EventActivity : SimpleActivity() {
|
|||
private fun setupNewEvent() {
|
||||
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
|
||||
event_title.requestFocus()
|
||||
updateActionBarTitle(getString(R.string.new_event))
|
||||
event_toolbar.title = getString(R.string.new_event)
|
||||
if (config.defaultEventTypeId != -1L) {
|
||||
config.lastUsedCaldavCalendarId = mStoredEventTypes.firstOrNull { it.id == config.defaultEventTypeId }?.caldavCalendarId ?: 0
|
||||
}
|
||||
|
@ -1712,10 +1715,10 @@ class EventActivity : SimpleActivity() {
|
|||
}
|
||||
|
||||
private fun updateActionBarTitle() {
|
||||
if (mIsNewEvent) {
|
||||
updateActionBarTitle(getString(R.string.new_event))
|
||||
event_toolbar.title = if (mIsNewEvent) {
|
||||
getString(R.string.new_event)
|
||||
} else {
|
||||
updateActionBarTitle(getString(R.string.edit_event))
|
||||
getString(R.string.edit_event)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,6 +89,8 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_main)
|
||||
appLaunched(BuildConfig.APPLICATION_ID)
|
||||
setupOptionsMenu()
|
||||
refreshMenuItems()
|
||||
|
||||
checkWhatsNewDialog()
|
||||
calendar_fab.beVisibleIf(config.storedView != YEARLY_VIEW && config.storedView != WEEKLY_VIEW)
|
||||
|
@ -169,6 +171,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
val newShouldFilterBeVisible = it.size > 1 || config.displayEventTypes.isEmpty()
|
||||
if (newShouldFilterBeVisible != mShouldFilterBeVisible) {
|
||||
mShouldFilterBeVisible = newShouldFilterBeVisible
|
||||
refreshMenuItems()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -194,8 +197,9 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
checkSwipeRefreshAvailability()
|
||||
checkShortcuts()
|
||||
|
||||
setupToolbar(main_toolbar, searchMenuItem = mSearchMenuItem)
|
||||
if (!mIsSearchOpen) {
|
||||
invalidateOptionsMenu()
|
||||
refreshMenuItems()
|
||||
}
|
||||
|
||||
setupQuickFilter()
|
||||
|
@ -214,58 +218,48 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
}
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
menuInflater.inflate(R.menu.menu_main, menu)
|
||||
shouldGoToTodayBeVisible = currentFragments.last().shouldGoToTodayBeVisible()
|
||||
menu.apply {
|
||||
private fun refreshMenuItems() {
|
||||
if (fab_extended_overlay.isVisible()) {
|
||||
hideExtendedFab()
|
||||
}
|
||||
|
||||
shouldGoToTodayBeVisible = currentFragments.lastOrNull()?.shouldGoToTodayBeVisible() ?: false
|
||||
main_toolbar.menu.apply {
|
||||
goToTodayButton = findItem(R.id.go_to_today)
|
||||
findItem(R.id.print).isVisible = config.storedView != MONTHLY_DAILY_VIEW
|
||||
findItem(R.id.filter).isVisible = mShouldFilterBeVisible
|
||||
findItem(R.id.go_to_today).isVisible = shouldGoToTodayBeVisible && !mIsSearchOpen
|
||||
findItem(R.id.go_to_date).isVisible = config.storedView != EVENTS_LIST_VIEW
|
||||
}
|
||||
|
||||
setupSearch(menu)
|
||||
updateMenuItemColors(menu)
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onPrepareOptionsMenu(menu: Menu): Boolean {
|
||||
if (fab_extended_overlay.isVisible()) {
|
||||
hideExtendedFab()
|
||||
}
|
||||
|
||||
menu.apply {
|
||||
findItem(R.id.refresh_caldav_calendars).isVisible = config.caldavSync
|
||||
findItem(R.id.filter).isVisible = mShouldFilterBeVisible
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
if (fab_extended_overlay.isVisible()) {
|
||||
hideExtendedFab()
|
||||
}
|
||||
private fun setupOptionsMenu() {
|
||||
setupSearch(main_toolbar.menu)
|
||||
main_toolbar.setOnMenuItemClickListener { menuItem ->
|
||||
if (fab_extended_overlay.isVisible()) {
|
||||
hideExtendedFab()
|
||||
}
|
||||
|
||||
when (item.itemId) {
|
||||
R.id.change_view -> showViewDialog()
|
||||
R.id.go_to_today -> goToToday()
|
||||
R.id.go_to_date -> showGoToDateDialog()
|
||||
R.id.print -> printView()
|
||||
R.id.filter -> showFilterDialog()
|
||||
R.id.refresh_caldav_calendars -> refreshCalDAVCalendars(true)
|
||||
R.id.add_holidays -> addHolidays()
|
||||
R.id.add_birthdays -> tryAddBirthdays()
|
||||
R.id.add_anniversaries -> tryAddAnniversaries()
|
||||
R.id.import_events -> tryImportEvents()
|
||||
R.id.export_events -> tryExportEvents()
|
||||
R.id.settings -> launchSettings()
|
||||
R.id.about -> launchAbout()
|
||||
android.R.id.home -> onBackPressed()
|
||||
else -> return super.onOptionsItemSelected(item)
|
||||
when (menuItem.itemId) {
|
||||
R.id.change_view -> showViewDialog()
|
||||
R.id.go_to_today -> goToToday()
|
||||
R.id.go_to_date -> showGoToDateDialog()
|
||||
R.id.print -> printView()
|
||||
R.id.filter -> showFilterDialog()
|
||||
R.id.refresh_caldav_calendars -> refreshCalDAVCalendars(true)
|
||||
R.id.add_holidays -> addHolidays()
|
||||
R.id.add_birthdays -> tryAddBirthdays()
|
||||
R.id.add_anniversaries -> tryAddAnniversaries()
|
||||
R.id.import_events -> tryImportEvents()
|
||||
R.id.export_events -> tryExportEvents()
|
||||
R.id.settings -> launchSettings()
|
||||
R.id.about -> launchAbout()
|
||||
android.R.id.home -> onBackPressed()
|
||||
else -> return@setOnMenuItemClickListener false
|
||||
}
|
||||
return@setOnMenuItemClickListener true
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onBackPressed() {
|
||||
|
@ -336,7 +330,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
search_holder.beVisible()
|
||||
calendar_fab.beGone()
|
||||
searchQueryChanged("")
|
||||
invalidateOptionsMenu()
|
||||
refreshMenuItems()
|
||||
return true
|
||||
}
|
||||
|
||||
|
@ -344,7 +338,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
mIsSearchOpen = false
|
||||
search_holder.beGone()
|
||||
calendar_fab.beVisibleIf(currentFragments.last() !is YearFragmentsHolder && currentFragments.last() !is WeekFragmentsHolder)
|
||||
invalidateOptionsMenu()
|
||||
refreshMenuItems()
|
||||
return true
|
||||
}
|
||||
})
|
||||
|
@ -517,7 +511,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
closeSearch()
|
||||
updateView(it as Int)
|
||||
shouldGoToTodayBeVisible = false
|
||||
invalidateOptionsMenu()
|
||||
refreshMenuItems()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -534,8 +528,12 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
}
|
||||
|
||||
private fun resetActionBarTitle() {
|
||||
updateActionBarTitle(getString(R.string.app_launcher_name))
|
||||
updateActionBarSubtitle("")
|
||||
main_toolbar.title = getString(R.string.app_launcher_name)
|
||||
main_toolbar.subtitle = ""
|
||||
}
|
||||
|
||||
fun updateSubtitle(text: String) {
|
||||
main_toolbar.subtitle = text
|
||||
}
|
||||
|
||||
private fun showFilterDialog() {
|
||||
|
@ -549,7 +547,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
fun toggleGoToTodayVisibility(beVisible: Boolean) {
|
||||
shouldGoToTodayBeVisible = beVisible
|
||||
if (goToTodayButton?.isVisible != beVisible) {
|
||||
invalidateOptionsMenu()
|
||||
refreshMenuItems()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -872,7 +870,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
updateViewPager(dateCode)
|
||||
if (goToTodayButton?.isVisible == true) {
|
||||
shouldGoToTodayBeVisible = false
|
||||
invalidateOptionsMenu()
|
||||
refreshMenuItems()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ import android.content.Intent
|
|||
import android.media.AudioManager
|
||||
import android.media.RingtoneManager
|
||||
import android.os.Bundle
|
||||
import android.view.Menu
|
||||
import android.widget.Toast
|
||||
import com.simplemobiletools.calendar.pro.R
|
||||
import com.simplemobiletools.calendar.pro.dialogs.SelectCalendarsDialog
|
||||
|
@ -41,6 +40,7 @@ class SettingsActivity : SimpleActivity() {
|
|||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
setupToolbar(settings_toolbar, NavigationIcon.Arrow)
|
||||
setupSettingItems()
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,6 @@ class SettingsActivity : SimpleActivity() {
|
|||
checkPrimaryColor()
|
||||
setupExportSettings()
|
||||
setupImportSettings()
|
||||
invalidateOptionsMenu()
|
||||
|
||||
arrayOf(
|
||||
settings_color_customization_label,
|
||||
|
@ -141,11 +140,6 @@ class SettingsActivity : SimpleActivity() {
|
|||
config.defaultReminder3 = reminders.getOrElse(2) { REMINDER_OFF }
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
updateMenuItemColors(menu)
|
||||
return super.onCreateOptionsMenu(menu)
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, resultData)
|
||||
if (requestCode == GET_RINGTONE_URI && resultCode == RESULT_OK && resultData != null) {
|
||||
|
@ -320,7 +314,10 @@ class SettingsActivity : SimpleActivity() {
|
|||
|
||||
ensureBackgroundThread {
|
||||
if (newCalendarIds.isNotEmpty()) {
|
||||
val existingEventTypeNames = eventsHelper.getEventTypesSync().map { it.getDisplayTitle().lowercase(Locale.getDefault()) } as ArrayList<String>
|
||||
val existingEventTypeNames = eventsHelper.getEventTypesSync().map {
|
||||
it.getDisplayTitle().lowercase(Locale.getDefault())
|
||||
} as ArrayList<String>
|
||||
|
||||
getSyncedCalDAVCalendars().forEach {
|
||||
val calendarTitle = it.getFullTitle()
|
||||
if (!existingEventTypeNames.contains(calendarTitle.lowercase(Locale.getDefault()))) {
|
||||
|
|
|
@ -168,7 +168,7 @@ class WeekFragmentsHolder : MyFragmentHolder(), WeekFragmentListener {
|
|||
val endMonthName = Formatter.getMonthName(requireContext(), endDateTime.monthOfYear)
|
||||
(activity as AppCompatActivity).updateActionBarTitle("$startMonthName - $endMonthName")
|
||||
}
|
||||
(activity as AppCompatActivity).updateActionBarSubtitle("${getString(R.string.week)} ${startDateTime.plusDays(3).weekOfWeekyear}")
|
||||
(activity as MainActivity).updateSubtitle("${getString(R.string.week)} ${startDateTime.plusDays(3).weekOfWeekyear}")
|
||||
}
|
||||
|
||||
override fun goToToday() {
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,151 +1,174 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/calendar_coordinator"
|
||||
android:id="@+id/main_coordinator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/main_app_bar_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipe_refresh_layout"
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/quick_event_type_filter"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/color_primary"
|
||||
app:menu="@menu/menu_main"
|
||||
app:title="@string/app_launcher_name"
|
||||
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fragments_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/fab_extended_overlay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0"
|
||||
android:visibility="gone" />
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/fab_event_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0"
|
||||
android:paddingVertical="@dimen/small_margin"
|
||||
android:paddingEnd="@dimen/activity_margin"
|
||||
android:text="@string/event"
|
||||
android:textSize="@dimen/big_text_size"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/calendar_fab"
|
||||
app:layout_constraintEnd_toStartOf="@+id/calendar_fab"
|
||||
app:layout_constraintTop_toTopOf="@+id/calendar_fab" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fab_task_icon"
|
||||
android:layout_width="@dimen/secondary_fab_size"
|
||||
android:layout_height="@dimen/secondary_fab_size"
|
||||
android:layout_marginBottom="@dimen/activity_margin"
|
||||
android:alpha="0"
|
||||
android:background="@drawable/circle_background"
|
||||
android:padding="@dimen/medium_margin"
|
||||
android:src="@drawable/ic_task_vector"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/calendar_fab"
|
||||
app:layout_constraintEnd_toEndOf="@+id/calendar_fab"
|
||||
app:layout_constraintStart_toStartOf="@+id/calendar_fab" />
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/fab_task_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0"
|
||||
android:paddingVertical="@dimen/small_margin"
|
||||
android:paddingEnd="@dimen/activity_margin"
|
||||
android:text="@string/task"
|
||||
android:textSize="@dimen/big_text_size"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/fab_task_icon"
|
||||
app:layout_constraintEnd_toStartOf="@+id/calendar_fab"
|
||||
app:layout_constraintTop_toTopOf="@+id/fab_task_icon" />
|
||||
|
||||
<com.simplemobiletools.commons.views.MyFloatingActionButton
|
||||
android:id="@+id/calendar_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginEnd="@dimen/activity_margin"
|
||||
android:layout_marginBottom="@dimen/activity_margin"
|
||||
android:contentDescription="@string/new_event"
|
||||
android:src="@drawable/ic_plus_vector"
|
||||
app:backgroundTint="@color/color_primary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/quick_event_type_filter"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:rippleColor="@color/pressed_item_foreground" />
|
||||
|
||||
<com.simplemobiletools.commons.views.MyRecyclerView
|
||||
android:id="@+id/quick_event_type_filter"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
android:orientation="horizontal"
|
||||
android:overScrollMode="never"
|
||||
app:layoutManager="com.simplemobiletools.commons.views.MyLinearLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:rippleColor="@color/pressed_item_foreground" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/search_holder"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/calendar_coordinator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:visibility="gone">
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/search_placeholder"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/activity_margin"
|
||||
android:alpha="0.8"
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/activity_margin"
|
||||
android:paddingEnd="@dimen/activity_margin"
|
||||
android:text="@string/no_items_found"
|
||||
android:textSize="@dimen/bigger_text_size"
|
||||
android:textStyle="italic" />
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/search_placeholder_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/search_placeholder"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:alpha="0.8"
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/activity_margin"
|
||||
android:paddingTop="@dimen/medium_margin"
|
||||
android:paddingEnd="@dimen/activity_margin"
|
||||
android:paddingBottom="@dimen/medium_margin"
|
||||
android:text="@string/type_2_characters"
|
||||
android:textSize="@dimen/bigger_text_size"
|
||||
android:textStyle="italic" />
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipe_refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/quick_event_type_filter"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyRecyclerView
|
||||
android:id="@+id/search_results_list"
|
||||
<FrameLayout
|
||||
android:id="@+id/fragments_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/fab_extended_overlay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0"
|
||||
android:visibility="gone" />
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/fab_event_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0"
|
||||
android:paddingVertical="@dimen/small_margin"
|
||||
android:paddingEnd="@dimen/activity_margin"
|
||||
android:text="@string/event"
|
||||
android:textSize="@dimen/big_text_size"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/calendar_fab"
|
||||
app:layout_constraintEnd_toStartOf="@+id/calendar_fab"
|
||||
app:layout_constraintTop_toTopOf="@+id/calendar_fab" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fab_task_icon"
|
||||
android:layout_width="@dimen/secondary_fab_size"
|
||||
android:layout_height="@dimen/secondary_fab_size"
|
||||
android:layout_marginBottom="@dimen/activity_margin"
|
||||
android:alpha="0"
|
||||
android:background="@drawable/circle_background"
|
||||
android:padding="@dimen/medium_margin"
|
||||
android:src="@drawable/ic_task_vector"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/calendar_fab"
|
||||
app:layout_constraintEnd_toEndOf="@+id/calendar_fab"
|
||||
app:layout_constraintStart_toStartOf="@+id/calendar_fab" />
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/fab_task_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0"
|
||||
android:paddingVertical="@dimen/small_margin"
|
||||
android:paddingEnd="@dimen/activity_margin"
|
||||
android:text="@string/task"
|
||||
android:textSize="@dimen/big_text_size"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/fab_task_icon"
|
||||
app:layout_constraintEnd_toStartOf="@+id/calendar_fab"
|
||||
app:layout_constraintTop_toTopOf="@+id/fab_task_icon" />
|
||||
|
||||
<com.simplemobiletools.commons.views.MyFloatingActionButton
|
||||
android:id="@+id/calendar_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginEnd="@dimen/activity_margin"
|
||||
android:layout_marginBottom="@dimen/activity_margin"
|
||||
android:contentDescription="@string/new_event"
|
||||
android:src="@drawable/ic_plus_vector"
|
||||
app:backgroundTint="@color/color_primary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/quick_event_type_filter"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:rippleColor="@color/pressed_item_foreground" />
|
||||
|
||||
<com.simplemobiletools.commons.views.MyRecyclerView
|
||||
android:id="@+id/quick_event_type_filter"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
android:orientation="horizontal"
|
||||
android:overScrollMode="never"
|
||||
app:layoutManager="com.simplemobiletools.commons.views.MyLinearLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:rippleColor="@color/pressed_item_foreground" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/search_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:scrollbars="vertical"
|
||||
app:layoutManager="com.simplemobiletools.commons.views.MyLinearLayoutManager" />
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:visibility="gone">
|
||||
|
||||
</RelativeLayout>
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/search_placeholder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/activity_margin"
|
||||
android:alpha="0.8"
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/activity_margin"
|
||||
android:paddingEnd="@dimen/activity_margin"
|
||||
android:text="@string/no_items_found"
|
||||
android:textSize="@dimen/bigger_text_size"
|
||||
android:textStyle="italic" />
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/search_placeholder_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/search_placeholder"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:alpha="0.8"
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/activity_margin"
|
||||
android:paddingTop="@dimen/medium_margin"
|
||||
android:paddingEnd="@dimen/activity_margin"
|
||||
android:paddingBottom="@dimen/medium_margin"
|
||||
android:text="@string/type_2_characters"
|
||||
android:textSize="@dimen/bigger_text_size"
|
||||
android:textStyle="italic" />
|
||||
|
||||
<com.simplemobiletools.commons.views.MyRecyclerView
|
||||
android:id="@+id/search_results_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:scrollbars="vertical"
|
||||
app:layoutManager="com.simplemobiletools.commons.views.MyLinearLayoutManager" />
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -4,7 +4,10 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:padding="@dimen/normal_margin">
|
||||
android:paddingStart="@dimen/normal_margin"
|
||||
android:paddingTop="@dimen/small_margin"
|
||||
android:paddingEnd="@dimen/normal_margin"
|
||||
android:paddingBottom="@dimen/small_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||
android:id="@+id/filter_event_type_checkbox"
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
android:id="@+id/cab_share"
|
||||
android:icon="@drawable/ic_share_vector"
|
||||
android:title="@string/share"
|
||||
app:showAsAction="ifRoom" />
|
||||
app:showAsAction="always" />
|
||||
<item
|
||||
android:id="@+id/cab_delete"
|
||||
android:icon="@drawable/ic_delete_vector"
|
||||
android:title="@string/delete"
|
||||
app:showAsAction="ifRoom" />
|
||||
app:showAsAction="always" />
|
||||
</menu>
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
android:id="@+id/cab_share"
|
||||
android:icon="@drawable/ic_share_vector"
|
||||
android:title="@string/share"
|
||||
app:showAsAction="ifRoom" />
|
||||
app:showAsAction="always" />
|
||||
<item
|
||||
android:id="@+id/cab_delete"
|
||||
android:icon="@drawable/ic_delete_vector"
|
||||
android:title="@string/delete"
|
||||
app:showAsAction="ifRoom" />
|
||||
app:showAsAction="always" />
|
||||
</menu>
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
android:id="@+id/cab_edit"
|
||||
android:icon="@drawable/ic_edit_vector"
|
||||
android:title="@string/edit"
|
||||
app:showAsAction="ifRoom" />
|
||||
app:showAsAction="always" />
|
||||
<item
|
||||
android:id="@+id/cab_delete"
|
||||
android:icon="@drawable/ic_delete_vector"
|
||||
android:title="@string/delete"
|
||||
app:showAsAction="ifRoom" />
|
||||
app:showAsAction="always" />
|
||||
</menu>
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
android:id="@+id/add_event_type"
|
||||
android:icon="@drawable/ic_plus_vector"
|
||||
android:title="@string/add_new_type"
|
||||
app:showAsAction="ifRoom" />
|
||||
app:showAsAction="always" />
|
||||
</menu>
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
android:icon="@drawable/ic_search_vector"
|
||||
android:title="@string/search"
|
||||
app:actionViewClass="androidx.appcompat.widget.SearchView"
|
||||
app:showAsAction="collapseActionView|ifRoom" />
|
||||
app:showAsAction="collapseActionView|always" />
|
||||
</menu>
|
||||
|
|
Loading…
Reference in a new issue