[Android] Make cards dimensions final
Geoffrey Métais
git at videolan.org
Thu Jun 15 15:48:19 CEST 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jun 15 15:47:31 2017 +0200| [279d64d9efc7c2a1cc447afbf232cdf39aa5ba09] | committer: Geoffrey Métais
Make cards dimensions final
> https://code.videolan.org/videolan/vlc-android/commit/279d64d9efc7c2a1cc447afbf232cdf39aa5ba09
---
vlc-android/src/org/videolan/vlc/gui/tv/CardPresenter.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/CardPresenter.java b/vlc-android/src/org/videolan/vlc/gui/tv/CardPresenter.java
index 6390bdb64..7eea24108 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/CardPresenter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/CardPresenter.java
@@ -54,8 +54,8 @@ public class CardPresenter extends Presenter {
private Activity mContext;
private Resources mRes;
- private static int CARD_WIDTH;
- private static int CARD_HEIGHT = 0;
+ private static final int CARD_WIDTH = VLCApplication.getAppResources().getDimensionPixelSize(R.dimen.tv_grid_card_thumb_width);
+ private static final int CARD_HEIGHT = VLCApplication.getAppResources().getDimensionPixelSize(R.dimen.tv_grid_card_thumb_height);
private static Drawable sDefaultCardImage;
private static Handler sHandler = new Handler(Looper.getMainLooper());
@@ -63,8 +63,7 @@ public class CardPresenter extends Presenter {
mContext = context;
mRes = mContext.getResources();
sDefaultCardImage = ContextCompat.getDrawable(mContext, R.drawable.ic_default_cone);
- CARD_WIDTH = mRes.getDimensionPixelSize(R.dimen.tv_grid_card_thumb_width);
- CARD_HEIGHT = mRes.getDimensionPixelSize(R.dimen.tv_grid_card_thumb_height);
+
}
class ViewHolder extends Presenter.ViewHolder {
More information about the Android
mailing list