Settings refactor (#166)
This commit is contained in:

committed by
Mikołaj Pich

parent
b680cc4366
commit
837bce7286
@ -4,10 +4,10 @@
|
||||
android:viewportHeight="24"
|
||||
android:viewportWidth="24">
|
||||
<path
|
||||
android:fillColor="#FFF"
|
||||
android:fillColor="#000"
|
||||
android:pathData="M11,7h2v2h-2zM11,11h2v6h-2z" />
|
||||
<path
|
||||
android:fillColor="#FFF"
|
||||
android:fillColor="#000"
|
||||
android:pathData="M12,2a10,10 0,1 0,0 20,10 10,0 0,0 0,-20zM12,20a8,8 0,1 1,0 -16,8 8,0 0,1
|
||||
0,16z" />
|
||||
</vector>
|
16
app/src/main/res/drawable/ic_more_settings_24dp.xml
Normal file
16
app/src/main/res/drawable/ic_more_settings_24dp.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M19.43 12.98a7.8 7.8 0 0 0 0-1.96l2.11-1.65a0.5 0.5 0 0 0
|
||||
0.12-0.64l-2-3.46c-0.12-0.22-0.39-0.3-0.61-0.22l-2.49 1a7.3 7.3 0 0 0-1.69-0.98l-0.38-2.65A0.49
|
||||
0.49 0 0 0 14 2h-4a0.49 0.49 0 0 0-0.49 0.42l-0.38 2.65c-0.61 0.25-1.17 0.59-1.69 0.98l
|
||||
-2.49-1a 0.49 0.49 0 0 0-0.61 0.22l-2 3.46a0.5 0.5 0 0 0 0.12 0.64l2.11 1.65a7.93 7.93
|
||||
0 0 0 0 1.96l-2.11 1.65a0.5 0.5 0 0 0-0.12 0.64l2 3.46c0.12 0.22 0.39 0.3 0.61 0.22l2.49-1c0.52
|
||||
0.4 1.08 0.73 1.69 0.98l 0.38 2.65c 0.03 0.24 0.24 0.42 0.49 0.42h4c0.25 0 0.46-0.18 0.49-0.42l
|
||||
0.38-2.65a7.68 7.68 0 0 0 1.69-0.98l2.49 1c0.23 0.09 0.49 0 0.61-0.22l2-3.46a0.5 0.5
|
||||
0 0 0-0.12-0.64l-2.11-1.65zM12 15.5a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7z" />
|
||||
</vector>
|
@ -9,6 +9,7 @@
|
||||
android:id="@+id/mainAppBarContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/WulkanowyTheme.ActionBar"
|
||||
app:elevation="0dp">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
|
10
app/src/main/res/layout/fragment_more.xml
Normal file
10
app/src/main/res/layout/fragment_more.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/moreRecycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</FrameLayout>
|
30
app/src/main/res/layout/item_more.xml
Normal file
30
app/src/main/res/layout/item_more.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/moreItemImage"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
app:srcCompat="@drawable/ic_more_settings_24dp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/moreItemTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginLeft="32dp"
|
||||
android:text="@string/app_name"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
@ -10,6 +10,7 @@
|
||||
<string name="timetable_title">Plan lekcji</string>
|
||||
<string name="settings_title">Ustawienia</string>
|
||||
<string name="more_title">Więcej</string>
|
||||
<string name="about_title">O aplikacji</string>
|
||||
|
||||
|
||||
<!--Login form-->
|
||||
@ -92,6 +93,9 @@
|
||||
<string name="exam_type">Typ</string>
|
||||
<string name="exam_entry_date">Data wpisu</string>
|
||||
|
||||
<!--About-->
|
||||
<string name="about_source_code">Kod źródłowy</string>
|
||||
<string name="about_feedback">Zgłoś błąd</string>
|
||||
|
||||
<!--Generic-->
|
||||
<string name="all_description">Opis</string>
|
||||
@ -130,22 +134,11 @@
|
||||
<string name="pref_services_interval">Interwał aktualizacji</string>
|
||||
<string name="pref_services_wifi">Tylko WiFi</string>
|
||||
|
||||
<string name="pref_about_description">Informacje o Wulkanowym</string>
|
||||
<string name="pref_about_version">Wersja</string>
|
||||
<string name="pref_about_osl">Licencje open source</string>
|
||||
<string name="pref_about_osl_summary">Szczegóły licencji na oprogramowanie open source</string>
|
||||
<string name="pref_about_support">Kod źródłowy i feedback</string>
|
||||
|
||||
<string name="about_programmer_step1">Nie, nie zostaniesz programistą!</string>
|
||||
<string name="about_programmer_step2">Musisz bardziej się postarać!</string>
|
||||
<string name="about_programmer_step3">Kliknij jeszcze parę razy</string>
|
||||
<string name="about_programmer_description">Odwiedź zakładkę Kod źródłowy i pokaż jaki z ciebie programista!</string>
|
||||
|
||||
<string name="pref_restart">Wymagany restart</string>
|
||||
|
||||
|
||||
<!--Grade notify-->
|
||||
<string name="notify_grade_chanell">Nowe oceny</string>
|
||||
<string name="notify_grade_chanel">Nowe oceny</string>
|
||||
<plurals name="notify_grade_new_items">
|
||||
<item quantity="one">Dostałeś %1$d ocenę</item>
|
||||
<item quantity="few">"Dostałeś %1$d oceny</item>
|
||||
|
17
app/src/main/res/values/library_wulkanowy_api.xml
Normal file
17
app/src/main/res/values/library_wulkanowy_api.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="define_WulkanowyApi" translatable="false" />
|
||||
|
||||
<string name="library_WulkanowyApi_author" translatable="false">Wulkanowy</string>
|
||||
<string name="library_WulkanowyApi_authorWebsite" translatable="false">https://github.com/wulkanowy</string>
|
||||
|
||||
<string name="library_WulkanowyApi_libraryName" translatable="false">UONET+ Scraping API</string>
|
||||
<string name="library_WulkanowyApi_libraryDescription" translatable="false">The UONET+ client using web scraping</string>
|
||||
<string name="library_WulkanowyApi_libraryWebsite" translatable="false">https://github.com/wulkanowy/api</string>
|
||||
<string name="library_WulkanowyApi_libraryVersion" translatable="false">Development</string>
|
||||
|
||||
<string name="library_WulkanowyApi_isOpenSource" translatable="false">true</string>
|
||||
<string name="library_WulkanowyApi_repositoryLink" translatable="false">https://github.com/wulkanowy/api</string>
|
||||
|
||||
<string name="library_WulkanowyApi_licenseId" translatable="false">apache_2_0</string>
|
||||
</resources>
|
@ -10,6 +10,7 @@
|
||||
<string name="timetable_title">Timetable</string>
|
||||
<string name="settings_title">Settings</string>
|
||||
<string name="more_title">More</string>
|
||||
<string name="about_title">About</string>
|
||||
|
||||
|
||||
<!--Login form-->
|
||||
@ -87,6 +88,10 @@
|
||||
<string name="exam_type">Type</string>
|
||||
<string name="exam_entry_date">Entry date</string>
|
||||
|
||||
<!--About-->
|
||||
<string name="about_source_code">Source code</string>
|
||||
<string name="about_feedback">Report a bug</string>
|
||||
|
||||
|
||||
<!--Generic-->
|
||||
<string name="all_description">Description</string>
|
||||
@ -125,22 +130,11 @@
|
||||
<string name="pref_services_interval">Updates interval</string>
|
||||
<string name="pref_services_wifi">Only WiFi</string>
|
||||
|
||||
<string name="pref_about_description">About Wulkanowy</string>
|
||||
<string name="pref_about_version">Version</string>
|
||||
<string name="pref_about_osl">Open source licences</string>
|
||||
<string name="pref_about_osl_summary">License details for open source software</string>
|
||||
<string name="pref_about_support">Source code & feedback</string>
|
||||
|
||||
<string name="about_programmer_step1">No, you will not become a programmer!</string>
|
||||
<string name="about_programmer_step2">You must try harder!</string>
|
||||
<string name="about_programmer_step3">Click a few more times</string>
|
||||
<string name="about_programmer_description">Visit the Source code tab and show how good a programmer you are!</string>
|
||||
|
||||
<string name="pref_restart">Restart required</string>
|
||||
|
||||
|
||||
<!--Grade notify-->
|
||||
<string name="notify_grade_chanell">New grades</string>
|
||||
<string name="notify_grade_chanel">New grades</string>
|
||||
<plurals name="notify_grade_new_items">
|
||||
<item quantity="one">You received %1$d grade</item>
|
||||
<item quantity="other">You received %1$d grades</item>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<resources>
|
||||
|
||||
<style name="WulkanowyTheme" parent="@style/Base.Theme.AppCompat.Light">
|
||||
<style name="WulkanowyTheme" parent="@style/Theme.AppCompat.Light">
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorPrimary</item>
|
||||
@ -13,7 +13,6 @@
|
||||
<item name="titleTextColor">@android:color/primary_text_dark</item>
|
||||
<item name="subtitleTextColor">@android:color/primary_text_dark</item>
|
||||
<item name="android:colorBackground">@android:color/white</item>
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
|
||||
<item name="bottomNavBackground">@color/bottom_nav_background_inverse</item>
|
||||
<item name="android:windowAnimationStyle">@null</item>
|
||||
</style>
|
||||
@ -27,12 +26,7 @@
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="DialogFragmentTheme" parent="Theme.AppCompat.DayNight.Dialog.Alert">
|
||||
<item name="android:textColorTertiary">@android:color/primary_text_light</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">false</item>
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowNoTitle">false</item>
|
||||
<style name="WulkanowyTheme.ActionBar" parent="WulkanowyTheme">
|
||||
<item name="colorControlNormal">@android:color/white</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
@ -1,67 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory android:title="@string/pref_view_header">
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<PreferenceCategory
|
||||
android:title="@string/pref_view_header"
|
||||
app:iconSpaceReserved="false">
|
||||
<ListPreference
|
||||
android:defaultValue="0"
|
||||
android:entries="@array/startup_tab_entries"
|
||||
android:entryValues="@array/startup_tab_value"
|
||||
android:key="startup_tab"
|
||||
android:key="start_menu"
|
||||
android:summary="%s"
|
||||
android:title="@string/pref_view_list" />
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="grades_summary"
|
||||
android:summary="@string/pref_restart"
|
||||
android:title="@string/pref_view_summary" />
|
||||
android:title="@string/pref_view_list"
|
||||
app:iconSpaceReserved="false" />
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="attendance_present"
|
||||
android:summary="@string/pref_restart"
|
||||
android:title="@string/pref_view_present" />
|
||||
<ListPreference
|
||||
android:defaultValue="1"
|
||||
android:entries="@array/theme_entries"
|
||||
android:entryValues="@array/theme_values"
|
||||
android:key="theme"
|
||||
android:summary="%s"
|
||||
android:title="@string/pref_view_theme_dark" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/pref_services_header">
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="services_enable"
|
||||
android:title="@string/pref_services_switch" />
|
||||
<ListPreference
|
||||
android:defaultValue="60"
|
||||
android:dependency="services_enable"
|
||||
android:entries="@array/services_interval_entries"
|
||||
android:entryValues="@array/services_interval_value"
|
||||
android:key="services_interval"
|
||||
android:summary="%s"
|
||||
android:title="@string/pref_services_interval" />
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:dependency="services_enable"
|
||||
android:key="services_disable_mobile"
|
||||
android:title="@string/pref_services_wifi" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/pref_notify_header">
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:dependency="services_enable"
|
||||
android:key="notify_enable"
|
||||
android:title="@string/pref_notify_switch" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/pref_about_description">
|
||||
<Preference
|
||||
android:key="about_version"
|
||||
android:title="@string/pref_about_version" />
|
||||
<Preference
|
||||
android:key="about_osl"
|
||||
android:summary="@string/pref_about_osl_summary"
|
||||
android:title="@string/pref_about_osl" />
|
||||
<Preference
|
||||
android:key="about_repo"
|
||||
android:title="@string/pref_about_support" />
|
||||
android:title="@string/pref_view_present"
|
||||
app:iconSpaceReserved="false" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
|
Reference in New Issue
Block a user