diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/activities/WidgetConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/notes/activities/WidgetConfigureActivity.kt index 10bbf6bf..ed9812d5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/activities/WidgetConfigureActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/activities/WidgetConfigureActivity.kt @@ -4,19 +4,20 @@ import android.app.Activity import android.appwidget.AppWidgetManager import android.content.Intent import android.graphics.Color +import android.graphics.drawable.ColorDrawable import android.os.Bundle import android.util.TypedValue import android.widget.RemoteViews import android.widget.SeekBar import com.simplemobiletools.commons.dialogs.ColorPickerDialog -import com.simplemobiletools.commons.extensions.adjustAlpha -import com.simplemobiletools.commons.extensions.setBackgroundColor -import com.simplemobiletools.commons.extensions.setFillWithStroke +import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.IS_CUSTOMIZING_COLORS import com.simplemobiletools.notes.R import com.simplemobiletools.notes.extensions.config +import com.simplemobiletools.notes.extensions.dbHelper import com.simplemobiletools.notes.extensions.getTextSize import com.simplemobiletools.notes.helpers.MyWidgetProvider +import com.simplemobiletools.notes.models.Note import kotlinx.android.synthetic.main.widget_config.* class WidgetConfigureActivity : SimpleActivity() { @@ -25,6 +26,7 @@ class WidgetConfigureActivity : SimpleActivity() { private var mBgColor = 0 private var mBgColorWithoutTransparency = 0 private var mTextColor = 0 + private var mNotes = ArrayList() public override fun onCreate(savedInstanceState: Bundle?) { useDynamicTheme = false @@ -40,9 +42,12 @@ class WidgetConfigureActivity : SimpleActivity() { finish() } + updateTextColors(notes_picker_holder) config_save.setOnClickListener { saveConfig() } config_bg_color.setOnClickListener { pickBackgroundColor() } config_text_color.setOnClickListener { pickTextColor() } + notes_picker_value.setOnClickListener { showNoteSelector() } + notes_picker_holder.background = ColorDrawable(config.backgroundColor) } override fun onResume() { @@ -68,6 +73,12 @@ class WidgetConfigureActivity : SimpleActivity() { mTextColor = config.widgetTextColor updateTextColor() + mNotes = dbHelper.getNotes() + notes_picker_holder.beVisibleIf(mNotes.size > 1) + } + + private fun showNoteSelector() { + } private fun saveConfig() { diff --git a/app/src/main/res/layout/widget_config.xml b/app/src/main/res/layout/widget_config.xml index 5054d5dd..c96ee84f 100644 --- a/app/src/main/res/layout/widget_config.xml +++ b/app/src/main/res/layout/widget_config.xml @@ -7,11 +7,36 @@ android:layout_centerHorizontal="true" android:layout_margin="@dimen/activity_margin"> + + + + + + + + Yeni qeyd yarat Qeydə əlavə et You have some unsaved changes. What do you want to do with them? + Note shown in the widget: Faylı Aç diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 4b6120bb..2940b45c 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -16,6 +16,7 @@ Opret en ny note Føj til note You have some unsaved changes. What do you want to do with them? + Note shown in the widget: Åbn fil … diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 87f48283..8e72bfc3 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -16,6 +16,7 @@ Neue Notiz erstellen Zu Notiz hinzufügen You have some unsaved changes. What do you want to do with them? + Note shown in the widget: Datei öffnen diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 77649007..032dadfe 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -16,6 +16,7 @@ Crear una nota nueva Añadir a la nota You have some unsaved changes. What do you want to do with them? + Note shown in the widget: Abrir archivo diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index a44695f9..1989063a 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -16,6 +16,7 @@ Créer une nouvelle note Ajouter à la note You have some unsaved changes. What do you want to do with them? + Note shown in the widget: Ouvrir le fichier diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index b3bde19e..4501c282 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -18,6 +18,7 @@ Crear unha nova nota Engadir a nota You have some unsaved changes. What do you want to do with them? + Note shown in the widget: Abrir ficheiro diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 37f8fd92..4ed43cd5 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -16,6 +16,7 @@ Stvori novu bilješku Dodaj u bilješku You have some unsaved changes. What do you want to do with them? + Note shown in the widget: Otvori datoteku diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 2b692562..b9c6ebb9 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -16,6 +16,7 @@ Create a new note Add to note You have some unsaved changes. What do you want to do with them? + Note shown in the widget: Fájl megnyitása diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index a9efb8bb..65a188a3 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -16,6 +16,7 @@ Create a new note Add to note You have some unsaved changes. What do you want to do with them? + Note shown in the widget: Open file diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index ce1780b9..a9380c12 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -16,6 +16,7 @@ Create a new note Add to note You have some unsaved changes. What do you want to do with them? + Note shown in the widget: Open file diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 8ed1e36b..a510d8e4 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -16,6 +16,7 @@ Kurti naują įrašą Papildyti įrašą You have some unsaved changes. What do you want to do with them? + Note shown in the widget: Atverti failą diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 44c48fe1..5d2d74a7 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -16,6 +16,7 @@ Nieuwe notitie maken Aan notitie toevoegen You have some unsaved changes. What do you want to do with them? + Note shown in the widget: Bestand openen diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index a983db35..79b9d2c8 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -16,6 +16,7 @@ Utwórz nową notatkę Dodaj do notatki You have some unsaved changes. What do you want to do with them? + Note shown in the widget: Otwórz plik diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 6fadcc34..4367691a 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -16,6 +16,7 @@ Criar uma nova nota Adicionar à nota You have some unsaved changes. What do you want to do with them? + Note shown in the widget: Abrir arquivo diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 4f0a9389..ea452852 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -16,6 +16,7 @@ Criar uma nota Adicionar a uma nota You have some unsaved changes. What do you want to do with them? + Note shown in the widget: Abrir ficheiro diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 5e9c1977..29727143 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -16,6 +16,7 @@ Новая заметка Добавить к заметке You have some unsaved changes. What do you want to do with them? + Note shown in the widget: Открыть файл diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 5cbcd57f..458b3a27 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -16,6 +16,7 @@ Vytvoriť novú poznámku Pridať k poznámke Máte nejaké neuložené zmeny. Čo s nimi chcete spraviť? + Poznámka zobrazená vo widgete: Otvoriť súbor diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 4c189783..7ce5d097 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -16,6 +16,7 @@ Skapa en ny anteckning Lägg till i anteckning You have some unsaved changes. What do you want to do with them? + Note shown in the widget: Öppna fil diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 4cb566d3..873c7742 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -16,6 +16,7 @@ Yeni not oluştur Nota ekle You have some unsaved changes. What do you want to do with them? + Note shown in the widget: Dosya aç diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 15f6003b..9bbd9e81 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -16,6 +16,7 @@ 创建一个新的笔记 添加到笔记 You have some unsaved changes. What do you want to do with them? + Note shown in the widget: 打开文件 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 7623f117..d81731f3 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -16,6 +16,7 @@ 建立新筆記 添加到筆記 You have some unsaved changes. What do you want to do with them? + Note shown in the widget: 打開檔案 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 00ba929a..8c3d0912 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -16,6 +16,7 @@ Create a new note Add to note You have some unsaved changes. What do you want to do with them? + Note shown in the widget: Open file