onCreate()
onCreateView()
onViewCreated()
This file contains hidden or 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
# Hello Gist | |
:) |
This file contains hidden or 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 RSAEncryptionUtil { | |
public static final String ALGORITHM = "RSA"; | |
public static final int KEY_LENGTH = 2048; | |
public static KeyPair generateRSAKey() { | |
KeyPairGenerator kpg; | |
try { | |
kpg = KeyPairGenerator.getInstance(ALGORITHM); |
This file contains hidden or 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.support.v4.view.ViewPager; | |
public class MainActivity extends AppCompatActivity { | |
TextView tv; | |
ViewPager pager; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); |
This file contains hidden or 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 ZoomOutPageTransformer implements ViewPager.PageTransformer { | |
private static final float MIN_SCALE = 0.85f; | |
private static final float MIN_ALPHA = 0.5f; | |
@Override | |
public void transformPage(View page, float position) { |
This file contains hidden or 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 DepthPageTransformer implements ViewPager.PageTransformer { | |
public static final float MIN_SCALE = 0.75f; | |
@Override | |
public void transformPage(View page, float position) { | |
int pageWidth = page.getWidth(); |
This file contains hidden or 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 static float dipToPixels(Context context, float dipValue) { | |
DisplayMetrics metrics = context.getResources().getDisplayMetrics(); | |
return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dipValue, metrics); | |
} |
$ adb shell
shell@shamu:/ $ 'pm list packages -f'
OlderNewer