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
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
try { | |
PackageInfo info = getPackageManager().getPackageInfo( | |
"com.facebook.samples.loginhowto", | |
PackageManager.GET_SIGNATURES); | |
for (Signature signature : info.signatures) { | |
MessageDigest md = MessageDigest.getInstance("SHA"); |
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 Bitmap getScreenshotFromRecyclerView(RecyclerView view) { | |
RecyclerView.Adapter adapter = view.getAdapter(); | |
Bitmap bigBitmap = null; | |
if (adapter != null) { | |
int size = adapter.getItemCount(); | |
int height = 0; | |
Paint paint = new Paint(); | |
int iHeight = 0; | |
final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024); |
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
***************** Java ****************** | |
import android.app.Dialog; | |
import android.content.Context; | |
import android.graphics.drawable.AnimationDrawable; | |
import android.view.Gravity; | |
import android.view.View; | |
import android.view.WindowManager; | |
import android.widget.ImageView; | |
import android.widget.TextView; |
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
Uri imageUri = Uri.parse("/sdcard/Aa.png"); | |
//Uri imageUri = Uri.parse("/storage/emulated/0/designapp/Aa.png"); | |
Intent intent = new Intent(Intent.ACTION_ATTACH_DATA); | |
intent.setDataAndType(imageUri, "image/*"); | |
intent.putExtra("png", "image/*"); | |
startActivityForResult(Intent.createChooser(intent,"Set AS"), 1000); | |
User for Set Image as wallpaper, Contact Picture and other.... |
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.content.Context; | |
import android.graphics.Rect; | |
import android.support.v4.view.ViewCompat; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.Log; | |
import android.view.View; | |
import com.dhl.tiktail.BuildConfig; | |
import java.lang.reflect.Field; |
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
/* | |
* Copyright 2015 serso aka se.solovyev | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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"?> | |
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:fitsSystemWindows="true" | |
tools:context="com.devdigital.rundedcardwithimagedemo.ScrollingActivity"> | |
<android.support.design.widget.AppBarLayout |
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.animation.AnimatorSet | |
import android.animation.ObjectAnimator | |
import android.annotation.SuppressLint | |
import android.content.Context | |
import android.util.AttributeSet | |
import android.view.GestureDetector | |
import android.view.MotionEvent | |
import android.view.View | |
import android.widget.FrameLayout | |
import androidx.core.view.GestureDetectorCompat |
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.text.Editable | |
import android.text.TextWatcher | |
import android.widget.EditText | |
/** | |
* @author Hitesh | |
* @version 1.0 | |
* @since 14-08-2019 | |
*/ |