mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-14 18:57:07 -07:00
Some Android Settings
This commit is contained in:
parent
98f9f3f6e9
commit
65193fb575
5 changed files with 45 additions and 14 deletions
|
@ -20,6 +20,7 @@ package com.metallic.chiaki.settings
|
|||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.metallic.chiaki.R
|
||||
import kotlinx.android.synthetic.main.activity_settings.*
|
||||
|
||||
class SettingsActivity: AppCompatActivity()
|
||||
{
|
||||
|
@ -27,5 +28,7 @@ class SettingsActivity: AppCompatActivity()
|
|||
{
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_settings)
|
||||
title = ""
|
||||
setSupportActionBar(toolbar)
|
||||
}
|
||||
}
|
|
@ -122,7 +122,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:fontFamily="sans-serif-condensed"
|
||||
android:text="@string/main_title"
|
||||
android:text="@string/title_main"
|
||||
android:textColor="?attr/colorOnPrimary"
|
||||
android:textSize="20dp" />
|
||||
|
||||
|
|
|
@ -1,14 +1,32 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:theme="@style/AppTheme.Toolbar">
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:fontFamily="sans-serif-condensed"
|
||||
android:text="@string/title_settings"
|
||||
android:textColor="?attr/colorOnPrimary"
|
||||
android:textSize="20dp" />
|
||||
</com.google.android.material.appbar.MaterialToolbar>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/settingsFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:name="com.metallic.chiaki.settings.SettingsFragment" />
|
||||
android:layout_height="0dp"
|
||||
android:name="com.metallic.chiaki.settings.SettingsFragment"
|
||||
app:layout_constraintTop_toBottomOf="@id/toolbar"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,6 +1,7 @@
|
|||
<resources>
|
||||
<string name="app_name">Chiaki</string>
|
||||
<string name="main_title">Chiaki 千秋</string>
|
||||
<string name="title_main">Chiaki 千秋</string>
|
||||
<string name="title_settings">Settings</string>
|
||||
<string name="alert_message_session_quit">Session has quit: %s</string>
|
||||
<string name="alert_message_session_create_error">Failed to create Session: %s</string>
|
||||
<string name="alert_message_login_pin_request">Login PIN:</string>
|
||||
|
@ -38,4 +39,8 @@
|
|||
<string name="alert_regist_duplicate">The console with MAC %s has already been registered. Should the previous record be overwritten?</string>
|
||||
<string name="action_regist_overwrite">Overwrite</string>
|
||||
<string name="action_regist_discard">Cancel</string>
|
||||
<string name="preferences_category_title_general">General</string>
|
||||
<string name="preferences_category_title_stream">Stream</string>
|
||||
<string name="preferences_registered_hosts_title">Registered Consoles</string>
|
||||
<string name="preferences_registered_hosts_summary">Currently registered: %d</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<SwitchPreferenceCompat
|
||||
app:key="notifications"
|
||||
app:title="Enable message notifications"/>
|
||||
<PreferenceCategory
|
||||
app:key="category_general"
|
||||
app:title="@string/preferences_category_title_general">
|
||||
<Preference
|
||||
app:key="registered_hosts"
|
||||
app:summary="@string/preferences_registered_hosts_summary"
|
||||
app:title="@string/preferences_registered_hosts_title"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
<Preference
|
||||
app:key="feedback"
|
||||
app:title="Send feedback"
|
||||
app:summary="Report technical issues or suggest new features"/>
|
||||
<PreferenceCategory
|
||||
app:key="category_stream"
|
||||
app:title="@string/preferences_category_title_stream">
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
Loading…
Add table
Add a link
Reference in a new issue