Home‎ > ‎android‎ > ‎Layout Enhanced‎ > ‎

Step By Step Implementation (Cont.)

b. Create a New Class

From your IDE, create a new class with extends the Activity class. And set the layout to the currently layout you 've design. it should be an activity class or a class that inherit from Activity class.

Add some code you want, to interact with the layout. for this example we name the class is EducationData to hold person education data input.

c. Update AndroidManifest.xml

Update AndroidManifest.xml file to hold the new class/screen, below is an example AndroidManifest.xml file, used in this code. 
<manifest 
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.iftitah.android.layoutenh">
<application>
<activity class=".MyLayoutEnh" 
android:label="MyLayout Enhance">
<intent-filter>
<action 
android:value="android.intent.action.MAIN" />
<category 
android:value="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity class=".EducationData" 
android:label="Education Data">
</activity>
</application>
</manifest> 

Bold Text, is an addition to the new screen activity class declaration.


Was this information helpfull ?

Comments