Improved fonts

This commit is contained in:
daniel oeh 2014-04-26 23:07:11 +02:00
parent 1fe2a8da45
commit a7c8438b15
17 changed files with 38 additions and 57 deletions

BIN
assets/Roboto-Light.ttf Normal file

Binary file not shown.

BIN
assets/Roboto.ttf Normal file

Binary file not shown.

View File

@ -20,9 +20,7 @@
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_margin="16dp"
android:textSize="@dimen/text_size_large"
android:textColor="@color/bright_blue"
android:textStyle="italic"
style="@style/AntennaPod.TextView.Heading"
android:text="@string/txtvfeedurl_label"/>
<EditText
@ -48,9 +46,7 @@
android:layout_height="wrap_content"
android:layout_below="@id/butConfirm"
android:layout_margin="8dp"
android:textSize="@dimen/text_size_large"
android:textColor="@color/bright_blue"
android:textStyle="italic"
style="@style/AntennaPod.TextView.Heading"
android:text="@string/podcastdirectories_label"/>
<TextView
@ -77,9 +73,7 @@
android:layout_height="wrap_content"
android:layout_below="@id/butBrowseGpoddernet"
android:layout_margin="8dp"
android:textSize="@dimen/text_size_large"
android:textColor="@color/bright_blue"
android:textStyle="italic"
style="@style/AntennaPod.TextView.Heading"
android:text="@string/opml_import_label"/>
<TextView

View File

@ -38,8 +38,9 @@
<TextView
android:id="@+id/txtvTitle"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
@ -48,25 +49,11 @@
android:layout_toRightOf="@id/butNavLeft"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:maxLines="1"
android:maxLines="2"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/text_size_small"
android:textStyle="bold"/>
<TextView
android:id="@+id/txtvFeed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/txtvTitle"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_toLeftOf="@id/butNavRight"
android:layout_toRightOf="@id/butNavLeft"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:maxLines="1"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/text_size_small"/>
android:textSize="16sp"
android:fontFamily="sans-serif-light"
/>
</RelativeLayout>
<View
@ -141,6 +128,7 @@
android:layout_marginTop="16dp"
android:text="@string/position_default_label"
android:textColor="?android:attr/textColorSecondary"
android:fontFamily="sans-serif-light"
android:textSize="@dimen/text_size_micro"/>
<TextView
@ -154,6 +142,7 @@
android:layout_marginTop="16dp"
android:text="@string/position_default_label"
android:textColor="?android:attr/textColorSecondary"
android:fontFamily="sans-serif-light"
android:textSize="@dimen/text_size_micro"/>
<SeekBar

View File

@ -45,7 +45,7 @@
android:ellipsize="end"
android:maxLines="2"
android:textSize="18sp"
android:fontFamily="sans-serif-condensed"/>
android:fontFamily="sans-serif-light"/>
</RelativeLayout>
<ImageButton

View File

@ -26,9 +26,7 @@
android:layout_centerVertical="true"
android:layout_margin="4dp"
android:layout_toRightOf="@id/imgvCover"
android:textSize="@dimen/text_size_large"
android:textStyle="bold"
android:textColor="?android:attr/textColorPrimary"/>
style="@style/AntennaPod.TextView.Heading"/>
<View
android:id="@+id/divider"
@ -99,12 +97,11 @@
<TextView
android:id="@+id/txtvSettings"
style="@style/AntennaPod.TextView.Heading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:text="@string/podcast_settings_label"
android:textSize="@dimen/text_size_medium"
android:textColor="?android:attr/textColorPrimary"
android:layout_marginLeft="8dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="24dp"/>
@ -119,13 +116,12 @@
android:textColor="?android:attr/textColorPrimary"/>
<TextView
style="@style/AntennaPod.TextView.Heading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="24dp"
android:textSize="@dimen/text_size_medium"
android:textColor="?android:attr/textColorPrimary"
android:text="@string/description_label"/>
<TextView

View File

@ -25,8 +25,7 @@
android:layout_toRightOf="@id/imgvCover"
android:layout_alignParentRight="true"
android:lines="1"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/text_size_medium"
style="@style/AntennaPod.TextView.Heading"
android:layout_margin="4dp"/>
<TextView

View File

@ -10,10 +10,8 @@
android:layout_height="wrap_content"
android:text="@string/gpodnetauth_login_title"
android:layout_alignParentTop="true"
android:textSize="@dimen/text_size_large"
android:layout_margin="16dp"
android:textColor="@color/bright_blue"
android:textStyle="italic"/>
style="@style/AntennaPod.TextView.Heading"/>
<TextView
android:id="@id/txtvDescription"

View File

@ -10,10 +10,8 @@
android:layout_height="wrap_content"
android:text="@string/gpodnetauth_device_title"
android:layout_alignParentTop="true"
android:textSize="@dimen/text_size_large"
android:layout_margin="16dp"
android:textColor="@color/bright_blue"
android:textStyle="italic"/>
style="@style/AntennaPod.TextView.Heading"/>
<TextView
android:id="@+id/txtvDescription"

View File

