mirror of
https://github.com/whyorean/AuroraStore.git
synced 2026-06-19 13:08:59 -04:00
Get screenshot dimention based on device metrics
This commit is contained in:
@@ -2,7 +2,7 @@ package com.dragons.aurora.adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.content.res.Resources;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -10,28 +10,17 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.dragons.aurora.R;
|
||||
import com.dragons.aurora.activities.FullscreenImageActivity;
|
||||
import com.squareup.picasso.Picasso;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dragons.aurora.R;
|
||||
import com.dragons.aurora.activities.FullscreenImageActivity;
|
||||
|
||||
public class SmallScreenshotsAdapter extends RecyclerView.Adapter<SmallScreenshotsAdapter.MyViewHolderInst> {
|
||||
private List<SmallScreenshotsAdapter.Holder> ssholder;
|
||||
private Context context;
|
||||
|
||||
|
||||
class MyViewHolderInst extends RecyclerView.ViewHolder {
|
||||
ImageView ss_image;
|
||||
|
||||
MyViewHolderInst(View view) {
|
||||
super(view);
|
||||
ss_image
|
||||
= view.findViewById(R.id.scrn_itm_s);
|
||||
}
|
||||
}
|
||||
|
||||
public SmallScreenshotsAdapter(List<SmallScreenshotsAdapter.Holder> FeaturedAppsH, Context context) {
|
||||
this.ssholder = FeaturedAppsH;
|
||||
this.context = context;
|
||||
@@ -72,5 +61,16 @@ public class SmallScreenshotsAdapter extends RecyclerView.Adapter<SmallScreensho
|
||||
this.url = url;
|
||||
}
|
||||
}
|
||||
|
||||
class MyViewHolderInst extends RecyclerView.ViewHolder {
|
||||
ImageView ss_image;
|
||||
|
||||
MyViewHolderInst(View view) {
|
||||
super(view);
|
||||
ss_image = view.findViewById(R.id.scrn_itm_s);
|
||||
ss_image.getLayoutParams().height = (Resources.getSystem().getDisplayMetrics().heightPixels) / 3;
|
||||
ss_image.getLayoutParams().width = (Resources.getSystem().getDisplayMetrics().widthPixels) / 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
<ImageView
|
||||
android:id="@+id/scrn_itm_s"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="225dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:scaleType="fitXY" />
|
||||
android:scaleType="centerCrop" />
|
||||
</com.github.florent37.shapeofview.shapes.RoundRectView>
|
||||
Reference in New Issue
Block a user