Make repository details look more Material
See http://www.google.com/design/spec/style/typography.html Remove useless attributes; add styles with proper paddings, size and color for caption and body text. Unfortunately, line spacing attributes are supported only since Jelly Bean.
This commit is contained in:
parent
4b2089b790
commit
2cc6661979
@ -11,102 +11,101 @@
|
||||
android:paddingRight="?attr/listPreferredItemPaddingRight"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- URL of this repo -->
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/repo_url"
|
||||
style="@style/RepoDetailsCaption"/>
|
||||
<TextView
|
||||
android:id="@+id/input_repo_url"
|
||||
android:textStyle="bold"/>
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/RepoDetailsBody"/>
|
||||
|
||||
<!-- 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:paddingTop="@dimen/form_label_top"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="false"
|
||||
android:text="@string/repo_name"
|
||||
style="@style/RepoDetailsCaption"/>
|
||||
<TextView
|
||||
android:id="@+id/text_repo_name"
|
||||
android:textStyle="bold"/>
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/RepoDetailsBody"/>
|
||||
|
||||
<!-- 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:paddingTop="@dimen/form_label_top"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="false"
|
||||
android:scrollHorizontally="false"
|
||||
android:text="@string/repo_description"
|
||||
style="@style/RepoDetailsCaption"/>
|
||||
<TextView
|
||||
android:id="@+id/text_description"
|
||||
android:textStyle="bold"/>
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/RepoDetailsBody"/>
|
||||
|
||||
<!-- 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:paddingTop="@dimen/form_label_top" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/repo_num_apps"
|
||||
style="@style/RepoDetailsCaption"/>
|
||||
<TextView
|
||||
android:id="@+id/text_num_apps"
|
||||
android:textStyle="bold"/>
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/RepoDetailsBody"/>
|
||||
|
||||
<!-- 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:paddingTop="@dimen/form_label_top" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/repo_last_update"
|
||||
style="@style/RepoDetailsCaption"/>
|
||||
<TextView
|
||||
android:id="@+id/text_last_update"
|
||||
android:textStyle="bold"/>
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/RepoDetailsBody"/>
|
||||
|
||||
<!-- Signature (or "unsigned" if none) -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/label_repo_fingerprint"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/repo_fingerprint"
|
||||
android:paddingTop="@dimen/form_label_top" />
|
||||
style="@style/RepoDetailsCaption"/>
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="false"
|
||||
android:scrollHorizontally="false"
|
||||
android:id="@+id/text_repo_fingerprint"
|
||||
android:textStyle="bold"/>
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="false"
|
||||
android:scrollHorizontally="false"
|
||||
android:id="@+id/text_repo_fingerprint_description"/>
|
||||
style="@style/RepoDetailsBody"/>
|
||||
<TextView
|
||||
android:id="@+id/text_repo_fingerprint_description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/RepoDetailsBody"/>
|
||||
|
||||
<!-- 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_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/repo_not_yet_updated"
|
||||
android:textStyle="bold"
|
||||
android:paddingTop="@dimen/form_label_top"/>
|
||||
style="@style/RepoDetailsBody"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/qr_code"
|
||||
android:src="@drawable/swap_qr_example"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="16dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
8
F-Droid/res/values-v16/styles.xml
Normal file
8
F-Droid/res/values-v16/styles.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<style name="RepoDetailsBody">
|
||||
<item name="android:lineSpacingMultiplier">1.25</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
@ -1,9 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<dimen name="padding_side">8dp</dimen>
|
||||
<dimen name="padding_top">5dp</dimen>
|
||||
<dimen name="form_label_top">5dp</dimen>
|
||||
<dimen name="applist_icon_normal_size">48dp</dimen>
|
||||
<dimen name="applist_icon_compact_size">32dp</dimen>
|
||||
|
||||
|
@ -189,6 +189,7 @@
|
||||
<string name="unsigned">Unsigned</string>
|
||||
<string name="unverified">Unverified</string>
|
||||
<string name="repo_details">Repository</string>
|
||||
<string name="repo_url">Address</string>
|
||||
<string name="repo_num_apps">Number of apps</string>
|
||||
<string name="repo_fingerprint">Fingerprint of Repo Signing Key (SHA-256)</string>
|
||||
<string name="repo_description">Description</string>
|
||||
|
@ -1,3 +1,4 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<style name="AppBaseThemeDark" parent="Theme.AppCompat">
|
||||
@ -38,6 +39,15 @@
|
||||
<item name="colorAccent">@color/fdroid_green</item>
|
||||
</style>
|
||||
|
||||
<style name="RepoDetailsCaption">
|
||||
<item name="android:paddingTop">16dp</item>
|
||||
<item name="android:paddingBottom">4dp</item>
|
||||
<item name="android:textSize">12sp</item>
|
||||
<item name="android:textColor">?android:attr/textColorSecondary</item>
|
||||
</style>
|
||||
|
||||
<style name="RepoDetailsBody" />
|
||||
|
||||
<style name="SwapTheme.Wizard" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="colorButtonNormal">@color/swap_bright_blue</item>
|
||||
<item name="android:actionBarStyle">@style/Widget.AppCompat.ActionBar.Solid</item>
|
||||
@ -168,4 +178,4 @@
|
||||
<item name="android:textStyle">italic</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
</resources>
|
||||
|
@ -48,7 +48,6 @@ public class RepoDetailsActivity extends ActionBarActivity {
|
||||
private static final int[] SHOW_IF_EXISTS = {
|
||||
R.id.label_repo_name,
|
||||
R.id.text_repo_name,
|
||||
R.id.label_description,
|
||||
R.id.text_description,
|
||||
R.id.label_num_apps,
|
||||
R.id.text_num_apps,
|
||||
|
Loading…
x
Reference in New Issue
Block a user