Common Android Views Cheat Sheet Page 3

ADVERTISEMENT

Common Android Views
SearchView
<SearchView
android:id="@+id/search_viewr"
A search field that you can type
android:layout_width="match_parent"
android:layout_height="wrap_content"
Search Photos
a query into
android:iconifiedByDefault="false"
android:queryHint="@string/search_photos"
/>
ProgressBar
<ProgressBar
android:id="@+id/loading_spinner"
Loading spinner
style="?android:progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
ProgressBar
<ProgressBar
android:id="@+id/progress_bar"
Horizontal loading indicator
style="?android:progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="false"
android:max="100"
android:progress="40"/>
Note: This is based on an app with minimum SDK version of Ice Cream Sandwich
(API 15), where the activity theme in res/styles.xml is defined as the following.
You can define other theme colors like colorPrimary in your app, see this
guide.
<style
name="AppTheme"
parent="Theme.AppCompat.Light.DarkActionBar">
<item
name="colorAccent">#4689C8</item>
</style>

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go
Page of 3