remove flavor image arrow
This commit is contained in:
parent
eee5210189
commit
4e330671fa
@ -663,7 +663,6 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
public ImageView menuButtonView;
|
||||
public ViewGroup flavorImageHolder;
|
||||
public ProgressBar flavorImageLoadingBar;
|
||||
public View flavorImageArrow;
|
||||
public View headlineFooter;
|
||||
public ImageView textImage;
|
||||
public ImageView textChecked;
|
||||
@ -830,7 +829,6 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
holder.menuButtonView = (ImageView) v.findViewById(R.id.article_menu_button);
|
||||
holder.flavorImageHolder = (ViewGroup) v.findViewById(R.id.flavorImageHolder);
|
||||
holder.flavorImageLoadingBar = (ProgressBar) v.findViewById(R.id.flavorImageLoadingBar);
|
||||
holder.flavorImageArrow = v.findViewById(R.id.flavorImageArrow);
|
||||
holder.headlineFooter = v.findViewById(R.id.headline_footer);
|
||||
holder.textImage = (ImageView) v.findViewById(R.id.text_image);
|
||||
holder.textChecked = (ImageView) v.findViewById(R.id.text_checked);
|
||||
@ -1126,7 +1124,6 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
}
|
||||
|
||||
if (!videoFound && showFlavorImage && holder.flavorImageView != null) {
|
||||
holder.flavorImageArrow.setVisibility(View.GONE);
|
||||
|
||||
if (article.noValidFlavorImage) {
|
||||
holder.flavorImageHolder.setVisibility(View.GONE);
|
||||
|
@ -1,96 +0,0 @@
|
||||
package org.fox.ttrss.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Path;
|
||||
import android.graphics.Path.Direction;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
//http://stackoverflow.com/questions/24723040/how-to-create-a-right-facing-arrow-using-xml-shapes-in-android
|
||||
|
||||
public class ArrowRight extends View {
|
||||
|
||||
private Paint arrowPaint;
|
||||
private Path arrowPath;
|
||||
private int arrowColor = 0xFF888888;
|
||||
private float density;
|
||||
private int diameter = 2, diameter_calc, radius_calc;
|
||||
|
||||
public ArrowRight(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
stuff();
|
||||
}
|
||||
|
||||
public ArrowRight(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
stuff();
|
||||
}
|
||||
|
||||
public ArrowRight(Context context) {
|
||||
super(context);
|
||||
stuff();
|
||||
}
|
||||
|
||||
private void stuff() {
|
||||
|
||||
//Getting density "dp"
|
||||
density = getContext().getResources().getDisplayMetrics().scaledDensity;
|
||||
//Calculating actual diameter
|
||||
diameter_calc = (int) density * diameter;
|
||||
radius_calc = diameter/2;
|
||||
|
||||
//Creating paint
|
||||
arrowPaint = new Paint();
|
||||
arrowPaint.setAntiAlias(true);
|
||||
arrowPaint.setColor(arrowColor);
|
||||
|
||||
//Initialize path
|
||||
arrowPath = new Path();
|
||||
|
||||
this.setWillNotDraw(false);
|
||||
}
|
||||
|
||||
private int startX,startY, currentX, currentY;
|
||||
|
||||
protected void onDraw(Canvas c) {
|
||||
|
||||
startX = c.getWidth();
|
||||
startY = c.getHeight()/2;
|
||||
|
||||
c.rotate(-45, startX, startY);
|
||||
|
||||
arrowPath.reset();
|
||||
currentX = startX;
|
||||
currentY = startY;
|
||||
//Move to right end side center of the canvas
|
||||
arrowPath.moveTo(currentX,currentY);
|
||||
//Lets move up
|
||||
currentY = radius_calc;
|
||||
arrowPath.lineTo(currentX, currentY);
|
||||
//Now draw circle
|
||||
currentX-=radius_calc;
|
||||
arrowPath.addCircle(currentX, radius_calc, radius_calc, Direction.CCW);
|
||||
currentX-=radius_calc;
|
||||
|
||||
arrowPath.lineTo(currentX,currentY);
|
||||
// Go to inner side center point
|
||||
currentX = startX - diameter_calc;
|
||||
currentY = startY - diameter_calc;
|
||||
arrowPath.lineTo(currentX,currentY);
|
||||
// Go left
|
||||
currentX = startX - startY + radius_calc;
|
||||
arrowPath.lineTo(currentX, currentY);
|
||||
//Draw circle
|
||||
currentY+=radius_calc;
|
||||
c.drawCircle(currentX, currentY, radius_calc, arrowPaint);
|
||||
currentY+=radius_calc;
|
||||
arrowPath.lineTo(currentX, currentY);
|
||||
//Go to start
|
||||
arrowPath.lineTo(startX, startY);
|
||||
|
||||
c.drawPath(arrowPath, arrowPaint);
|
||||
}
|
||||
|
||||
}
|
@ -100,13 +100,6 @@
|
||||
android:src="@drawable/flavor_video_play"
|
||||
android:visibility="gone" />
|
||||
|
||||
<org.fox.ttrss.util.ArrowRight
|
||||
android:layout_marginRight="16dp"
|
||||
android:id="@+id/flavorImageArrow"
|
||||
android:layout_width="64dp"
|
||||
android:layout_gravity="center|right"
|
||||
android:visibility="gone"
|
||||
android:layout_height="64dp" />
|
||||
</FrameLayout>
|
||||
</TableRow>
|
||||
|
||||
|
@ -101,14 +101,6 @@
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/flavor_video_play"
|
||||
android:visibility="gone" />
|
||||
|
||||
<org.fox.ttrss.util.ArrowRight
|
||||
android:layout_marginRight="16dp"
|
||||
android:id="@+id/flavorImageArrow"
|
||||
android:layout_width="64dp"
|
||||
android:layout_gravity="center|right"
|
||||
android:visibility="gone"
|
||||
android:layout_height="64dp" />
|
||||
</FrameLayout>
|
||||
</TableRow>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user