mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-01-29 21:49:16 +01:00
update some colors
This commit is contained in:
parent
dfb0a5b89b
commit
02e005ec37
@ -32,7 +32,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.simplemobiletools:commons:2.1.7'
|
||||
compile 'com.simplemobiletools:commons:2.1.8'
|
||||
compile 'com.facebook.stetho:stetho:1.4.1'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import android.view.MenuItem
|
||||
import android.view.View
|
||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||
import com.simplemobiletools.commons.extensions.toast
|
||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||
import com.simplemobiletools.commons.extensions.value
|
||||
import com.simplemobiletools.commons.helpers.LICENSE_AMBILWARNA
|
||||
import com.simplemobiletools.commons.helpers.LICENSE_KOTLIN
|
||||
@ -18,11 +19,11 @@ import com.simplemobiletools.commons.helpers.LICENSE_STETHO
|
||||
import com.simplemobiletools.notes.BuildConfig
|
||||
import com.simplemobiletools.notes.R
|
||||
import com.simplemobiletools.notes.adapters.NotesPagerAdapter
|
||||
import com.simplemobiletools.notes.helpers.DBHelper
|
||||
import com.simplemobiletools.notes.dialogs.NewNoteDialog
|
||||
import com.simplemobiletools.notes.dialogs.OpenNoteDialog
|
||||
import com.simplemobiletools.notes.dialogs.RenameNoteDialog
|
||||
import com.simplemobiletools.notes.extensions.getTextSize
|
||||
import com.simplemobiletools.notes.helpers.DBHelper
|
||||
import com.simplemobiletools.notes.helpers.TYPE_NOTE
|
||||
import com.simplemobiletools.notes.models.Note
|
||||
import kotlinx.android.synthetic.main.activity_main.*
|
||||
@ -66,6 +67,7 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
|
||||
setGravity(Gravity.CENTER_VERTICAL)
|
||||
setNonPrimaryAlpha(0.4f)
|
||||
}
|
||||
updateTextColors(view_pager)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
@ -4,6 +4,7 @@ import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.widget.AdapterView
|
||||
import android.widget.ArrayAdapter
|
||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||
import com.simplemobiletools.notes.R
|
||||
import com.simplemobiletools.notes.extensions.updateWidget
|
||||
import com.simplemobiletools.notes.helpers.DBHelper
|
||||
@ -14,11 +15,16 @@ class SettingsActivity : SimpleActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_settings)
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
||||
setupCustomizeColors()
|
||||
setupFontSize()
|
||||
setupWidgetNote()
|
||||
setupGravity()
|
||||
updateTextColors(settings_scrollview)
|
||||
}
|
||||
|
||||
private fun setupCustomizeColors() {
|
||||
|
@ -10,10 +10,11 @@ import android.view.ViewGroup
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import com.simplemobiletools.commons.extensions.value
|
||||
import com.simplemobiletools.notes.R
|
||||
import com.simplemobiletools.notes.helpers.DBHelper
|
||||
import com.simplemobiletools.notes.extensions.getTextGravity
|
||||
import com.simplemobiletools.notes.extensions.getTextSize
|
||||
import com.simplemobiletools.notes.extensions.updateWidget
|
||||
import com.simplemobiletools.notes.helpers.Config
|
||||
import com.simplemobiletools.notes.helpers.DBHelper
|
||||
import com.simplemobiletools.notes.helpers.NOTE_ID
|
||||
import com.simplemobiletools.notes.models.Note
|
||||
import kotlinx.android.synthetic.main.fragment_note.view.*
|
||||
@ -29,8 +30,6 @@ class NoteFragment : Fragment() {
|
||||
noteId = arguments.getInt(NOTE_ID)
|
||||
mDb = DBHelper.newInstance(context)
|
||||
note = mDb.getNote(noteId) ?: return view
|
||||
|
||||
view.notes_view.setText(note.value)
|
||||
return view
|
||||
}
|
||||
|
||||
@ -52,8 +51,14 @@ class NoteFragment : Fragment() {
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
view.notes_view.setTextSize(TypedValue.COMPLEX_UNIT_PX, context.getTextSize())
|
||||
view.notes_view.gravity = context.getTextGravity()
|
||||
|
||||
val config = Config.newInstance(context)
|
||||
view.notes_view.apply {
|
||||
setText(note.value)
|
||||
setColors(config.textColor, config.primaryColor, config.backgroundColor)
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, context.getTextSize())
|
||||
gravity = context.getTextGravity()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
|
@ -18,6 +18,7 @@
|
||||
android:background="@null"
|
||||
android:gravity="top"
|
||||
android:inputType="textCapSentences|textMultiLine"
|
||||
android:padding="@dimen/activity_margin"/>
|
||||
android:padding="@dimen/activity_margin"
|
||||
android:textCursorDrawable="@null"/>
|
||||
</ScrollView>
|
||||
</RelativeLayout>
|
||||
|
@ -14,5 +14,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/activity_margin"
|
||||
android:inputType="textCapSentences"/>
|
||||
android:inputType="textCapSentences"
|
||||
android:textCursorDrawable="@null"/>
|
||||
</LinearLayout>
|
||||
|
@ -13,5 +13,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/activity_margin"
|
||||
android:inputType="textCapSentences"
|
||||
android:singleLine="true"/>
|
||||
android:singleLine="true"
|
||||
android:textCursorDrawable="@null"/>
|
||||
</LinearLayout>
|
||||
|
Loading…
x
Reference in New Issue
Block a user