Easily add device frames to your Android app screenshots

If you have an app that you want to showcase by taking screenshots, you can easily make it look more appealing by adding the correct device frame around the screenshot. Fortunately, this is easy to do. Method 1: Using the Android developer website On the Android developer website there is a page where you can drag and drop your screenshots onto one of the 5 Google devices, to automatically generate a screeshot with a frame, that you can just download.

» Read more

Creating a nice looking List dialog with images and text

This tutorial, will demonstrate how you can create a great looking selectiondialog, containing both text and images. This list can then be used either directly in an Activity, Fragment, or as an Activity looking like a dialog. In this example, I will go with the latter, and create an activity that looks like a selection dialog window, that, in this case will be used to choose a country. Creating such a selection list is easy if it should contain text

» Read more

How to extract strings into strings.xml resource files in Android Studio

I have previously posted a guide on how to extract string resources in Eclipse, so I thought I would do it for Android Studio too, as it is not directly obvious how to acheive this. All your applications strings should be placed in the various /values/strings.xml files in your app. This is the best practice, gathers all texts, and easily enables you to translate your app into other languages. While developing apps, it might be easier to just

» Read more

Android Studio & Gradle: Cannot run gradlew. Permission denied.

If you are getting the “permission denied” error message while trying to run ./gradlew clean or ./gradlew build manually in your project: -bash: ./gradlew: Permission denied</div> You have to make the gradlew file executable. Open a terminal, navigate to the folder where your gradlew file is, and set execute permissions: chmod +x gradlew  It is also a good idea to close the project in Android Studio while working with the gradle wrapper from the terminal.

» Read more

Where to place the assets folder in Android Studio

If you are having problems with asset files not being included in your compiled apk file, it may be because your assets folder is placed in the wrong directory. The assets folder should usually be inside the following folder: <project>/src/main/. That is the default, but make sure to check the asset folder configuration setting in your projects .iml file, to be sure which folder it really is: <option name=”ASSETS_FOLDER_RELATIVE_PATH” value=”/src/

» Read more

A decent .gitignore file for Android Studio projects

This is a short post, with a decent .gitignore setup for Android Studio projects. I constantly find myself in need of one, so I thought I’d just post it here. Is this similar to your .gitignore files for Android Studio projects? .DS_Store # built application files *.apk *.ap_ # files for the dex VM *.dex # Java class files *.class # generated files bin/ gen/ # Local configuration file (sdk path, etc) local.properties # Eclipse project files .classpath .project # Android Studio .idea/ .gradle

» Read more

A web and mobile developers switch from Windows to OS X

I have been using Windows since win 95, I have some experience with Linux on servers, and a little bit on desktop. I am switching over from a quite powerful stationary htpc computer with Intel i5 3570K, to a Mac… This is the first time I am using a Mac as a daily driver. After using a late 2013 MacBook Pro 13″ “retina” for about 30 days, this is my little review, coming from a web and mobile developers perspective.

» Read more

Make Eclipse and Android Studio play nice with the same Android SDK

Are you using both Eclipse (ADT) and Android studio for developing Android apps? They both come with their own SDKs, and maintaining two SDKs separately can be quite painful. Here is how you set both IDE’s to use the same SDK. Create a new common SDK to be used by both IDE’s First, you have to set up a common SDK. You can either download a new SDK, or use the one that came with either Eclipse/ADT

» Read more

How to get the Monokai Color theme in Android Studio (and IntelliJ)

If you are tired of the boring default look of Android Studio (and IntelliJ which it is based on), you can do like me, and switch to the better looking Monokai theme from Sublime Text 2. The ugly default theme: I have already covered how to get the Monokai theme in Eclipse, and even how to get Monokai in Chrome developer tools! Downloading and importing the theme Download the theme as a zip file from the github repository, unzip it,

» Read more

Android Studio does not start

Have you just downloaded and installed the new Android Studio? And it will not start after the installation? Here is the solution: You are most likely missing the JDK_HOME environment variable. It should be pointing to your java JDK installation, for example  C:\Program Files\Java\jdk1.7.0_21\ If you haven’t installed Java JDK 7, you can download it from Oracle here.

» Read more