If you ever want to get the SHA, MD5 or the signing key used to sign your app for example you can use the following snippet: private void printSHA() { try { // get the package info that contains the…
I had a lot of fights with this and I think it’s better to write down the solution so I won’t waste my time looking again on google/stackoverflow for it. Maybe this will help you too! Problem You might have…
Maybe you need to add links to a TextView on Android but you don’t want to use Linkify for some reasons and you also want that link to be opened when the user taps it. Here is a simple solution: yourTextView.setText(Html.fromHtml(…
I think I spent 2 days in order to find a way of changing the text color of the ShareActionProvider. There are some posts on the internet but none worked for me. So I started to try myself each and every…
If you need to set a smaller hint for your edit text, you can set the hint this way: myEditText.setHint(Html.fromHtml( "<small><small><small>" + getString(R.string.hint) + "</small></small></small>")); 1234 myEditText.setHint(Html.fromHtml("<small><small><small>"+ getString(R.string.hint)+ "</small></small></small>")); Also, you can set the size in the string resource file…
Hi, in this tutorial I will show you and I will try to explain how to introduce timer in your app, how to pause it and how to resume it. First you need to know that we will have to…
When I first needed to set a message on a ListView that was empty, I tried different methods, but none of them worked, except the one that I will describe in this tutorial. So let’s start. When you want to…
You might notice the new CardView widget on Android L preview presentation. The view can be used to display text or images and has a nice shadow. You can add that view into your project even if you don’t have…
I have just updated my Android Studio to Android Studio 0.8.2. But, after the update I kept getting these 3 errors while I was trying to run my project: 1. First error Error:Execution failed for task > java.io.FileNotFoundException: C:\Program Files (x86)\Android\android-studio\sdk\tools\proguard\proguard-android-optimize.txt…
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok