Skip to content

Commit 14fedfa

Browse files
Initial commit
1 parent 3e8920b commit 14fedfa

File tree

28 files changed

+1015
-0
lines changed

28 files changed

+1015
-0
lines changed

WeatherApp/.classpath

Lines 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+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="src" path="gen"/>
5+
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
6+
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
7+
<classpathentry kind="output" path="bin/classes"/>
8+
</classpath>

WeatherApp/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/bin

WeatherApp/.project

Lines 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+
<projectDescription>
3+
<name>WeatherApp</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.jdt.core.javabuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
<buildCommand>
24+
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
25+
<arguments>
26+
</arguments>
27+
</buildCommand>
28+
</buildSpec>
29+
<natures>
30+
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
31+
<nature>org.eclipse.jdt.core.javanature</nature>
32+
</natures>
33+
</projectDescription>

WeatherApp/AndroidManifest.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.survivingwithandroid.weatherapp"
4+
android:versionCode="1"
5+
android:versionName="1.0" >
6+
7+
<uses-sdk
8+
android:minSdkVersion="8"
9+
android:targetSdkVersion="17" />
10+
11+
<uses-permission android:name="android.permission.INTERNET"/>
12+
13+
<application
14+
android:allowBackup="true"
15+
android:icon="@drawable/ic_launcher"
16+
android:label="@string/app_name"
17+
android:theme="@style/AppTheme" >
18+
<activity
19+
android:name="com.survivingwithandroid.weatherapp.MainActivity"
20+
android:label="@string/app_name" >
21+
<intent-filter>
22+
<action android:name="android.intent.action.MAIN" />
23+
24+
<category android:name="android.intent.category.LAUNCHER" />
25+
</intent-filter>
26+
</activity>
27+
</application>
28+
29+
</manifest>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/** Automatically generated file. DO NOT MODIFY */
2+
package com.survivingwithandroid.weatherapp;
3+
4+
public final class BuildConfig {
5+
public final static boolean DEBUG = true;
6+
}
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
/* AUTO-GENERATED FILE. DO NOT MODIFY.
2+
*
3+
* This class was automatically generated by the
4+
* aapt tool from the resource data it found. It
5+
* should not be modified by hand.
6+
*/
7+
8+
package com.survivingwithandroid.weatherapp;
9+
10+
public final class R {
11+
public static final class attr {
12+
}
13+
public static final class dimen {
14+
/** Default screen margins, per the Android Design guidelines.
15+
16+
Customize dimensions originally defined in res/values/dimens.xml (such as
17+
screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
18+
19+
*/
20+
public static final int activity_horizontal_margin=0x7f040000;
21+
public static final int activity_vertical_margin=0x7f040001;
22+
}
23+
public static final class drawable {
24+
public static final int ic_launcher=0x7f020000;
25+
}
26+
public static final class id {
27+
public static final int action_settings=0x7f08000b;
28+
public static final int cityText=0x7f080000;
29+
public static final int condDescr=0x7f080002;
30+
public static final int condIcon=0x7f080001;
31+
public static final int hum=0x7f080007;
32+
public static final int humLab=0x7f080006;
33+
public static final int press=0x7f080005;
34+
public static final int pressLab=0x7f080004;
35+
public static final int temp=0x7f080003;
36+
public static final int windDeg=0x7f08000a;
37+
public static final int windLab=0x7f080008;
38+
public static final int windSpeed=0x7f080009;
39+
}
40+
public static final class layout {
41+
public static final int activity_main=0x7f030000;
42+
}
43+
public static final class menu {
44+
public static final int main=0x7f070000;
45+
}
46+
public static final class string {
47+
public static final int action_settings=0x7f050001;
48+
public static final int app_name=0x7f050000;
49+
public static final int hello_world=0x7f050002;
50+
}
51+
public static final class style {
52+
/**
53+
Base application theme, dependent on API level. This theme is replaced
54+
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
55+
56+
57+
Theme customizations available in newer API levels can go in
58+
res/values-vXX/styles.xml, while customizations related to
59+
backward-compatibility can go here.
60+
61+
62+
Base application theme for API 11+. This theme completely replaces
63+
AppBaseTheme from res/values/styles.xml on API 11+ devices.
64+
65+
API 11 theme customizations can go here.
66+
67+
Base application theme for API 14+. This theme completely replaces
68+
AppBaseTheme from BOTH res/values/styles.xml and
69+
res/values-v11/styles.xml on API 14+ devices.
70+
71+
API 14 theme customizations can go here.
72+
*/
73+
public static final int AppBaseTheme=0x7f060000;
74+
/** Application theme.
75+
All customizations that are NOT specific to a particular API-level can go here.
76+
*/
77+
public static final int AppTheme=0x7f060001;
78+
public static final int tempMax=0x7f060004;
79+
public static final int tempMin=0x7f060003;
80+
public static final int tempStyle=0x7f060002;
81+
public static final int valData=0x7f060005;
82+
}
83+
}

