Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0dcb8c2

Browse filesBrowse files
JAVATECHIGJAVATECHIG
JAVATECHIG
authored and
JAVATECHIG
committed
Added Android Bundle Example
1 parent 760abbb commit 0dcb8c2
Copy full SHA for 0dcb8c2

File tree

Expand file treeCollapse file tree

23 files changed

+508
-0
lines changed
Filter options
Expand file treeCollapse file tree

23 files changed

+508
-0
lines changed
+33Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.javatechig"
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.javatechig.NewsListActivity"
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+
26+
<activity
27+
android:name="com.javatechig.NewsDetailsActivity"
28+
android:label="@string/app_name" >
29+
</activity>
30+
31+
</application>
32+
33+
</manifest>
Binary file not shown.
Loading
Loading
Loading
Loading
+39Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:id="@+id/LinearLayout1"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent"
6+
android:orientation="vertical"
7+
tools:context=".NewsListActivity" >
8+
9+
<TextView
10+
android:id="@+id/headlines"
11+
android:layout_width="fill_parent"
12+
android:layout_height="wrap_content"
13+
android:padding="8dp"
14+
android:text="Headline"
15+
android:background="#99CC00"
16+
android:textStyle="bold"
17+
android:textAppearance="?android:attr/textAppearanceMedium"
18+
android:textColor="#0000dc" />
19+
20+
<TextView
21+
android:id="@+id/pub_date"
22+
android:layout_width="fill_parent"
23+
android:layout_height="wrap_content"
24+
android:gravity="right"
25+
android:padding="3dp"
26+
android:text="Published Date"
27+
android:textAppearance="?android:attr/textAppearanceSmall"
28+
android:background="#33B5E5"
29+
android:textColor="#0000dc" />
30+
31+
<TextView
32+
android:id="@+id/description"
33+
android:layout_width="wrap_content"
34+
android:layout_height="wrap_content"
35+
android:padding="10dp"
36+
android:text="News Description"
37+
android:textAppearance="?android:attr/textAppearanceMedium" />
38+
39+
</LinearLayout>
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
tools:context=".NewsListActivity" >
6+
7+
<ListView
8+
android:id="@+id/newsList"
9+
android:layout_width="fill_parent"
10+
android:layout_height="fill_parent" >
11+
</ListView>
12+
13+
</RelativeLayout>
+33Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:id="@+id/LinearLayout1"
4+
android:layout_width="match_parent"
5+
android:layout_height="80dp"
6+
android:orientation="vertical"
7+
android:minHeight="60dp"
8+
android:background="#99CC00"
9+
tools:context=".NewsListActivity" >
10+
11+
<TextView
12+
android:id="@+id/newsHeadline"
13+
android:layout_width="wrap_content"
14+
android:layout_height="wrap_content"
15+
android:text="News Headline"
16+
android:padding="5dp"
17+
android:minLines="2"
18+
android:maxLines="2"
19+
android:textStyle="bold"
20+
android:textColor="#0000dc"
21+
android:textAppearance="?android:attr/textAppearanceMedium" />
22+
23+
<TextView
24+
android:id="@+id/pubDate"
25+
android:layout_width="wrap_content"
26+
android:layout_height="wrap_content"
27+
android:layout_marginRight="19dp"
28+
android:text="Published Date"
29+
android:padding="3dp"
30+
android:textColor="#FF4444"
31+
android:textAppearance="?android:attr/textAppearanceSmall" />
32+
33+
</LinearLayout>
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
2+
3+
<item
4+
android:id="@+id/action_settings"
5+
android:orderInCategory="100"
6+
android:showAsAction="never"
7+
android:title="@string/action_settings"/>
8+
9+
</menu>
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<resources>
2+
3+
<!--
4+
Customize dimensions originally defined in res/values/dimens.xml (such as
5+
screen margins) for sw600dp devices (e.g. 7" tablets) here.
6+
-->
7+
8+
</resources>
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<resources>
2+
3+
<!--
4+
Customize dimensions originally defined in res/values/dimens.xml (such as
5+
screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
6+
-->
7+
<dimen name="activity_horizontal_margin">128dp</dimen>
8+
9+
</resources>
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<resources>
2+
3+
<!--
4+
Base application theme for API 11+. This theme completely replaces
5+
AppBaseTheme from res/values/styles.xml on API 11+ devices.
6+
-->
7+
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
8+
<!-- API 11 theme customizations can go here. -->
9+
</style>
10+
11+
</resources>
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<resources>
2+
3+
<!--
4+
Base application theme for API 14+. This theme completely replaces
5+
AppBaseTheme from BOTH res/values/styles.xml and
6+
res/values-v11/styles.xml on API 14+ devices.
7+
-->
8+
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
9+
<!-- API 14 theme customizations can go here. -->
10+
</style>
11+
12+
</resources>

‎AndroidBundleExample/res/values/arrays.xml

Copy file name to clipboardExpand all lines: AndroidBundleExample/res/values/arrays.xml
+83Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
4+
<string-array name="news_headlines">
5+
<item>WFG National Title adds new senior vice president</item>
6+
<item>Title365 Co. appoints chief compliance officer</item>
7+
<item>Subscriber Access OnlyTitle Resource Group’s Sunbelt Title expands operations in Florida through acquisition of Security First Title &amp; Escrow</item>
8+
<item>Subscriber Access OnlyInvestors Title Company announces second quarter 2013 results</item>
9+
<item>Subscriber Access OnlyPontoon Beach man charged with title fraud</item>
10+
<item>Subscriber Access OnlyFederal Title &amp; Escrow shows 5,000 downloads of Close It! in three months</item>
11+
<item>Former vice president returns to North American Title Insurance Co.</item>
12+
<item>Subscriber Access OnlyFirst Title completes SSAE 16 compliance report</item>
13+
<item>reQuire grows account management team with new hire</item>
14+
<item>Subscriber Access OnlyWestcor announces Pennsylvania state agency manager</item>
15+
<item>CoreLogic says bond credit quality outlook improves in first quarter 2013</item>
16+
<item>Core Logic Case-Shiller Home Price Indexes reveal surge in home prices in first quarter</item>
17+
</string-array>
18+
<string-array name="news_pubdate">
19+
<item>8/13/2013</item>
20+
<item>12/13/2013</item>
21+
<item>3/13/2013</item>
22+
<item>13/13/2013</item>
23+
<item>14/13/2013</item>
24+
<item>6/13/2013</item>
25+
<item>7/12/2013</item>
26+
<item>9/12/2013</item>
27+
<item>8/12/2013</item>
28+
<item>10/12/2013</item>
29+
<item>6/12/2013</item>
30+
<item>8/8/2013</item>
31+
</string-array>
32+
33+
<string-array name="news_details">
34+
<item>WFG National Title Insurance Co. added Robert Horvat to serve as senior vice president of Northwest operations and
35+
divisional counsel. He will primarily support WFG National Title’s Oregon and Washington title operations. In his role,
36+
he will offer underwriting, claims and general legal counsel; provide internal and outside training and support all aspects of daily operations. </item>
37+
<item>Title365 Co., a provider of title insurance and escrow services, promoted Clay White to chief compliance officer from director of compliance and
38+
implementations. In his new role, he will be responsible for regulatory compliance, audits and procedural standards along with assessment of potential
39+
risks and opportunities for industry innovation of benefit to Title365 clients.
40+
</item>
41+
<item>WFG National Title Insurance Co. added Robert Horvat to serve as senior vice president of Northwest operations and
42+
divisional counsel. He will primarily support WFG National Title’s Oregon and Washington title operations. In his role,
43+
he will offer underwriting, claims and general legal counsel; provide internal and outside training and support all aspects of daily operations.
44+
</item>
45+
<item>WFG National Title Insurance Co. added Robert Horvat to serve as senior vice president of Northwest operations and
46+
divisional counsel. He will primarily support WFG National Title’s Oregon and Washington title operations. In his role,
47+
he will offer underwriting, claims and general legal counsel; provide internal and outside training and support all aspects of daily operations.
48+
</item>
49+
<item>WFG National Title Insurance Co. added Robert Horvat to serve as senior vice president of Northwest operations and
50+
divisional counsel. He will primarily support WFG National Title’s Oregon and Washington title operations. In his role,
51+
he will offer underwriting, claims and general legal counsel; provide internal and outside training and support all aspects of daily operations.
52+
</item>
53+
<item>WFG National Title Insurance Co. added Robert Horvat to serve as senior vice president of Northwest operations and
54+
divisional counsel. He will primarily support WFG National Title’s Oregon and Washington title operations. In his role,
55+
he will offer underwriting, claims and general legal counsel; provide internal and outside training and support all aspects of daily operations.
56+
</item>
57+
<item>Title365 Co., a provider of title insurance and escrow services, promoted Clay White to chief compliance officer from director of compliance and
58+
implementations. In his new role, he will be responsible for regulatory compliance, audits and procedural standards along with assessment of potential
59+
risks and opportunities for industry innovation of benefit to Title365 clients.
60+
</item>
61+
<item>WFG National Title Insurance Co. added Robert Horvat to serve as senior vice president of Northwest operations and
62+
divisional counsel. He will primarily support WFG National Title’s Oregon and Washington title operations. In his role,
63+
he will offer underwriting, claims and general legal counsel; provide internal and outside training and support all aspects of daily operations.
64+
</item>
65+
<item>Title365 Co., a provider of title insurance and escrow services, promoted Clay White to chief compliance officer from director of compliance and
66+
implementations. In his new role, he will be responsible for regulatory compliance, audits and procedural standards along with assessment of potential
67+
risks and opportunities for industry innovation of benefit to Title365 clients.
68+
</item>
69+
<item>WFG National Title Insurance Co. added Robert Horvat to serve as senior vice president of Northwest operations and
70+
divisional counsel. He will primarily support WFG National Title’s Oregon and Washington title operations. In his role,
71+
he will offer underwriting, claims and general legal counsel; provide internal and outside training and support all aspects of daily operations.
72+
</item>
73+
<item>Title Resource Group expanded its Sunbelt Title operations into Brevard County, Fla., through the acquisition of Security First Title &amp; Escrow.
74+
The newly acquired company’s three offices are in Melbourne, Merritt Island and Orlando. It will now operate as Sunbelt Title Agency, which is
75+
owned and operated by TRG.
76+
</item>
77+
<item>Title365 Co., a provider of title insurance and escrow services, promoted Clay White to chief compliance officer from director of compliance and
78+
implementations. In his new role, he will be responsible for regulatory compliance, audits and procedural standards along with assessment of potential
79+
risks and opportunities for industry innovation of benefit to Title365 clients.
80+
</item>
81+
</string-array>
82+
83+
</resources>
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
4+
<color name="list_row_color1">#99CC00</color>
5+
<color name="list_row_color2">#33B5E5</color>
6+
7+
</resources>
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<resources>
2+
3+
<!-- Default screen margins, per the Android Design guidelines. -->
4+
<dimen name="activity_horizontal_margin">16dp</dimen>
5+
<dimen name="activity_vertical_margin">16dp</dimen>
6+
7+
</resources>
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
4+
<string name="app_name">Android Example</string>
5+
<string name="action_settings">Settings</string>
6+
<string name="hello_world">Hello world!</string>
7+
8+
</resources>
+20Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<resources>
2+
3+
<!--
4+
Base application theme, dependent on API level. This theme is replaced
5+
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
6+
-->
7+
<style name="AppBaseTheme" parent="android:Theme.Light">
8+
<!--
9+
Theme customizations available in newer API levels can go in
10+
res/values-vXX/styles.xml, while customizations related to
11+
backward-compatibility can go here.
12+
-->
13+
</style>
14+
15+
<!-- Application theme. -->
16+
<style name="AppTheme" parent="AppBaseTheme">
17+
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
18+
</style>
19+
20+
</resources>
+47Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package com.javatechig;
2+
3+
import android.app.Activity;
4+
import android.content.Intent;
5+
import android.os.Bundle;
6+
import android.view.Menu;
7+
import android.widget.TextView;
8+
import static com.javatechig.NewsListActivity.KEY_HEADLINE;
9+
import static com.javatechig.NewsListActivity.KEY_PUBDATE;
10+
import static com.javatechig.NewsListActivity.KEY_DETAILS;
11+
12+
public class NewsDetailsActivity extends Activity {
13+
14+
@Override
15+
protected void onCreate(Bundle savedInstanceState) {
16+
super.onCreate(savedInstanceState);
17+
setContentView(R.layout.activity_news_details);
18+
19+
20+
String headline = "";
21+
String details = "";
22+
String pubDate = "";
23+
24+
Intent intent = getIntent();
25+
if (null != intent) {
26+
headline = intent.getStringExtra(KEY_HEADLINE);
27+
details = intent.getStringExtra(KEY_DETAILS);
28+
pubDate = intent.getStringExtra(KEY_PUBDATE);
29+
}
30+
31+
32+
TextView headlineTxt = (TextView) findViewById(R.id.headlines);
33+
headlineTxt.setText(headline);
34+
35+
TextView pubdateTxt = (TextView) findViewById(R.id.pub_date);
36+
pubdateTxt.setText(pubDate);
37+
38+
TextView descriptionTxt = (TextView) findViewById(R.id.description);
39+
descriptionTxt.setText(details);
40+
}
41+
42+
@Override
43+
public boolean onCreateOptionsMenu(Menu menu) {
44+
getMenuInflater().inflate(R.menu.main, menu);
45+
return true;
46+
}
47+
}
+33Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package com.javatechig;
2+
3+
public class NewsItem {
4+
5+
private String headline;
6+
private String details;
7+
private String pubDate;
8+
9+
public String getHeadline() {
10+
return headline;
11+
}
12+
13+
public void setHeadline(String headline) {
14+
this.headline = headline;
15+
}
16+
17+
public String getDetails() {
18+
return details;
19+
}
20+
21+
public void setDetails(String details) {
22+
this.details = details;
23+
}
24+
25+
public String getPubDate() {
26+
return pubDate;
27+
}
28+
29+
public void setPubDate(String pubDate) {
30+
this.pubDate = pubDate;
31+
}
32+
33+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.