Android Development Tips

1 Different Activities can use same Adapter

2 Toolbar in the bottom of screen

http://stackoverflow.com/questions/30063426/best-way-to-create-a-bottom-toolbar-in-android

3 FragmentPagerAdapter getItem() called twice in first time

http://stackoverflow.com/questions/13214063/getitem-calling-multiple-time-in-fragmentpageradapter

4 four-direction swiping:

http://gitlab.sazze.com/fs/android/commit/c6cf6be3ad84e687027b68f40c1acb4677c125c0

https://github.com/btate/BTGridPager-Android/blob/master/src/com/brandontate/BTGridPager/BTFragmentGridPager.java

https://github.com/btate/BTGridPager-Android/blob/master/src/com/brandontate/BTGridPager/BTVerticalPager.java

https://github.com/btate/BTGridPager-Android/blob/master/src/com/brandontate/BTGridPager/BTVerticalPagerFragment.java

http://vision-apps.blogspot.com/2013/05/4-directions-swipe-navigation.html

https://bitbucket.org/NxAlex/swipes-navigation-demo/src/4111914d005a25b0afaca57428fdda7c2577afc2/sample/SwipeNavigationDemo/src/com/visionapps/demo/swipe/activity/MainActivity.java?at=master&fileviewer=file-view-default

http://stackoverflow.com/questions/13477820/android-vertical-viewpager

5 get visible item in RecyclerView

http://stackoverflow.com/questions/24989218/get-visible-items-in-recyclerview

6 detect swiping event in ViewPager

http://stackoverflow.com/questions/13346824/viewpager-detect-when-user-is-trying-to-swipe-out-of-bounds

7 share image with url

http://stackoverflow.com/questions/26301170/android-intent-share-using-external-image-url

http://stackoverflow.com/questions/20333186/how-to-share-imagetext-using-action-send-in-android

8 BottomSheet for popped menu

http://takeoffandroid.com/dialog/materialdialogbottomsheet/

https://github.com/TakeoffAndroid/MaterialDialogBottomSheet

https://www.google.com/design/spec/components/bottom-sheets.html#bottom-sheets-persistent-bottom-sheets

https://github.com/Flipboard/bottomsheet

https://github.com/soarcn/BottomSheet

http://blog.rhesoft.com/2015/10/08/android-tutorial-flipboard-bottom-sheet/

9 ListView with CursorAdapter click listener

http://stackoverflow.com/questions/4788331/make-a-listview-row-clickable-using-a-custom-cursoradapter

http://www.java2s.com/Code/Android/UI/UsingSimpleCursorAdapterandListView.htm

http://stackoverflow.com/questions/14167081/custom-simplecursoradapter-with-imagebutton-random-values

10 WebView

http://developer.android.com/guide/webapps/webview.html

http://stackoverflow.com/questions/4066438/android-webview-how-to-handle-redirects-in-app-instead-of-opening-a-browser

myWebView.setWebViewClient(new WebViewClient() {
       @Override
       public boolean shouldOverrideUrlLoading(WebView view, String url) {
           return false;
       }
   });

 

Even better just call myWebView.setWebViewClient(new WebViewClient()); The default implementation of shouldOverrideUrlLoading returns false.

http://www.mkyong.com/android/android-webview-example/

11 AlertDialog

http://www.wikihow.com/Show-Alert-Dialog-in-Android

http://www.mkyong.com/android/android-alert-dialog-example/

 

To be continue …

Advertisements

About liyao13

Yao Li is a web and iOS developer, blogger and he has a passion for technology and business. In his blogs, he shares code snippets, tutorials, resources and notes to help people develop their skills. Donate $5 to him for a coffee with PayPal at About Me page and read more professional and interesting technical blog articles. Follow him @Yaoli0615 at Twitter to get latest tech updates.
This entry was posted in CS Research&Application, Uncategorized and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s