mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-06-05 21:49:26 +02:00
updating commons with some new theming
This commit is contained in:
@ -65,7 +65,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:15387bc4a3'
|
implementation 'com.github.SimpleMobileTools:Simple-Commons:0f166c0688'
|
||||||
|
|
||||||
kapt 'androidx.room:room-compiler:2.4.2'
|
kapt 'androidx.room:room-compiler:2.4.2'
|
||||||
implementation 'androidx.room:room-runtime:2.4.2'
|
implementation 'androidx.room:room-runtime:2.4.2'
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
android:name=".activities.MainActivity"
|
android:name=".activities.MainActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.ManageClipboardItemsActivity"
|
android:name=".activities.ManageClipboardItemsActivity"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
|
@ -5,8 +5,6 @@ import android.graphics.drawable.LayerDrawable
|
|||||||
import android.graphics.drawable.RippleDrawable
|
import android.graphics.drawable.RippleDrawable
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.provider.Settings
|
import android.provider.Settings
|
||||||
import android.view.Menu
|
|
||||||
import android.view.MenuItem
|
|
||||||
import android.view.inputmethod.InputMethodManager
|
import android.view.inputmethod.InputMethodManager
|
||||||
import com.simplemobiletools.commons.dialogs.ConfirmationAdvancedDialog
|
import com.simplemobiletools.commons.dialogs.ConfirmationAdvancedDialog
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
@ -20,6 +18,7 @@ class MainActivity : SimpleActivity() {
|
|||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_main)
|
setContentView(R.layout.activity_main)
|
||||||
|
setupOptionsMenu()
|
||||||
appLaunched(BuildConfig.APPLICATION_ID)
|
appLaunched(BuildConfig.APPLICATION_ID)
|
||||||
change_keyboard_holder.setOnClickListener {
|
change_keyboard_holder.setOnClickListener {
|
||||||
(getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager).showInputMethodPicker()
|
(getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager).showInputMethodPicker()
|
||||||
@ -28,6 +27,7 @@ class MainActivity : SimpleActivity() {
|
|||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
|
setupToolbar(main_toolbar)
|
||||||
if (!isKeyboardEnabled()) {
|
if (!isKeyboardEnabled()) {
|
||||||
ConfirmationAdvancedDialog(this, messageId = R.string.redirection_note, positive = R.string.ok, negative = 0) { success ->
|
ConfirmationAdvancedDialog(this, messageId = R.string.redirection_note, positive = R.string.ok, negative = 0) { success ->
|
||||||
if (success) {
|
if (success) {
|
||||||
@ -41,24 +41,24 @@ class MainActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
updateTextColors(main_holder)
|
updateTextColors(main_nested_scrollview)
|
||||||
updateChangeKeyboardColor()
|
updateChangeKeyboardColor()
|
||||||
main_holder.setBackgroundColor(getProperBackgroundColor())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
private fun setupOptionsMenu() {
|
||||||
menuInflater.inflate(R.menu.menu_main, menu)
|
main_toolbar.setOnMenuItemClickListener { menuItem ->
|
||||||
updateMenuItemColors(menu)
|
when (menuItem.itemId) {
|
||||||
return true
|
R.id.settings -> {
|
||||||
|
launchSettings()
|
||||||
|
true
|
||||||
|
}
|
||||||
|
R.id.about -> {
|
||||||
|
launchAbout()
|
||||||
|
true
|
||||||
|
}
|
||||||
|
else -> false
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
|
||||||
when (item.itemId) {
|
|
||||||
R.id.settings -> launchSettings()
|
|
||||||
R.id.about -> launchAbout()
|
|
||||||
else -> return super.onOptionsItemSelected(item)
|
|
||||||
}
|
}
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun launchSettings() {
|
private fun launchSettings() {
|
||||||
|
@ -4,17 +4,12 @@ import android.app.Activity
|
|||||||
import android.content.ActivityNotFoundException
|
import android.content.ActivityNotFoundException
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.Menu
|
|
||||||
import android.view.MenuItem
|
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.google.gson.reflect.TypeToken
|
import com.google.gson.reflect.TypeToken
|
||||||
import com.simplemobiletools.commons.dialogs.FilePickerDialog
|
import com.simplemobiletools.commons.dialogs.FilePickerDialog
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.helpers.PERMISSION_READ_STORAGE
|
import com.simplemobiletools.commons.helpers.*
|
||||||
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
|
|
||||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
|
||||||
import com.simplemobiletools.commons.helpers.isQPlus
|
|
||||||
import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
|
import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
|
||||||
import com.simplemobiletools.keyboard.R
|
import com.simplemobiletools.keyboard.R
|
||||||
import com.simplemobiletools.keyboard.adapters.ClipsActivityAdapter
|
import com.simplemobiletools.keyboard.adapters.ClipsActivityAdapter
|
||||||
@ -36,6 +31,7 @@ class ManageClipboardItemsActivity : SimpleActivity(), RefreshRecyclerViewListen
|
|||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_manage_clipboard_items)
|
setContentView(R.layout.activity_manage_clipboard_items)
|
||||||
|
setupOptionsMenu()
|
||||||
updateTextColors(clipboard_items_wrapper)
|
updateTextColors(clipboard_items_wrapper)
|
||||||
updateClips()
|
updateClips()
|
||||||
|
|
||||||
@ -49,21 +45,9 @@ class ManageClipboardItemsActivity : SimpleActivity(), RefreshRecyclerViewListen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
override fun onResume() {
|
||||||
menuInflater.inflate(R.menu.menu_manage_clipboard_items, menu)
|
super.onResume()
|
||||||
updateMenuItemColors(menu)
|
setupToolbar(clipboard_toolbar, NavigationIcon.Arrow)
|
||||||
return super.onCreateOptionsMenu(menu)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
|
||||||
when (item.itemId) {
|
|
||||||
R.id.add_clipboard_item -> addOrEditClip()
|
|
||||||
R.id.export_clips -> exportClips()
|
|
||||||
R.id.import_clips -> importClips()
|
|
||||||
else -> return super.onOptionsItemSelected(item)
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {
|
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {
|
||||||
@ -77,6 +61,27 @@ class ManageClipboardItemsActivity : SimpleActivity(), RefreshRecyclerViewListen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private fun setupOptionsMenu() {
|
||||||
|
clipboard_toolbar.setOnMenuItemClickListener { menuItem ->
|
||||||
|
when (menuItem.itemId) {
|
||||||
|
R.id.add_clipboard_item -> {
|
||||||
|
addOrEditClip()
|
||||||
|
true
|
||||||
|
}
|
||||||
|
R.id.export_clips -> {
|
||||||
|
exportClips()
|
||||||
|
true
|
||||||
|
}
|
||||||
|
R.id.import_clips -> {
|
||||||
|
importClips()
|
||||||
|
true
|
||||||
|
}
|
||||||
|
else -> false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun refreshItems() {
|
override fun refreshItems() {
|
||||||
updateClips()
|
updateClips()
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@ package com.simplemobiletools.keyboard.activities
|
|||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.Menu
|
|
||||||
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
|
import com.simplemobiletools.commons.helpers.NavigationIcon
|
||||||
import com.simplemobiletools.commons.models.RadioItem
|
import com.simplemobiletools.commons.models.RadioItem
|
||||||
import com.simplemobiletools.keyboard.R
|
import com.simplemobiletools.keyboard.R
|
||||||
import com.simplemobiletools.keyboard.extensions.config
|
import com.simplemobiletools.keyboard.extensions.config
|
||||||
@ -22,6 +22,7 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
|
setupToolbar(settings_toolbar, NavigationIcon.Arrow)
|
||||||
|
|
||||||
setupPurchaseThankYou()
|
setupPurchaseThankYou()
|
||||||
setupCustomizeColors()
|
setupCustomizeColors()
|
||||||
@ -31,7 +32,7 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
setupShowPopupOnKeypress()
|
setupShowPopupOnKeypress()
|
||||||
setupKeyboardLanguage()
|
setupKeyboardLanguage()
|
||||||
|
|
||||||
updateTextColors(settings_scrollview)
|
updateTextColors(settings_nested_scrollview)
|
||||||
|
|
||||||
arrayOf(settings_color_customization_label, settings_general_settings_label).forEach {
|
arrayOf(settings_color_customization_label, settings_general_settings_label).forEach {
|
||||||
it.setTextColor(getProperPrimaryColor())
|
it.setTextColor(getProperPrimaryColor())
|
||||||
@ -42,11 +43,6 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
|
||||||
updateMenuItemColors(menu)
|
|
||||||
return super.onCreateOptionsMenu(menu)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun setupPurchaseThankYou() {
|
private fun setupPurchaseThankYou() {
|
||||||
settings_purchase_thank_you_holder.beGoneIf(isOrWasThankYouInstalled())
|
settings_purchase_thank_you_holder.beGoneIf(isOrWasThankYouInstalled())
|
||||||
|
|
||||||
|
@ -1,25 +1,19 @@
|
|||||||
package com.simplemobiletools.keyboard.dialogs
|
package com.simplemobiletools.keyboard.dialogs
|
||||||
|
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import androidx.appcompat.widget.AppCompatEditText
|
|
||||||
import com.simplemobiletools.commons.activities.BaseSimpleActivity
|
import com.simplemobiletools.commons.activities.BaseSimpleActivity
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||||
import com.simplemobiletools.keyboard.R
|
import com.simplemobiletools.keyboard.R
|
||||||
import com.simplemobiletools.keyboard.helpers.ClipsHelper
|
import com.simplemobiletools.keyboard.helpers.ClipsHelper
|
||||||
import com.simplemobiletools.keyboard.models.Clip
|
import com.simplemobiletools.keyboard.models.Clip
|
||||||
|
import kotlinx.android.synthetic.main.dialog_add_or_edit_clip.view.*
|
||||||
|
|
||||||
class AddOrEditClipDialog(val activity: BaseSimpleActivity, val originalClip: Clip?, val callback: () -> Unit) {
|
class AddOrEditClipDialog(val activity: BaseSimpleActivity, val originalClip: Clip?, val callback: () -> Unit) {
|
||||||
init {
|
init {
|
||||||
val layoutId = if (activity.baseConfig.isUsingSystemTheme) {
|
val view = activity.layoutInflater.inflate(R.layout.dialog_add_or_edit_clip, null).apply {
|
||||||
R.layout.dialog_add_or_edit_clip_material
|
|
||||||
} else {
|
|
||||||
R.layout.dialog_add_or_edit_clip
|
|
||||||
}
|
|
||||||
|
|
||||||
val view = activity.layoutInflater.inflate(layoutId, null).apply {
|
|
||||||
if (originalClip != null) {
|
if (originalClip != null) {
|
||||||
findViewById<AppCompatEditText>(R.id.add_clip_value).setText(originalClip.value)
|
add_clip_value.setText(originalClip.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,9 +22,9 @@ class AddOrEditClipDialog(val activity: BaseSimpleActivity, val originalClip: Cl
|
|||||||
.setNegativeButton(R.string.cancel, null)
|
.setNegativeButton(R.string.cancel, null)
|
||||||
.apply {
|
.apply {
|
||||||
activity.setupDialogStuff(view, this) { alertDialog ->
|
activity.setupDialogStuff(view, this) { alertDialog ->
|
||||||
alertDialog.showKeyboard(view.findViewById(R.id.add_clip_value))
|
alertDialog.showKeyboard(view.add_clip_value)
|
||||||
alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
|
alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
|
||||||
val clipValue = view.findViewById<AppCompatEditText>(R.id.add_clip_value).value
|
val clipValue = view.add_clip_value.value
|
||||||
if (clipValue.isEmpty()) {
|
if (clipValue.isEmpty()) {
|
||||||
activity.toast(R.string.value_cannot_be_empty)
|
activity.toast(R.string.value_cannot_be_empty)
|
||||||
return@setOnClickListener
|
return@setOnClickListener
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package com.simplemobiletools.keyboard.dialogs
|
package com.simplemobiletools.keyboard.dialogs
|
||||||
|
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import androidx.appcompat.widget.AppCompatEditText
|
|
||||||
import com.simplemobiletools.commons.activities.BaseSimpleActivity
|
import com.simplemobiletools.commons.activities.BaseSimpleActivity
|
||||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||||
import com.simplemobiletools.commons.dialogs.FilePickerDialog
|
import com.simplemobiletools.commons.dialogs.FilePickerDialog
|
||||||
@ -11,8 +10,7 @@ import com.simplemobiletools.keyboard.extensions.config
|
|||||||
import kotlinx.android.synthetic.main.dialog_export_clips.view.*
|
import kotlinx.android.synthetic.main.dialog_export_clips.view.*
|
||||||
|
|
||||||
class ExportClipsDialog(
|
class ExportClipsDialog(
|
||||||
val activity: BaseSimpleActivity, path: String, val hidePath: Boolean,
|
val activity: BaseSimpleActivity, path: String, val hidePath: Boolean, callback: (path: String, filename: String) -> Unit
|
||||||
callback: (path: String, filename: String) -> Unit
|
|
||||||
) {
|
) {
|
||||||
init {
|
init {
|
||||||
var folder = if (path.isNotEmpty() && activity.getDoesFilePathExist(path)) {
|
var folder = if (path.isNotEmpty() && activity.getDoesFilePathExist(path)) {
|
||||||
@ -21,14 +19,8 @@ class ExportClipsDialog(
|
|||||||
activity.internalStoragePath
|
activity.internalStoragePath
|
||||||
}
|
}
|
||||||
|
|
||||||
val layoutId = if (activity.baseConfig.isUsingSystemTheme) {
|
val view = activity.layoutInflater.inflate(R.layout.dialog_export_clips, null).apply {
|
||||||
R.layout.dialog_export_clips_material
|
export_clips_filename.setText("${activity.getString(R.string.app_launcher_name)}_${activity.getCurrentFormattedDateTime()}")
|
||||||
} else {
|
|
||||||
R.layout.dialog_export_clips
|
|
||||||
}
|
|
||||||
|
|
||||||
val view = activity.layoutInflater.inflate(layoutId, null).apply {
|
|
||||||
findViewById<AppCompatEditText>(R.id.export_clips_filename).setText("${activity.getString(R.string.app_launcher_name)}_${activity.getCurrentFormattedDateTime()}")
|
|
||||||
|
|
||||||
if (hidePath) {
|
if (hidePath) {
|
||||||
export_clips_path_label.beGone()
|
export_clips_path_label.beGone()
|
||||||
@ -49,9 +41,9 @@ class ExportClipsDialog(
|
|||||||
.setNegativeButton(R.string.cancel, null)
|
.setNegativeButton(R.string.cancel, null)
|
||||||
.apply {
|
.apply {
|
||||||
activity.setupDialogStuff(view, this, R.string.export_clipboard_items) { alertDialog ->
|
activity.setupDialogStuff(view, this, R.string.export_clipboard_items) { alertDialog ->
|
||||||
alertDialog.showKeyboard(view.findViewById(R.id.export_clips_filename))
|
alertDialog.showKeyboard(view.export_clips_filename)
|
||||||
alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
|
alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
|
||||||
val filename = view.findViewById<AppCompatEditText>(R.id.export_clips_filename).value
|
val filename = view.export_clips_filename.value
|
||||||
if (filename.isEmpty()) {
|
if (filename.isEmpty()) {
|
||||||
activity.toast(R.string.filename_cannot_be_empty)
|
activity.toast(R.string.filename_cannot_be_empty)
|
||||||
return@setOnClickListener
|
return@setOnClickListener
|
||||||
|
@ -1,14 +1,44 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/main_holder"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/main_coordinator"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
|
android:id="@+id/main_app_bar_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/main_toolbar"
|
||||||
|
android:layout_width="match_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" />
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:id="@+id/main_nested_scrollview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:fillViewport="true"
|
||||||
|
android:scrollbars="none"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/change_keyboard_wrapper"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/change_keyboard_holder"
|
android:id="@+id/change_keyboard_holder"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/big_margin">
|
android:layout_margin="@dimen/normal_margin">
|
||||||
|
|
||||||
<android.widget.TextView
|
<android.widget.TextView
|
||||||
android:id="@+id/change_keyboard"
|
android:id="@+id/change_keyboard"
|
||||||
@ -26,4 +56,6 @@
|
|||||||
android:layout_below="@+id/change_keyboard_holder"
|
android:layout_below="@+id/change_keyboard_holder"
|
||||||
android:layout_margin="@dimen/activity_margin" />
|
android:layout_margin="@dimen/activity_margin" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
@ -1,6 +1,35 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/clipboard_coordinator"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
|
android:id="@+id/coordinator_app_bar_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/clipboard_toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
android:background="@color/color_primary"
|
||||||
|
app:menu="@menu/menu_manage_clipboard_items"
|
||||||
|
app:title="@string/manage_clipboard_items"
|
||||||
|
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:id="@+id/coordinator_nested_scrollview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:fillViewport="true"
|
||||||
|
android:scrollbars="none"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
android:id="@+id/clipboard_items_wrapper"
|
android:id="@+id/clipboard_items_wrapper"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
@ -39,4 +68,6 @@
|
|||||||
android:textSize="@dimen/bigger_text_size"
|
android:textSize="@dimen/bigger_text_size"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
@ -1,10 +1,34 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/settings_scrollview"
|
android:id="@+id/settings_coordinator"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
|
android:id="@+id/settings_app_bar_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/settings_toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
android:background="@color/color_primary"
|
||||||
|
app:title="@string/settings"
|
||||||
|
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:id="@+id/settings_nested_scrollview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:fillViewport="true"
|
||||||
|
android:scrollbars="none"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/settings_holder"
|
android:id="@+id/settings_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -163,4 +187,5 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
@ -5,15 +5,20 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:paddingTop="@dimen/activity_margin">
|
android:paddingTop="@dimen/activity_margin">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyEditText
|
<com.simplemobiletools.commons.views.MyTextInputLayout
|
||||||
android:id="@+id/add_clip_value"
|
android:id="@+id/add_clip_hint"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/activity_margin"
|
android:layout_marginStart="@dimen/activity_margin"
|
||||||
android:layout_marginEnd="@dimen/activity_margin"
|
android:layout_marginEnd="@dimen/activity_margin"
|
||||||
android:hint="@string/clip_text"
|
android:hint="@string/clip_text">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/add_clip_value"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:inputType="textCapSentences|textMultiLine"
|
android:inputType="textCapSentences|textMultiLine"
|
||||||
android:textCursorDrawable="@null"
|
|
||||||
android:textSize="@dimen/bigger_text_size" />
|
android:textSize="@dimen/bigger_text_size" />
|
||||||
|
|
||||||
|
</com.simplemobiletools.commons.views.MyTextInputLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:id="@+id/dialog_holder"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:paddingTop="@dimen/activity_margin">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/add_clip_hint"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/activity_margin"
|
|
||||||
android:layout_marginEnd="@dimen/activity_margin"
|
|
||||||
android:hint="@string/clip_text">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/add_clip_value"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:inputType="textCapSentences|textMultiLine"
|
|
||||||
android:textSize="@dimen/bigger_text_size" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
</RelativeLayout>
|
|
@ -30,7 +30,7 @@
|
|||||||
android:paddingTop="@dimen/small_margin"
|
android:paddingTop="@dimen/small_margin"
|
||||||
android:paddingBottom="@dimen/activity_margin" />
|
android:paddingBottom="@dimen/activity_margin" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.simplemobiletools.commons.views.MyTextInputLayout
|
||||||
android:id="@+id/export_clips_hint"
|
android:id="@+id/export_clips_hint"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -45,6 +45,6 @@
|
|||||||
android:textCursorDrawable="@null"
|
android:textCursorDrawable="@null"
|
||||||
android:textSize="@dimen/normal_text_size" />
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.simplemobiletools.commons.views.MyTextInputLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
@ -1,50 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:id="@+id/export_clips_wrapper"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/export_clips_holder"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingLeft="@dimen/activity_margin"
|
|
||||||
android:paddingTop="@dimen/activity_margin"
|
|
||||||
android:paddingRight="@dimen/activity_margin">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
|
||||||
android:id="@+id/export_clips_path_label"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/small_margin"
|
|
||||||
android:text="@string/path"
|
|
||||||
android:textSize="@dimen/smaller_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
|
||||||
android:id="@+id/export_clips_path"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="@dimen/small_margin"
|
|
||||||
android:paddingStart="@dimen/small_margin"
|
|
||||||
android:paddingTop="@dimen/small_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_margin" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextInputLayout
|
|
||||||
android:id="@+id/export_clips_hint"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/filename_without_txt">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyEditText
|
|
||||||
android:id="@+id/export_clips_filename"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="@dimen/activity_margin"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textCursorDrawable="@null"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
</com.simplemobiletools.commons.views.MyTextInputLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
</ScrollView>
|
|
@ -5,10 +5,10 @@
|
|||||||
android:id="@+id/cab_edit"
|
android:id="@+id/cab_edit"
|
||||||
android:icon="@drawable/ic_edit_vector"
|
android:icon="@drawable/ic_edit_vector"
|
||||||
android:title="@string/edit"
|
android:title="@string/edit"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/cab_delete"
|
android:id="@+id/cab_delete"
|
||||||
android:icon="@drawable/ic_delete_vector"
|
android:icon="@drawable/ic_delete_vector"
|
||||||
android:title="@string/delete"
|
android:title="@string/delete"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always" />
|
||||||
</menu>
|
</menu>
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
android:id="@+id/settings"
|
android:id="@+id/settings"
|
||||||
android:icon="@drawable/ic_settings_cog_vector"
|
android:icon="@drawable/ic_settings_cog_vector"
|
||||||
android:title="@string/settings"
|
android:title="@string/settings"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/about"
|
android:id="@+id/about"
|
||||||
android:icon="@drawable/ic_info_vector"
|
android:icon="@drawable/ic_info_vector"
|
||||||
android:title="@string/about"
|
android:title="@string/about"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always" />
|
||||||
</menu>
|
</menu>
|
||||||
|
Reference in New Issue
Block a user