new album icon, various headline tweaks

This commit is contained in:
Andrew Dolgov 2015-07-10 23:37:18 +03:00
parent d9e3c77419
commit 7c8919cb79
10 changed files with 62 additions and 94 deletions

View File

@ -658,7 +658,6 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
public TextView excerptView;
public ImageView flavorImageView;
public ImageView flavorVideoPlayView;
public TextView flavorImagePrompt;
public TextView authorView;
public TextView dateView;
public CheckBox selectionBoxView;
@ -850,7 +849,6 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
holder.publishedView = (ImageView)v.findViewById(R.id.published);
holder.excerptView = (TextView)v.findViewById(R.id.excerpt);
holder.flavorImageView = (ImageView) v.findViewById(R.id.flavor_image);
holder.flavorImagePrompt = (TextView) v.findViewById(R.id.flavor_image_prompt);
holder.flavorVideoPlayView = (ImageView) v.findViewById(R.id.flavor_video_play);
holder.authorView = (TextView)v.findViewById(R.id.author);
holder.dateView = (TextView) v.findViewById(R.id.date);
@ -1058,7 +1056,6 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
holder.flavorImageView.setVisibility(View.VISIBLE);
holder.flavorImageView.setVisibility(View.GONE);
holder.flavorVideoPlayView.setVisibility(View.GONE);
holder.flavorImagePrompt.setVisibility(View.GONE);
boolean videoFound = false;
@ -1113,7 +1110,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
videoFound = true;
holder.flavorVideoPlayView.setImageResource(R.drawable.flavor_video_play);
holder.flavorVideoPlayView.setImageResource(R.drawable.ic_play_circle);
ViewCompat.setTransitionName(holder.flavorImageView, "TRANSITION:ARTICLE_VIDEO_PLAYER");
@ -1156,7 +1153,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
videoFound = true;
holder.flavorVideoPlayView.setImageResource(R.drawable.flavor_video_play_youtube);
holder.flavorVideoPlayView.setImageResource(R.drawable.ic_youtube_play);
if (!thumbUri.equals(holder.flavorImageView.getTag())) {
ImageAware imageAware = new ImageViewAware(holder.flavorImageView, false);
@ -1267,7 +1264,8 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
holder.flavorImageView.setVisibility(View.VISIBLE);
if (article.flavorImageCount > 1) {
holder.flavorImagePrompt.setVisibility(View.VISIBLE);
holder.flavorVideoPlayView.setVisibility(View.VISIBLE);
holder.flavorVideoPlayView.setImageResource(R.drawable.ic_image_album);
}
maybeRepositionFlavorImage(view, bitmap);
@ -1294,7 +1292,8 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
holder.flavorImageView.setVisibility(View.VISIBLE);
if (article.flavorImageCount > 1) {
holder.flavorImagePrompt.setVisibility(View.VISIBLE);
holder.flavorVideoPlayView.setVisibility(View.VISIBLE);
holder.flavorVideoPlayView.setImageResource(R.drawable.ic_image_album);
}
}
@ -1395,10 +1394,9 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
lp.addRule(RelativeLayout.BELOW, R.id.headline_header);
} else {
lp.addRule(RelativeLayout.BELOW, 0);
lp.topMargin = 0;
//lp.removeRule(RelativeLayout.BELOW);
}
view.setLayoutParams(lp);

Binary file not shown.

After

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 829 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape android:shape="rectangle">
<solid android:color="#90000000" />
</shape>
</item>
<item>
<bitmap android:src="@drawable/ic_play_circle"
android:gravity="center" />
</item>
</layer-list>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape android:shape="rectangle">
<solid android:color="#90000000" />
</shape>
</item>
<item>
<bitmap android:src="@drawable/ic_youtube_play"
android:gravity="center" />
</item>
</layer-list>

View File

@ -24,22 +24,6 @@
android:layout_height="wrap_content"
android:layout_span="2">
<ProgressBar
android:id="@+id/flavorImageLoadingBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="visible" />
<ImageView
android:id="@+id/flavor_video_play"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:scaleType="fitXY"
android:src="@drawable/flavor_video_play"
android:visibility="visible" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -64,6 +48,17 @@
android:background="?headlineHeaderBackground"
android:padding="16dp">
<ProgressBar
android:id="@+id/flavorImageLoadingBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="visible"
android:layout_alignParentTop="false"
android:layout_alignParentRight="false"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true" />
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
@ -81,7 +76,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/title"
android:orientation="horizontal">
android:orientation="horizontal"
android:id="@+id/linearLayout2">
<TextView
android:id="@+id/feed_title"
@ -110,20 +106,24 @@
android:textSize="12sp" />
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
<TextView
android:id="@+id/flavor_image_prompt"
android:layout_width="match_parent"
<ImageView
android:id="@+id/flavor_video_play"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="?headlineHeaderBackground"
android:gravity="center"
android:text="@string/flavor_image_prompt"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?headlineSecondaryTextColor"
android:visibility="visible" />
android:layout_gravity="bottom|right"
android:scaleType="fitXY"
android:src="@drawable/ic_play_circle"
android:visibility="visible"
android:layout_below="@+id/headline_header"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_marginRight="8dp"
android:layout_marginBottom="8dp" />
</FrameLayout>
</TableRow>

View File

@ -25,22 +25,6 @@
android:layout_height="wrap_content"
android:layout_span="2">
<ProgressBar
android:id="@+id/flavorImageLoadingBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="visible" />
<ImageView
android:id="@+id/flavor_video_play"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:scaleType="fitXY"
android:src="@drawable/flavor_video_play"
android:visibility="visible" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -65,6 +49,17 @@
android:background="?headlineHeaderBackground"
android:padding="16dp">
<ProgressBar
android:id="@+id/flavorImageLoadingBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="visible"
android:layout_alignParentTop="false"
android:layout_alignParentRight="false"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true" />
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
@ -82,7 +77,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/title"
android:orientation="horizontal">
android:orientation="horizontal"
android:id="@+id/linearLayout2">
<TextView
android:id="@+id/feed_title"
@ -111,20 +107,24 @@
android:textSize="12sp" />
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
<TextView
android:id="@+id/flavor_image_prompt"
android:layout_width="match_parent"
<ImageView
android:id="@+id/flavor_video_play"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="?headlineHeaderBackground"
android:gravity="center"
android:text="@string/flavor_image_prompt"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?headlineSecondaryTextColor"
android:visibility="visible" />
android:layout_gravity="bottom|right"
android:scaleType="fitXY"
android:src="@drawable/ic_play_circle"
android:visibility="visible"
android:layout_below="@+id/headline_header"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_marginRight="8dp"
android:layout_marginBottom="8dp" />
</FrameLayout>
</TableRow>

View File

@ -80,7 +80,7 @@
<item name="headlineSelectedExcerptTextColor">@android:color/secondary_text_dark</item>
<item name="headlineSelectedSecondaryTextColor">?headlineSelectedExcerptTextColor</item>
<item name="headlineSelectedBackground">#1c1c1c</item>
<item name="headlineHeaderBackground">#cc000000</item>
<item name="headlineHeaderBackground">#99000000</item>
<item name="headlineUnreadBackground">#101010</item>
<item name="linkColor">?colorPrimary</item>
<item name="loadingBackground">@android:color/black</item>