summaryrefslogtreecommitdiffstats
path: root/tests/SharedLibrary
diff options
context:
space:
mode:
Diffstat (limited to 'tests/SharedLibrary')
-rw-r--r--tests/SharedLibrary/lib/res/layout/main.xml26
-rw-r--r--tests/SharedLibrary/lib/res/values/strings.xml1
-rw-r--r--tests/SharedLibrary/lib/src/com/google/android/test/shared_library/ActivityMain.java6
3 files changed, 28 insertions, 5 deletions
diff --git a/tests/SharedLibrary/lib/res/layout/main.xml b/tests/SharedLibrary/lib/res/layout/main.xml
new file mode 100644
index 0000000..df0204d9
--- /dev/null
+++ b/tests/SharedLibrary/lib/res/layout/main.xml
@@ -0,0 +1,26 @@
+<?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:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/sample_layout"/>
+
+ <com.google.android.test.shared_library.AddressView xmlns:address="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:background="#03a9f4"
+ address:name="Librarian L"
+ address:streetNumber="21"
+ address:streetName="Android Lane"
+ address:city="AndroidVille"
+ address:state="OS"
+ address:zip="12345"
+ address:country="Mobile"/>
+
+</LinearLayout>
diff --git a/tests/SharedLibrary/lib/res/values/strings.xml b/tests/SharedLibrary/lib/res/values/strings.xml
index 6827f93..9beccd9 100644
--- a/tests/SharedLibrary/lib/res/values/strings.xml
+++ b/tests/SharedLibrary/lib/res/values/strings.xml
@@ -28,4 +28,5 @@
</string-array>
<string name="racoon">Racoon</string>
+ <string name="sample_layout">This is an example of a layout this library provides.</string>
</resources>
diff --git a/tests/SharedLibrary/lib/src/com/google/android/test/shared_library/ActivityMain.java b/tests/SharedLibrary/lib/src/com/google/android/test/shared_library/ActivityMain.java
index 895aced..4b4893c 100644
--- a/tests/SharedLibrary/lib/src/com/google/android/test/shared_library/ActivityMain.java
+++ b/tests/SharedLibrary/lib/src/com/google/android/test/shared_library/ActivityMain.java
@@ -18,15 +18,11 @@ package com.google.android.test.shared_library;
import android.app.Activity;
import android.os.Bundle;
-import android.widget.TextView;
public class ActivityMain extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
-
- TextView content = new TextView(this);
- content.setText("Dummy main entry for this apk; not really needed...");
- setContentView(content);
+ setContentView(R.layout.main);
}
}