To create an attractive “About us” for an app this will help you
First create an XML file
aboutsus.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:text="Write about you here"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
Then create a Java file
Aboutus.java
//don’t forget to change the package here
package com.example.test;
import android.app.Activity;
import android.os.Bundle;
public class Aboutus extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.aboutus);
}
}
and Here comes the main part
open manifest.xml then
inside <application> …. </application> copy below code
<activity
android:name="com.example.test.Aboutus"
android:label="@string/app_name"
android:theme="@android:style/Theme.Dialog" >
<intent-filter >
<action android:name="android.intent.action.ABOUT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Run the code and have an attractive “about us”
No comments:
Post a Comment