Small pieces of code that can be copy/paste-ed on your project

  1. Home
  2. chevron_right
  3. Snippets

Android Parse JSON file from Assets

commentNo Comments
Under src/main add new directory named “assets“. Inside this directory add your json file. Create a Utils class to add the method that will read your json file from assets. import android.content.Context; import android.util.Log; import; import; public class…

Android: How To Change Hint’s Size

turned_in_not, , ,
comment1 Comment
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>")); Also, you can set the size in the string resource file where is the string…