Changes

Jump to: navigation, search

Android Implicit Intents – An Android Studio Example

388 bytes removed, 14:37, 19 May 2014
no edit summary
= Designing the User Interface ==
The user interface for the ImplicitIntentActivity class is very simple, consisting solely of a RelativeLayout view and a button. Within the Project tool window, locate the ImplicitIntent -> src -> main -> res -> layout -> activity_implicit_intent.xml file and double click on it to load it into the Designer tool. Visually construct the user interface in Design mode so that it resembles Figure 31 -1, or enter the following XML in Text mode. Note that in both cases, the text on the button (“Show Web Page”) has been extracted to a string resource named button_text:
<pre>
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="com.ebookfrenzy.mywebview.mywebview.MyWebViewActivity">
 
<TextView
android:text="@string/hello_world"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>

Navigation menu