mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-01-30 14:04:48 +01:00
some style updates
This commit is contained in:
parent
b8479144fb
commit
5fbeecb010
@ -18,7 +18,6 @@ import com.simplemobiletools.notes.databases.DBHelper
|
||||
import com.simplemobiletools.notes.dialogs.NewNoteDialog
|
||||
import com.simplemobiletools.notes.dialogs.OpenNoteDialog
|
||||
import com.simplemobiletools.notes.dialogs.RenameNoteDialog
|
||||
import com.simplemobiletools.notes.extensions.dpToPx
|
||||
import com.simplemobiletools.notes.extensions.getTextSize
|
||||
import com.simplemobiletools.notes.models.Note
|
||||
import kotlinx.android.synthetic.main.activity_main.*
|
||||
@ -87,15 +86,13 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
when (item.itemId) {
|
||||
R.id.open_note -> displayOpenNoteDialog()
|
||||
R.id.new_note -> displayNewNoteDialog()
|
||||
R.id.open_note -> displayOpenNoteDialog()
|
||||
R.id.new_note -> displayNewNoteDialog()
|
||||
R.id.rename_note -> displayRenameDialog()
|
||||
R.id.share -> shareText()
|
||||
R.id.share -> shareText()
|
||||
R.id.delete_note -> displayDeleteNotePrompt()
|
||||
R.id.settings ->
|
||||
startActivity(Intent(applicationContext, SettingsActivity::class.java))
|
||||
R.id.about ->
|
||||
startActivity(Intent(applicationContext, AboutActivity::class.java))
|
||||
R.id.settings -> startActivity(Intent(applicationContext, SettingsActivity::class.java))
|
||||
R.id.about -> startActivity(Intent(applicationContext, AboutActivity::class.java))
|
||||
else -> return super.onOptionsItemSelected(item)
|
||||
}
|
||||
return true
|
||||
|
@ -4,7 +4,6 @@ import android.appwidget.AppWidgetManager
|
||||
import android.content.ComponentName
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.util.TypedValue
|
||||
import android.view.Gravity
|
||||
import com.simplemobiletools.notes.*
|
||||
|
||||
@ -33,5 +32,3 @@ fun Context.updateWidget() {
|
||||
sendBroadcast(this)
|
||||
}
|
||||
}
|
||||
|
||||
fun Context.dpToPx(valueInDp: Float) = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, valueInDp, resources.displayMetrics)
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.simplemobiletools.notes.views.MyViewPager
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
Loading…
x
Reference in New Issue
Block a user