Skip to content

Commit 6efefbe

Browse files
author
Nilanchala
committed
Added Custom and Compound Views in Android Tutorial
Custom and Compound Views in Android Tutorial
1 parent 33ee204 commit 6efefbe

File tree

21 files changed

+331
-0
lines changed

21 files changed

+331
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.example.customview"
4+
android:versionCode="1"
5+
android:versionName="1.0" >
6+
7+
<uses-sdk
8+
android:minSdkVersion="8"
9+
android:targetSdkVersion="17" />
10+
11+
<application
12+
android:allowBackup="true"
13+
android:icon="@drawable/ic_launcher"
14+
android:label="@string/app_name"
15+
android:theme="@style/AppTheme" >
16+
<activity
17+
android:name="com.example.customview.MainActivity"
18+
android:label="@string/app_name" >
19+
<intent-filter>
20+
<action android:name="android.intent.action.MAIN" />
21+
22+
<category android:name="android.intent.category.LAUNCHER" />
23+
</intent-filter>
24+
</activity>
25+
</application>
26+
27+
</manifest>
473 KB
Binary file not shown.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# To enable ProGuard in your project, edit project.properties
2+
# to define the proguard.config property as described in that file.
3+
#
4+
# Add project specific ProGuard rules here.
5+
# By default, the flags in this file are appended to flags specified
6+
# in ${sdk.dir}/tools/proguard/proguard-android.txt
7+
# You can edit the include path and order by changing the ProGuard
8+
# include property in project.properties.
9+
#
10+
# For more details, see
11+
# http://developer.android.com/guide/developing/tools/proguard.html
12+
13+
# Add any project specific keep options here:
14+
15+
# If your project uses WebView with JS, uncomment the following
16+
# and specify the fully qualified class name to the JavaScript interface
17+
# class:
18+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19+
# public *;
20+
#}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This file is automatically generated by Android Tools.
2+
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3+
#
4+
# This file must be checked in Version Control Systems.
5+
#
6+
# To customize properties used by the Ant build system edit
7+
# "ant.properties", and override values to adapt the script to your
8+
# project structure.
9+
#
10+
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11+
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12+
13+
# Project target.
14+
target=android-17
7.48 KB
Loading
3.69 KB
Loading
12.2 KB
Loading
24.2 KB
Loading
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
xmlns:custom="http://schemas.android.com/apk/res/com.example.customview"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent"
6+
android:layout_margin="10dp"
7+
android:orientation="vertical"
8+
tools:context=".MainActivity" >
9+
10+
<com.example.customview.LovelyView
11+
android:id="@+id/lovelyView"
12+
android:layout_width="fill_parent"
13+
android:layout_height="wrap_content"
14+
android:layout_margin="10dp"
15+
custom:leftLabel=""
16+
custom:leftLabelStyle="@style/leftTextStyle"
17+
custom:rightLabel=""
18+
custom:rightLabelStyle="@style/rightTextStyle" />
19+
20+
<com.example.customview.LovelyView
21+
android:id="@+id/lovelyView1"
22+
android:layout_width="fill_parent"
23+
android:layout_height="wrap_content"
24+
custom:leftLabel="Hello Mr:"
25+
custom:leftLabelStyle="@style/leftTextStyle"
26+
custom:rightLabel="Whats Up Buddy!"
27+
custom:rightLabelStyle="@style/rightTextStyle" />
28+
29+
</LinearLayout>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
android:orientation="horizontal"
6+
android:weightSum="2" >
7+
8+
<TextView
9+
android:id="@+id/leftTextView"
10+
android:layout_width="fill_parent"
11+
android:layout_height="wrap_content"
12+
android:layout_weight="1"
13+
android:gravity="right|center_vertical"
14+
android:text="key" />
15+
16+
17+
<TextView
18+
android:id="@+id/rightTextView"
19+
android:layout_width="fill_parent"
20+
android:layout_height="wrap_content"
21+
android:layout_weight="1"
22+
android:gravity="left|center_vertical"
23+
android:text="value" />
24+
25+
</LinearLayout>

0 commit comments

Comments
 (0)