Category «Android»

Remaining Backward Compatible in Android

The SearchView and action bar are only available on Android 3.0 and later. To support older platforms, you can fall back to the search dialog. The search dialog is a system provided UI that overlays on top of your application when invoked. Set Minimum and Target API levels To setup the search dialog, first declare …

Adding Swipe-to-Refresh To Your App in Android

The swipe-to-refresh user interface pattern is implemented entirely within theSwipeRefreshLayout widget, which detects the vertical swipe, displays a distinctive progress bar, and triggers callback methods in your app. You enable this behavior by adding the widget to your layout file as the parent of a ListView or GridView, and implementing the refresh behavior that gets …

Responding to a Refresh Request in Android

This lesson shows you how to update your app when the user requests a manual refresh, whether the user triggers the refresh with a swipe gesture or by using the action bar refresh action. Respond to the Refresh Gesture When the user makes a swipe gesture, the system displays the progress indicator and calls your …

Storing and Searching for Data in Android

There are many ways to store your data, such as in an online database, in a local SQLite database, or even in a text file. It is up to you to decide what is the best solution for your application. This lesson shows you how to create a SQLite virtual table that can provide robust …

Remaining Backward Compatible in Android

The SearchView and action bar are only available on Android 3.0 and later. To support older platforms, you can fall back to the search dialog. The search dialog is a system provided UI that overlays on top of your application when invoked. Set Minimum and Target API levels To setup the search dialog, first declare …

Enabling Deep Links for App Content in Android

To enable Google to crawl your app content and allow users to enter your app from search results, you must add intent filters for the relevant activities in your app manifest. These intent filters allow deep linking to the content in any of your activities. For example, the user might click on a deep link …

Specifying App Content for Indexing in Androd

Google’s web crawling bot (Googlebot), which crawls and indexes web sites for the Google search engine, can also index content in your Android app. By opting in, you can allow Googlebot to crawl the content in the APK through the Google Play Store to index the app content. To indicate which app content you’d like …