
No need for a reusable Fragment here, its only used in one place. This changes the structure to be a regular Activity, with all View and Menu setup in XML files loaded in onCreate(). This also converts the URL to a TextView. Having it editable in this Activity makes for a confusing user experience. Instead, the "Add Repo" input should validate the URL and not allow creating repos that don't work. This also purges the use of UpdateService.UpdateReceiver, it will be going away in the upcoming commits.
136 lines
5.2 KiB
XML
136 lines
5.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<RelativeLayout
|
|
android:id="@+id/repoView"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="fill_parent"
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:focusable="true"
|
|
android:focusableInTouchMode="true"
|
|
android:paddingTop="@dimen/padding_top"
|
|
android:paddingLeft="@dimen/padding_side"
|
|
android:paddingStart="@dimen/padding_side"
|
|
android:paddingRight="@dimen/padding_side"
|
|
android:paddingEnd="@dimen/padding_side">
|
|
|
|
<TextView
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/input_repo_url"
|
|
android:textStyle="bold"
|
|
android:layout_alignParentLeft="true"
|
|
android:layout_alignParentStart="true"
|
|
android:layout_alignParentTop="true" />
|
|
|
|
<!-- Name of this repo -->
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/label_repo_name"
|
|
android:text="@string/repo_name"
|
|
android:layout_below="@id/input_repo_url"
|
|
android:layout_alignParentLeft="true"
|
|
android:layout_alignParentStart="true"
|
|
android:paddingTop="@dimen/form_label_top"/>
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:singleLine="false"
|
|
android:id="@+id/text_repo_name"
|
|
android:layout_below="@id/label_repo_name" android:textStyle="bold"/>
|
|
|
|
<!-- Description - as pulled from the index file during last update... -->
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/label_description"
|
|
android:text="@string/repo_description"
|
|
android:layout_below="@id/text_repo_name"
|
|
android:layout_alignParentLeft="true"
|
|
android:layout_alignParentStart="true"
|
|
android:paddingTop="@dimen/form_label_top"/>
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:singleLine="false"
|
|
android:scrollHorizontally="false"
|
|
android:id="@+id/text_description"
|
|
android:layout_below="@id/label_description" android:textStyle="bold"/>
|
|
|
|
<!-- Number of apps belonging to this repo -->
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/label_num_apps"
|
|
android:text="@string/repo_num_apps"
|
|
android:layout_below="@id/text_description"
|
|
android:layout_alignParentLeft="true"
|
|
android:layout_alignParentStart="true"
|
|
android:paddingTop="@dimen/form_label_top" />
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/text_num_apps"
|
|
android:layout_below="@id/label_num_apps" android:textStyle="bold"/>
|
|
|
|
<!-- The last time this repo was updated -->
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/label_last_update"
|
|
android:text="@string/repo_last_update"
|
|
android:layout_below="@id/text_num_apps"
|
|
android:layout_alignParentLeft="true"
|
|
android:layout_alignParentStart="true"
|
|
android:paddingTop="@dimen/form_label_top" />
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/text_last_update"
|
|
android:layout_below="@id/label_last_update" android:textStyle="bold"/>
|
|
|
|
<!-- Signature (or "unsigned" if none) -->
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/label_repo_fingerprint"
|
|
android:text="@string/repo_fingerprint"
|
|
android:layout_below="@id/text_last_update"
|
|
android:layout_alignParentLeft="true"
|
|
android:layout_alignParentStart="true"
|
|
android:paddingTop="@dimen/form_label_top" />
|
|
<TextView
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:singleLine="false"
|
|
android:scrollHorizontally="false"
|
|
android:id="@+id/text_repo_fingerprint"
|
|
android:layout_below="@id/label_repo_fingerprint" android:textStyle="bold"/>
|
|
<TextView
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:singleLine="false"
|
|
android:scrollHorizontally="false"
|
|
android:id="@+id/text_repo_fingerprint_description"
|
|
android:layout_below="@id/text_repo_fingerprint"/>
|
|
|
|
<!-- The last time this repo was updated -->
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/text_not_yet_updated"
|
|
android:layout_below="@id/input_repo_url"
|
|
android:text="@string/repo_not_yet_updated"
|
|
android:textStyle="bold"
|
|
android:paddingTop="@dimen/form_label_top"/>
|
|
|
|
<Button
|
|
android:id="@+id/btn_update"
|
|
android:layout_centerHorizontal="true"
|
|
android:text="@string/repo_update"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_below="@id/text_not_yet_updated"/>
|
|
|
|
</RelativeLayout>
|