mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-20 05:23:12 -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 android.os.Bundle
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import com.metallic.chiaki.R
|
import com.metallic.chiaki.R
|
||||||
|
import kotlinx.android.synthetic.main.activity_settings.*
|
||||||
|
|
||||||
class SettingsActivity: AppCompatActivity()
|
class SettingsActivity: AppCompatActivity()
|
||||||
{
|
{
|
||||||
|
@ -27,5 +28,7 @@ class SettingsActivity: AppCompatActivity()
|
||||||
{
|
{
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_settings)
|
setContentView(R.layout.activity_settings)
|
||||||
|
title = ""
|
||||||
|
setSupportActionBar(toolbar)
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -122,7 +122,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:fontFamily="sans-serif-condensed"
|
android:fontFamily="sans-serif-condensed"
|
||||||
android:text="@string/main_title"
|
android:text="@string/title_main"
|
||||||
android:textColor="?attr/colorOnPrimary"
|
android:textColor="?attr/colorOnPrimary"
|
||||||
android:textSize="20dp" />
|
android:textSize="20dp" />
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,32 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="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
|
<fragment
|
||||||
android:id="@+id/settingsFragment"
|
android:id="@+id/settingsFragment"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="0dp"
|
||||||
android:name="com.metallic.chiaki.settings.SettingsFragment" />
|
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>
|
<resources>
|
||||||
<string name="app_name">Chiaki</string>
|
<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_quit">Session has quit: %s</string>
|
||||||
<string name="alert_message_session_create_error">Failed to create Session: %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>
|
<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="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_overwrite">Overwrite</string>
|
||||||
<string name="action_regist_discard">Cancel</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>
|
</resources>
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto">
|
<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
<SwitchPreferenceCompat
|
<PreferenceCategory
|
||||||
app:key="notifications"
|
app:key="category_general"
|
||||||
app:title="Enable message notifications"/>
|
app:title="@string/preferences_category_title_general">
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
app:key="feedback"
|
app:key="registered_hosts"
|
||||||
app:title="Send feedback"
|
app:summary="@string/preferences_registered_hosts_summary"
|
||||||
app:summary="Report technical issues or suggest new features"/>
|
app:title="@string/preferences_registered_hosts_title"/>
|
||||||
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
<PreferenceCategory
|
||||||
|
app:key="category_stream"
|
||||||
|
app:title="@string/preferences_category_title_stream">
|
||||||
|
</PreferenceCategory>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
Loading…
Add table
Add a link
Reference in a new issue