@ -10,10 +10,8 @@
android:layout_height="wrap_content"
android:text="@string/gpodnetauth_finish_title"
android:layout_alignParentTop="true"
android:textSize="@dimen/text_size_large"
android:layout_margin="16dp"
android:textColor="@color/bright_blue"
android:textStyle="italic"/>
style="@style/AntennaPod.TextView.Heading"/>
<TextView
android:id="@+id/txtvDescription"

View File

@ -9,10 +9,8 @@
android:padding="12dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/text_size_large"
android:textColor="@color/bright_blue"
android:textAllCaps="true"
android:textStyle="italic"
style="@style/AntennaPod.TextView.Heading"
android:text="@string/recently_published_episodes_label"/>
</LinearLayout>

View File

@ -23,8 +23,7 @@
android:layout_toRightOf="@id/imgvCover"
android:layout_alignParentRight="true"
android:lines="1"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/text_size_medium"
style="@style/AntennaPod.TextView.Heading"
android:layout_margin="4dp"/>
<TextView

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AntennaPod.TextView.Heading" parent="@android:style/TextAppearance.Medium">
<item name="android:textSize">@dimen/text_size_large</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:fontFamily">sans-serif-light</item>
</style>
</resources>

View File

@ -117,4 +117,10 @@
<item name="android:textColor">#fff</item>
<item name="android:text">@string/undo</item>
</style>
<style name="AntennaPod.TextView.Heading" parent="@android:style/TextAppearance.Medium">
<item name="android:textSize">@dimen/text_size_large</item>
<item name="android:textStyle">italic</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
</style>
</resources>

View File

@ -70,7 +70,6 @@ public class AudioplayerActivity extends MediaplayerActivity {
private int savedPosition = -1;
private TextView txtvTitle;
private TextView txtvFeed;
private Button butPlaybackSpeed;
private ImageButton butNavLeft;
private ImageButton butNavRight;
@ -403,7 +402,6 @@ public class AudioplayerActivity extends MediaplayerActivity {
drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
navList = (ListView) findViewById(R.id.nav_list);
txtvTitle = (TextView) findViewById(R.id.txtvTitle);
txtvFeed = (TextView) findViewById(R.id.txtvFeed);
butNavLeft = (ImageButton) findViewById(R.id.butNavLeft);
butNavRight = (ImageButton) findViewById(R.id.butNavRight);
butPlaybackSpeed = (Button) findViewById(R.id.butPlaybackSpeed);
@ -550,7 +548,6 @@ public class AudioplayerActivity extends MediaplayerActivity {
return false;
}
txtvTitle.setText(media.getEpisodeTitle());
txtvFeed.setText(media.getFeedTitle());
if (media.getChapters() != null) {
butNavRight.setVisibility(View.VISIBLE);
} else {

View File

@ -248,7 +248,7 @@ public class FeedItemDialog extends Dialog {
private String applyWebviewStyle(String textColor, String data) {
final String WEBVIEW_STYLE = "<html><head><style type=\"text/css\"> * { color: %s; font-family: Helvetica; line-height: 1.3em; font-size: 11pt; } a { font-style: normal; text-decoration: none; font-weight: normal; color: #00A8DF; } img { display: block; margin: 10 auto; max-width: %s; height: auto; } body { margin: %dpx %dpx %dpx %dpx; }</style></head><body>%s</body></html>";
final String WEBVIEW_STYLE = "<html><head><style type=\"text/css\"> @font-face { font-family: 'Roboto-Light'; src: url('file:///android_asset/Roboto-Light.ttf'); } * { color: %s; font-family: roboto-Light; font-size: 11pt; } a { font-style: normal; text-decoration: none; font-weight: normal; color: #00A8DF; } img { display: block; margin: 10 auto; max-width: %s; height: auto; } body { margin: %dpx %dpx %dpx %dpx; }</style></head><body>%s</body></html>";
final int pageMargin = (int) TypedValue.applyDimension(
TypedValue.COMPLEX_UNIT_DIP, 8, getContext().getResources()
.getDisplayMetrics()

View File

@ -236,7 +236,7 @@ public class ItemDescriptionFragment extends Fragment {
* value is inserted directly into the CSS String.
*/
private String applyWebviewStyle(String textColor, String data) {
final String WEBVIEW_STYLE = "<html><head><style type=\"text/css\"> * { color: %s; font-family: Helvetica; line-height: 1.5em; font-size: 11pt; } a { font-style: normal; text-decoration: none; font-weight: normal; color: #00A8DF; } img { display: block; margin: 10 auto; max-width: %s; height: auto; } body { margin: %dpx %dpx %dpx %dpx; }</style></head><body>%s</body></html>";
final String WEBVIEW_STYLE = "<html><head><style type=\"text/css\"> @font-face { font-family: 'Roboto-Light'; src: url('file:///android_asset/Roboto-Light.ttf'); } * { color: %s; font-family: roboto-Light; font-size: 11pt; } a { font-style: normal; text-decoration: none; font-weight: normal; color: #00A8DF; } img { display: block; margin: 10 auto; max-width: %s; height: auto; } body { margin: %dpx %dpx %dpx %dpx; }</style></head><body>%s</body></html>";
final int pageMargin = (int) TypedValue.applyDimension(
TypedValue.COMPLEX_UNIT_DIP, 8, getResources()
.getDisplayMetrics());