WeatherApp/ic_launcher-web.png

20.6 KB
Loading
384 KB
Binary file not shown.

WeatherApp/proguard-project.txt

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+
#}

WeatherApp/project.properties

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
1.25 KB
Loading
757 Bytes
Loading
1.73 KB
Loading
3.33 KB
Loading
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
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+
android:paddingBottom="@dimen/activity_vertical_margin"
6+
android:paddingLeft="@dimen/activity_horizontal_margin"
7+
android:paddingRight="@dimen/activity_horizontal_margin"
8+
android:paddingTop="@dimen/activity_vertical_margin"
9+
tools:context=".MainActivity" >
10+
11+
<TextView
12+
android:id="@+id/cityText"
13+
style="?android:attr/textAppearanceMedium"
14+
android:layout_width="wrap_content"
15+
android:layout_height="wrap_content"
16+
android:layout_centerHorizontal="true" />
17+
18+
<ImageView
19+
android:id="@+id/condIcon"
20+
android:layout_width="wrap_content"
21+
android:layout_height="wrap_content"
22+
android:layout_alignParentLeft="true"
23+
android:layout_below="@id/cityText" />
24+
25+
<TextView
26+
android:id="@+id/condDescr"
27+
android:layout_width="wrap_content"
28+
android:layout_height="wrap_content"
29+
android:layout_below="@id/condIcon"
30+
android:layout_alignLeft="@id/condIcon"
31+
/>
32+
33+
<TextView
34+
android:id="@+id/temp"
35+
style="@style/tempStyle"
36+
android:layout_width="wrap_content"
37+
android:layout_height="wrap_content"
38+
android:layout_marginLeft="12dp"
39+
android:layout_alignBaseline="@id/condDescr"
40+
android:layout_toRightOf="@id/condDescr"/>
41+
42+
<TextView
43+
android:id="@+id/pressLab"
44+
android:layout_width="wrap_content"
45+
android:layout_height="wrap_content"
46+
android:layout_alignParentLeft="true"
47+
android:layout_below="@id/condDescr"
48+
android:text="Pressure"
49+
android:layout_marginTop="15dp" />
50+
51+
<TextView
52+
android:id="@+id/press"
53+
android:layout_width="wrap_content"
54+
android:layout_height="wrap_content"
55+
android:layout_alignBaseline="@id/pressLab"
56+
android:layout_toRightOf="@id/pressLab"
57+
style="@style/valData"/>
58+
59+
<TextView
60+
android:id="@+id/humLab"
61+
android:layout_width="wrap_content"
62+
android:layout_height="wrap_content"
63+
android:layout_alignParentLeft="true"
64+
android:layout_below="@id/pressLab"
65+
android:text="Humidity" />
66+
67+
<TextView
68+
android:id="@+id/hum"
69+
android:layout_width="wrap_content"
70+
android:layout_height="wrap_content"
71+
android:layout_alignBaseline="@id/humLab"
72+
android:layout_toRightOf="@id/humLab"
73+
android:layout_marginLeft="4dp"
74+
style="@style/valData"/>
75+
76+
<TextView
77+
android:id="@+id/windLab"
78+
android:layout_width="wrap_content"
79+
android:layout_height="wrap_content"
80+
android:layout_alignParentLeft="true"
81+
android:layout_below="@id/humLab"
82+
android:text="Wind" />
83+
84+
<TextView
85+
android:id="@+id/windSpeed"
86+
android:layout_width="wrap_content"
87+
android:layout_height="wrap_content"
88+
android:layout_alignBaseline="@id/windLab"
89+
android:layout_toRightOf="@id/windLab"
90+
android:layout_marginLeft="4dp"
91+
style="@style/valData" />
92+
93+
<TextView
94+
android:id="@+id/windDeg"
95+
android:layout_width="wrap_content"
96+
android:layout_height="wrap_content"
97+
android:layout_alignBaseline="@id/windLab"
98+
android:layout_toRightOf="@id/windSpeed"
99+
android:layout_marginLeft="4dp"
100+
style="@style/valData"/>
101+
102+
</RelativeLayout>

WeatherApp/res/menu/main.xml

Lines 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>
Lines 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>
Lines 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>

WeatherApp/res/values-v11/styles.xml

Lines 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>

WeatherApp/res/values-v14/styles.xml

Lines 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>

WeatherApp/res/values/dimens.xml

Lines 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>

WeatherApp/res/values/strings.xml

Lines 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">WeatherApp</string>
5+
<string name="action_settings">Settings</string>
6+
<string name="hello_world">Hello world!</string>
7+
8+
</resources>

0 commit comments

Comments
 (0)