Skip to content

Commit

Permalink
Merge branch 'settings_layout_fix' of https://github.com/lukeswitz/haven
Browse files Browse the repository at this point in the history
 into lukeswitz-settings_layout_fix
  • Loading branch information
n8fr8 committed Feb 28, 2019
2 parents 292c2a1 + 93e8587 commit 13a67c3
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 15 deletions.
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,15 @@ android {
}
}

configurations {
all*.exclude group: 'com.google.guava', module: 'listenablefuture'
}

dependencies {
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.preference:preference:1.0.0'
implementation 'androidx.preference:preference:1.1.0-alpha03'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.annotation:annotation:1.0.1'
implementation 'com.google.android.material:material:1.0.0'
Expand Down
53 changes: 39 additions & 14 deletions src/main/res/xml/settings.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">


<Preference
app:iconSpaceReserved="false"
android:key="config_delay_time"
android:title="@string/timer_delay_label" />

<EditTextPreference
app:iconSpaceReserved="false"
android:dialogLayout="@layout/pref_dialog_edit_text"
android:dialogMessage="@string/config_storage_page_hint"
android:key="config_base_storage"
Expand All @@ -16,53 +19,67 @@
/>

<Preference
app:iconSpaceReserved="false"
android:key="config_battery_optimizations"
android:title="@string/disable_battery_opt_title"
android:summary="@string/disable_battery_opt_summary"/>

<PreferenceCategory android:title="@string/video_settings">
<PreferenceCategory
app:iconSpaceReserved="false"
android:title="@string/video_settings">
<Preference
app:iconSpaceReserved="false"
android:key="config_video_length"
android:title="@string/config_video_length_label" />

<SwitchPreference
app:iconSpaceReserved="false"
android:defaultValue="false"
android:key="@string/video_active_preference_key"
android:title="@string/video_monitoring"/>
</PreferenceCategory>

<PreferenceCategory android:title="@string/sensors">
<PreferenceCategory
app:iconSpaceReserved="false"
android:title="@string/sensors">

<ListPreference
app:iconSpaceReserved="false"
android:entries="@array/camera"
android:entryValues="@array/camera_alias"
android:key="camera"
android:summary="%s"
android:title="@string/camera_prompt" />

<Preference
app:iconSpaceReserved="false"
android:key="camera_sensitivity"
android:title="@string/camera_sensitivity" />

<Preference
app:iconSpaceReserved="false"
android:key="config_sound"
android:title="@string/microphone_sensitivity" />

<Preference
app:iconSpaceReserved="false"
android:key="config_movement"
android:title="@string/accelerometer_prompt" />


</PreferenceCategory>
<PreferenceCategory android:title="@string/label_notifications">

<PreferenceCategory
app:iconSpaceReserved="false"
android:title="@string/label_notifications">

<SwitchPreference
app:iconSpaceReserved="false"
android:defaultValue="false"
android:key="remote_notification_active"
android:title="@string/remote_notification_label" />

<EditTextPreference
style="@style/AppPreference.DialogPreferenceSave"
app:iconSpaceReserved="false"
android:dialogLayout="@layout/pref_dialog_edit_text_hint"
android:dialogMessage="@string/sms_dialog_message"
android:inputType="phone"
Expand All @@ -71,7 +88,7 @@
android:title="@string/phone_number" />

<EditTextPreference
style="@style/AppPreference.DialogPreferenceRegister"
app:iconSpaceReserved="false"
android:dialogLayout="@layout/pref_dialog_edit_text_hint_signal"
android:dialogMessage="@string/register_signal_desc"
android:inputType="phone"
Expand All @@ -80,7 +97,7 @@
android:title="@string/signal_number" />

<EditTextPreference
style="@style/AppPreference.DialogPreferenceVerify"
app:iconSpaceReserved="false"
android:dialogLayout="@layout/pref_dialog_edit_text"
android:dialogMessage="@string/enter_verification"
android:inputType="number"
Expand All @@ -89,25 +106,27 @@
android:title="@string/verify_signal" />

<EditTextPreference
style="@style/AppPreference.DialogPreferenceSave"
app:iconSpaceReserved="false"
android:dialogLayout="@layout/pref_dialog_edit_text"
android:dialogMessage="@string/notification_time_dialog"
android:inputType="number"
android:key="notification_time"
android:summary="@string/notification_time_summary"
android:title="@string/notification_time"
/>
android:title="@string/notification_time" />

</PreferenceCategory>
<PreferenceCategory android:title="@string/hearbeat_monitor">
<PreferenceCategory
app:iconSpaceReserved="false"
android:title="@string/hearbeat_monitor">

<SwitchPreference
app:iconSpaceReserved="false"
android:defaultValue="false"
android:key="heartbeat_monitor_active"
android:title="@string/hearbeat_monitor_enable" />

<EditTextPreference
style="@style/AppPreference.DialogPreferenceSave"
app:iconSpaceReserved="false"
android:dialogLayout="@layout/pref_dialog_edit_text"
android:dialogMessage="@string/heartbeat_time_dialog"
android:inputType="number"
Expand All @@ -116,6 +135,7 @@
android:title="@string/hearbeat_monitor_summary"/>

<EditTextPreference
app:iconSpaceReserved="false"
android:dialogLayout="@layout/pref_dialog_edit_text"
android:dialogMessage="@string/hearbeat_message_dialog"
android:inputType="text"
Expand All @@ -124,22 +144,27 @@
android:summary="@string/hearbeat_message_summary" />

</PreferenceCategory>
<PreferenceCategory android:title="@string/remote_access">
<PreferenceCategory
app:iconSpaceReserved="false"
android:title="@string/remote_access">

<SwitchPreference
app:iconSpaceReserved="false"
android:defaultValue="false"
android:key="remote_access_active"
android:summary="@string/remote_access_label"
android:title="@string/remote_access" />

<EditTextPreference
app:iconSpaceReserved="false"
android:dialogLayout="@layout/pref_dialog_edit_text"
android:dialogMessage="@string/remote_access_hint"
android:key="remote_access_onion"
android:summary="@string/remote_access_hint"
android:title="@string/service_address" />

<EditTextPreference
app:iconSpaceReserved="false"
android:dialogLayout="@layout/pref_dialog_edit_password"
android:dialogMessage="@string/remote_access_credential_hint"
android:inputType="textPassword"
Expand Down

0 comments on commit 13a67c3

Please sign in to comment.