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
#==== Android Studio / Gradle | |
# built application files | |
*.apk | |
*.ap_ | |
# files for the dex VM | |
*.dex | |
# Java class files |
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
cd /usr/local/lib/ | |
sudo chown -R :admin node_modules/ node/ dtrace/ | |
sudo chown -R root node_modules/ node/ dtrace/ | |
sudo chmod g+x node_modules/ node/ dtrace/ |
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 -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 |
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
jarsigner -verify -verbose -certs my_application.apk |
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
gradlew with --refresh-dependencies |
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
// use this to explicitly show a title and set a logo | |
getActionBar().setDisplayOptions( ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_SHOW_TITLE); | |
getActionBar().setDisplayUseLogoEnabled(true); | |
getActionBar().setDisplayShowTitleEnabled(true); | |
getActionBar().setDisplayShowHomeEnabled(true); | |
getActionBar().setLogo(R.drawable.ic_launcher); | |
getActionBar().setTitle("I AM A TITLE!"); |
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
final ViewTreeObserver vto = myview.getViewTreeObserver(); | |
vto.addOnGlobalLayoutListener(new OnGlobalLayoutListener() { | |
@SuppressLint("NewApi") | |
@Override | |
public void onGlobalLayout() { | |
// do stuff | |
// remove this layout listener - as it will run every time the view updates | |
if (myview.getViewTreeObserver().isAlive()) { | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { |
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
private Dialog getCustomDialog(String productSpecs) { | |
final Dialog dialog = new Dialog(this, R.style.Dialog); | |
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); | |
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(0)); | |
dialog.setCancelable(true); | |
dialog.setContentView(R.layout.some_layout); | |
// dialog.findViewById stuff here... | |
return 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
aapt dump badging your.apk |
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
// only works if app has a launcher activity | |
Intent launchIntent = getPackageManager().getLaunchIntentForPackage("com.example.yourapp"); | |
startActivity(launchIntent); | |
// works if we know the name of the main activity, even if not a launcher | |
Intent intent = new Intent(Intent.ACTION_MAIN); | |
intent.setClassName("com.example.yourapp", "com.example.yourapp.MainActivity"); | |
startActivity(intent); |
OlderNewer