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
| initilize | |
| ------------------> | |
| country_spinner = (SearchableSpinner) findViewById(R.id.country_spinner); | |
| adapter setting | |
| ------------------------> | |
| _countryAdapter = new ArrayAdapter(this, | |
| R.layout.simple_text, countryList); | |
| country_spinner.setAdapter(_countryAdapter); |
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 FirebaseMessageservice extends FirebaseMessagingService { | |
| private static final String TAG = "MyFirebaseMsgService"; | |
| /** | |
| * Called when message is received. | |
| * | |
| * @param remoteMessage Object representing the message received from Firebase Cloud Messaging. | |
| */ | |
| // [START receive_message] |
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
| keytool -exportcert -keystore "D:\PlayStore_keystore\myproject.jks" -list -v | |
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
| Bitmap bitmap; | |
| if (img1.getDrawable() instanceof BitmapDrawable) { | |
| bitmap = ((BitmapDrawable) img1.getDrawable()).getBitmap(); | |
| } else { | |
| Drawable d = img1.getDrawable(); | |
| bitmap = Bitmap.createBitmap(d.getIntrinsicWidth(), d.getIntrinsicHeight(), Bitmap.Config.ARGB_8888); | |
| Canvas canvas = new Canvas(bitmap); | |
| d.draw(canvas); | |
| } | |
| // Bitmap placePinBM = createDrawableFromView(MainActivity.this, img1); |
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
| File storageDir = Environment.getExternalStoragePublicDirectory("Whats" | |
| ); | |
| if(!storageDir.exists()) | |
| { | |
| storageDir.mkdir(); | |
| } |
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
| org.gradle.daemon=true | |
| org.gradle.parallel=true |
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
| dependency | |
| debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.4' | |
| releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4' | |
| Application | |
| public class LeakCanaryApplication extends Application { |
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
| Need Activity for display AlertDialog, because we can't display Dialog from any Service | |
| Solution. | |
| Create Activity as Dialog Theme and start that Activity from Service. | |
| Just need to register you Activity in menifest.xml like as below | |
| android:theme="@android:style/Theme.Dialog" |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <!-- Non focused states --> | |
| <item android:state_selected="false" | |
| android:drawable="@drawable/defualttab" /> | |
| <!-- Focused states (such as when focused with a d-pad or mouse hover) --> | |
| <item android:state_selected="true" |
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 void Animate(View view) | |
| { | |
| Display display = getWindowManager().getDefaultDisplay(); | |
| Point point=new Point(); | |
| display.getSize(point); | |
| final int width = point.y; // screen height | |
| final float halfW = width/2.0f; | |
| //Y orX transactionY or tranX | |
| ObjectAnimator lftToRgt = ObjectAnimator.ofFloat( view,"Y",200,0f ) | |
| .setDuration(3200); // to animate left to right |