mirror of
https://github.com/gsantner/dandelion
synced 2025-12-08 21:31:10 +01:00
PodSelectionFragment
This commit is contained in:
parent
50207181f9
commit
654a00d647
7 changed files with 411 additions and 88 deletions
122
app/src/main/res/layout/podselection__dialog.xml
Normal file
122
app/src/main/res/layout/podselection__dialog.xml
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:scrollbars="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/podselection__dialog__text_profile"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||
android:text="@string/profile"
|
||||
android:textAppearance="@style/AppTheme.TextAppearance.Caption"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/podselection__dialog__spinner_profile"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/activity_horizontal_margin_half"
|
||||
android:text="@string/pod_name"
|
||||
android:textAppearance="@style/AppTheme.TextAppearance.Caption"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/podselection__dialog__edit_podname"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
|
||||
android:ems="10"
|
||||
android:hint="@string/pod_name"
|
||||
android:inputType="textPersonName"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
tools:text="Geraspora"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/activity_horizontal_margin_half"
|
||||
android:text="@string/http_protocol"
|
||||
android:textAppearance="@style/AppTheme.TextAppearance.Caption"/>
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/podselection__dialog__radiogroup_protocol"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
|
||||
android:checkedButton="@+id/podselection__dialog__radio_https"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/podselection__dialog__radio_http"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="http"/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/podselection__dialog__radio_https"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="https"/>
|
||||
</RadioGroup>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/activity_horizontal_margin_half"
|
||||
android:text="@string/pod_address"
|
||||
android:textAppearance="@style/AppTheme.TextAppearance.Caption"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/podselection__dialog__edit_podaddress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
|
||||
android:ems="10"
|
||||
android:hint="@string/pod_address"
|
||||
android:inputType="textPersonName"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
tools:text="pod.geraspora.de"/>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/podselection__dialog__btn_cancel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@android:string/cancel"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/podselection__dialog__btn_ok"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@android:string/ok"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
|
@ -1,32 +1,32 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<Button
|
||||
android:id="@+id/podselection__button_use_custom_pod"
|
||||
android:id="@+id/podselection__fragment__button_use_custom_pod"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:text="@string/podselection__custom_pod"
|
||||
tools:text="Benutzerdefinierter Pod" />
|
||||
tools:text="Benutzerdefinierter Pod"/>
|
||||
|
||||
|
||||
<ListView
|
||||
android:id="@+id/podselection__listpods"
|
||||
android:id="@+id/podselection__fragment__listpods"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_below="@+id/podselection__button_use_custom_pod"
|
||||
android:choiceMode="singleChoice" />
|
||||
android:layout_below="@+id/podselection__fragment__button_use_custom_pod"
|
||||
android:choiceMode="singleChoice"/>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
@ -105,4 +105,8 @@
|
|||
<string name="permission_denied">Permission denied.</string>
|
||||
<string name="permission_granted_try_again">Permission granted. Please try again.</string>
|
||||
<string name="podselection__custom_pod">Custom Pod</string>
|
||||
<string name="pod_name">Pod name</string>
|
||||
<string name="http_protocol">Protocol</string>
|
||||
<string name="pod_address">Pod address</string>
|
||||
<string name="missing_value">Missing value</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -27,4 +27,8 @@
|
|||
<item name="android:background">@color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.TextAppearance.Caption" parent="TextAppearance.AppCompat.Caption">
|
||||
<item name="android:textColor">@color/accent</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue