This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.lang.reflect.Constructor; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import android.graphics.Bitmap; | |
import android.graphics.Matrix; | |
import android.os.Build; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.annotation.TargetApi; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.os.Build; | |
import android.util.AttributeSet; | |
import android.util.Log; | |
import android.view.View; | |
import android.view.ViewGroup; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.android.volley.NetworkResponse; | |
import com.android.volley.ParseError; | |
import com.android.volley.Response; | |
import com.android.volley.toolbox.HttpHeaderParser; | |
import com.android.volley.toolbox.StringRequest; | |
import java.io.BufferedReader; | |
import java.io.ByteArrayInputStream; | |
import java.io.IOException; | |
import java.io.InputStreamReader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_height="wrap_content" | |
android:layout_width="match_parent" | |
android:clipToPadding="false" | |
android:padding="16dp"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RealPathUtil { | |
public static String getRealPath(Context context, Uri fileUri) { | |
String realPath; | |
// SDK < API11 | |
if (Build.VERSION.SDK_INT < 11) { | |
realPath = RealPathUtil.getRealPathFromURI_BelowAPI11(context, fileUri); | |
} | |
// SDK >= 11 && SDK < 19 | |
else if (Build.VERSION.SDK_INT < 19) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.annotation.SuppressLint; | |
import android.content.ContentUris; | |
import android.content.Context; | |
import android.content.CursorLoader; | |
import android.database.Cursor; | |
import android.net.Uri; | |
import android.os.Build; | |
import android.os.Environment; | |
import android.provider.DocumentsContract; | |
import android.provider.MediaStore; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ScaleToFitWidthHeightTransform implements Transformation { | |
private int mSize; | |
private boolean isHeightScale; | |
public ScaleToFitWidthHeightTransform(int size, boolean isHeightScale){ | |
mSize =size; | |
this.isHeightScale = isHeightScale; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class $ADAPTERNAME$ extends androidx.recyclerview.widget.RecyclerView.Adapter<$ADAPTERNAME$.ViewHolder> { | |
@androidx.annotation.NonNull | |
@Override | |
public ViewHolder onCreateViewHolder(@androidx.annotation.NonNull android.view.ViewGroup parent, int viewType) { | |
return new ViewHolder(android.view.LayoutInflater.from(parent.getContext()).inflate(R.layout.$LAYOUT$, parent, false)); | |
} | |
@Override | |
public void onBindViewHolder(@androidx.annotation.NonNull ViewHolder holder, int position) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FillDrawable(private val color: Int, layers: Array<out Drawable>) : LayerDrawable(layers) { | |
private val radius: Float = 20f | |
private val paint = Paint(Paint.ANTI_ALIAS_FLAG).apply { | |
color = [email protected] | |
} | |
private var r = copyBounds() |
OlderNewer