mirror of
https://github.com/yggdrasil-network/yggdrasil-android.git
synced 2025-04-28 22:25:09 +03:00
424 lines
20 KiB
XML
424 lines
20 KiB
XML
<?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"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
tools:context=".MainActivity">
|
|
|
|
<FrameLayout
|
|
android:id="@+id/settings"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:dividerPadding="4pt"
|
|
android:orientation="vertical">
|
|
|
|
<TextView
|
|
android:id="@+id/pageTitle"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_margin="8pt"
|
|
android:text="@string/app_name"
|
|
android:textColor="?attr/textDefault"
|
|
android:textSize="24sp"
|
|
android:textStyle="bold" />
|
|
|
|
<ScrollView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical" >
|
|
|
|
<TextView
|
|
android:id="@+id/statusSectionLabel"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="16pt"
|
|
android:layout_marginLeft="16pt"
|
|
android:layout_marginTop="8pt"
|
|
android:layout_marginEnd="8pt"
|
|
android:layout_marginRight="8pt"
|
|
android:layout_marginBottom="2pt"
|
|
android:alpha="0.7"
|
|
android:text="@string/main_status"
|
|
android:textAllCaps="true"
|
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
|
android:textSize="12sp" />
|
|
|
|
<TableLayout
|
|
android:id="@+id/connectedPeersTableLayout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="8pt"
|
|
android:layout_marginLeft="8pt"
|
|
android:layout_marginEnd="8pt"
|
|
android:layout_marginRight="8pt"
|
|
android:layout_marginBottom="8pt"
|
|
android:background="@drawable/rounded"
|
|
android:divider="#46878787"
|
|
android:dividerPadding="4pt"
|
|
android:paddingLeft="4pt"
|
|
android:paddingTop="2pt"
|
|
android:paddingRight="4pt"
|
|
android:paddingBottom="2pt"
|
|
android:showDividers="middle">
|
|
|
|
<TableRow
|
|
android:id="@+id/enableYggdrasilPanel"
|
|
style="@style/SelectableSwitchItemStyle">
|
|
|
|
<TextView
|
|
android:id="@+id/enableYggdrasilLabel"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/main_enable_yggdrasil"
|
|
android:textColor="?attr/textDefault"
|
|
android:textSize="14sp" />
|
|
|
|
<Space
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="2" />
|
|
|
|
<Switch
|
|
android:id="@+id/enableYggdrasil"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content" />
|
|
|
|
</TableRow>
|
|
|
|
<TableRow style="@style/SelectableItemStyle">
|
|
|
|
<TextView
|
|
android:id="@+id/yggdrasilStatusLabel"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:paddingTop="2dp"
|
|
android:paddingBottom="2dp"
|
|
android:text="@string/main_disabled"
|
|
android:textSize="14sp"
|
|
android:textStyle="bold" />
|
|
|
|
</TableRow>
|
|
|
|
</TableLayout>
|
|
|
|
<Space
|
|
android:layout_width="match_parent"
|
|
android:layout_height="32px" />
|
|
|
|
<TextView
|
|
android:id="@+id/statisticsSectionLabel"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="16pt"
|
|
android:layout_marginLeft="16pt"
|
|
android:layout_marginEnd="8pt"
|
|
android:layout_marginRight="8pt"
|
|
android:layout_marginBottom="2pt"
|
|
android:alpha="0.7"
|
|
android:paddingRight="8pt"
|
|
android:text="@string/main_statistics"
|
|
android:textAllCaps="true"
|
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
|
android:textSize="12sp" />
|
|
|
|
<TableLayout
|
|
android:id="@+id/configuredPeersTableLayout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="8pt"
|
|
android:layout_marginLeft="8pt"
|
|
android:layout_marginEnd="8pt"
|
|
android:layout_marginRight="8pt"
|
|
android:layout_marginBottom="8pt"
|
|
android:background="@drawable/rounded"
|
|
android:divider="#46878787"
|
|
android:dividerPadding="4pt"
|
|
android:paddingLeft="4pt"
|
|
android:paddingTop="2pt"
|
|
android:paddingRight="4pt"
|
|
android:paddingBottom="2pt"
|
|
android:showDividers="middle">
|
|
|
|
<TableRow style="@style/SelectableItemStyle">
|
|
|
|
<TextView
|
|
android:id="@+id/ipAddressLabel"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="0"
|
|
android:text="@string/main_ip"
|
|
android:textColor="?attr/textDefault" />
|
|
|
|
<TextView
|
|
android:id="@+id/ipAddressValue"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:alpha="0.5"
|
|
android:ellipsize="none"
|
|
android:scrollHorizontally="true"
|
|
android:selectAllOnFocus="true"
|
|
android:singleLine="true"
|
|
android:text="@string/main_not_available"
|
|
android:textAlignment="viewEnd"
|
|
android:textIsSelectable="true"
|
|
android:textSize="14sp" />
|
|
</TableRow>
|
|
|
|
<TableRow style="@style/SelectableItemStyle">
|
|
|
|
<TextView
|
|
android:id="@+id/subnetLabel"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="0"
|
|
android:text="@string/main_subnet"
|
|
android:textColor="?attr/textDefault" />
|
|
|
|
<TextView
|
|
android:id="@+id/subnetValue"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:alpha="0.5"
|
|
android:ellipsize="none"
|
|
android:scrollHorizontally="true"
|
|
android:selectAllOnFocus="true"
|
|
android:singleLine="true"
|
|
android:text="@string/main_not_available"
|
|
android:textAlignment="viewEnd"
|
|
android:textIsSelectable="true"
|
|
android:textSize="14sp" />
|
|
|
|
</TableRow>
|
|
|
|
<TableRow style="@style/SelectableItemStyle">
|
|
|
|
<TextView
|
|
android:id="@+id/coordinatesLabel"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="0"
|
|
android:text="@string/main_coordinates"
|
|
android:textColor="?attr/textDefault" />
|
|
|
|
<TextView
|
|
android:id="@+id/coordinatesValue"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:alpha="0.5"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:scrollHorizontally="false"
|
|
android:selectAllOnFocus="true"
|
|
android:singleLine="true"
|
|
android:text="[]"
|
|
android:textAlignment="viewEnd"
|
|
android:textIsSelectable="true" />
|
|
</TableRow>
|
|
|
|
</TableLayout>
|
|
|
|
<Space
|
|
android:layout_width="match_parent"
|
|
android:layout_height="32px" />
|
|
|
|
<TextView
|
|
android:id="@+id/configurationSectionLabel"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="16pt"
|
|
android:layout_marginLeft="16pt"
|
|
android:layout_marginEnd="8pt"
|
|
android:layout_marginRight="8pt"
|
|
android:layout_marginBottom="2pt"
|
|
android:alpha="0.7"
|
|
android:paddingRight="8pt"
|
|
android:text="@string/main_configuration"
|
|
android:textAllCaps="true"
|
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
|
android:textSize="12sp" />
|
|
|
|
<TableLayout
|
|
android:id="@+id/configurationTableLayout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="8pt"
|
|
android:layout_marginLeft="8pt"
|
|
android:layout_marginEnd="8pt"
|
|
android:layout_marginRight="8pt"
|
|
android:background="@drawable/rounded"
|
|
android:clickable="true"
|
|
android:divider="#46878787"
|
|
android:dividerPadding="4pt"
|
|
android:paddingLeft="4pt"
|
|
android:paddingTop="2pt"
|
|
android:paddingRight="4pt"
|
|
android:paddingBottom="2pt"
|
|
android:showDividers="middle">
|
|
|
|
<TableRow
|
|
android:id="@+id/peersTableRow"
|
|
style="@style/SelectableItemStyle">
|
|
|
|
<TextView
|
|
android:id="@+id/multicastLabel"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/main_peers"
|
|
android:textColor="?attr/textDefault" />
|
|
|
|
<Space
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="2" />
|
|
|
|
<TextView
|
|
android:id="@+id/peersValue"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:alpha="0.5"
|
|
android:text="@string/main_no_peers"
|
|
android:textAlignment="textEnd" />
|
|
|
|
<ImageView
|
|
android:id="@+id/peersChevron"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:layout_marginLeft="2pt"
|
|
android:alpha="0.4"
|
|
android:cropToPadding="false"
|
|
android:scaleType="fitEnd"
|
|
android:scaleX="1.2"
|
|
android:scaleY="1.2"
|
|
app:srcCompat="@drawable/ic_baseline_chevron_right_24" />
|
|
</TableRow>
|
|
|
|
<TableRow
|
|
android:id="@+id/dnsTableRow"
|
|
style="@style/SelectableItemStyle">
|
|
|
|
<TextView
|
|
android:id="@+id/dnsLabel"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/main_dns_servers"
|
|
android:textColor="?attr/textDefault" />
|
|
|
|
<Space
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="2" />
|
|
|
|
<TextView
|
|
android:id="@+id/dnsValue"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:alpha="0.5"
|
|
android:text="@string/dns_no_servers"
|
|
android:textAlignment="textEnd" />
|
|
|
|
<ImageView
|
|
android:id="@+id/dnsChevron"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:layout_marginLeft="2pt"
|
|
android:alpha="0.4"
|
|
android:cropToPadding="false"
|
|
android:scaleType="fitEnd"
|
|
android:scaleX="1.2"
|
|
android:scaleY="1.2"
|
|
app:srcCompat="@drawable/ic_baseline_chevron_right_24" />
|
|
</TableRow>
|
|
|
|
<TableRow
|
|
android:id="@+id/settingsTableRow"
|
|
style="@style/SelectableItemStyle">
|
|
|
|
<TextView
|
|
android:id="@+id/settingsLabel"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/main_settings"
|
|
android:textColor="?attr/textDefault" />
|
|
|
|
<Space
|
|
android:layout_width="320dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="2" />
|
|
|
|
<TextView
|
|
android:id="@+id/textView"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content" />
|
|
|
|
<ImageView
|
|
android:id="@+id/settingsChevron"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:layout_marginLeft="2pt"
|
|
android:alpha="0.4"
|
|
android:scaleType="fitEnd"
|
|
android:scaleX="1.2"
|
|
android:scaleY="1.2"
|
|
app:srcCompat="@drawable/ic_baseline_chevron_right_24" />
|
|
|
|
</TableRow>
|
|
|
|
<TableRow style="@style/SelectableItemStyle">
|
|
|
|
<TextView
|
|
android:id="@+id/versionLabel"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/main_version"
|
|
android:textColor="?attr/textDefault" />
|
|
|
|
<Space
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="2" />
|
|
|
|
<TextView
|
|
android:id="@+id/versionValue"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:alpha="0.5"
|
|
android:text="@string/main_unknown"
|
|
android:textAlignment="textEnd" />
|
|
|
|
</TableRow>
|
|
|
|
</TableLayout>
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="16pt"
|
|
android:layout_marginLeft="16pt"
|
|
android:layout_marginTop="4pt"
|
|
android:layout_marginEnd="8pt"
|
|
android:layout_marginRight="8pt"
|
|
android:alpha="0.7"
|
|
android:paddingRight="8pt"
|
|
android:text="@string/main_bottom_warning"
|
|
android:textAllCaps="false"
|
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
|
android:textSize="12sp" />
|
|
|
|
</LinearLayout>
|
|
</ScrollView>
|
|
|
|
</LinearLayout>
|
|
</FrameLayout>
|
|
</LinearLayout>
|