Skip to content

Instantly share code, notes, and snippets.

@kalyandechiraju
Forked from johnkil/AndroidTip.txt
Created October 22, 2016 11:12
Show Gist options
  • Save kalyandechiraju/978559fffa5e86779e6d137f7c11962e to your computer and use it in GitHub Desktop.
Save kalyandechiraju/978559fffa5e86779e6d137f7c11962e to your computer and use it in GitHub Desktop.
30 helpful Android development Tips/Tricks
1) ListView=>Use android:cacheColorHint=”@android:color/transparent” to avoid black highlighting while Scrolling.
2) To resolve this issue “Failed to install *.apk on device timeout Launch canceled! , increase ADB connection timeout
3) use setError() to display error message for your EditText
4) To Block the default animation for startActivity() For ex: myIntent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
5) Android Action Bar Style Generator http://jgilfelt.github.com/android-actionbarstylegenerator
6) create library with reusable code and reference it in future projects.
7) Don’t use right-pointing carets on line items http://developer.android.com/design/media/migrating_ios_settings.png
8) 10 amazing Android development tips http://www.netmagazine.com/features/10-amazing-android-development-tips
9) Define these attributes for displaying multiline EditText => android:singleLine=”false”, android:lines=”5″
10) Follow Dashboard design pattern. Easy to implement and handle Navigation.
11) Before starting with android app development, should read Android Building Blocks http://developer.android.com/design/building-blocks/index.html
12) You can create your custom views by extending View class.
13) use android:weight=”1″ and android:layout_width=”0″ to define equal width of widgets inside LinearLayout.
14) With Android 4.0 you cant use http connection or make web call without using a Thread (with a runnable, AsyncTask )
15) Tutorial , Tips/Trick for Android http://stackoverflow.com/questions/3405695/tutorial-tips-trick-for-android
16) What should be the package name of android app? http://stackoverflow.com/questions/8075162/what-should-be-the-package-name-of-android-app
17) GraphView Library for Android to programmatically create flexible and nice-looking diagramms http://www.jjoe64.com/p/graphview-library.html?spref=tw
18) how to limit seekbar http://stackoverflow.com/questions/3490951/how-to-limit-seekbar
19) Do you know? => Android: maximum length of url http://stackoverflow.com/questions/10172566/android-maximum-length-of-url
20) How To Create a Android App With ICS UI That Works With Gingerbread and Froyo? http://stackoverflow.com/questions/9886523/how-to-create-a-android-app-with-ics-ui-that-works-with-gingerbread-and-froyo
21) Switch widget is available from API 14 http://developer.android.com/reference/android/widget/Switch.html
22) How to design tab icons? http://developer.android.com/guide/practices/ui_guidelines/icon_design_tab.html
23) rating bar padding problem http://code.google.com/p/android/issues/detail?id=2324
24) Anyone ever seen this exception when loading bitmaps in Android?… http://developer.android.com/training/displaying-bitmaps/index.html #BitmapVMSizeExceed
25) To capture screen shot from real android device, simply Press Home button + Back key
26) use android:installLocation=”auto” to enable move to SD-card feature for Android app http://www.technotalkative.com/android-enable-the-move-to-sd-card-feature/
27) Use SimpleDateFormat class to change format of date/time.
28) How to view the SQLite database on your Android Emulator http://blog.kwyps.com/2011/07/how-to-view-sqlite-database-on-your.html
29) you can check the status of AsyncTask by using getStatus() method, or like AsyncTask.Status.FINISHED
30) Stop developing countdown algorithms, use the built-in CountDownTimer (http://developer.android.com/reference/android/os/CountDownTimer.html).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment