Skip to content

Commit 8872619

Browse files
committed
Merge branch 'feature/prepare_first_activity' into develop
2 parents cb2b9a8 + 8ae5ed3 commit 8872619

File tree

8 files changed

+51
-15
lines changed

8 files changed

+51
-15
lines changed

app/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ android {
2121

2222
dependencies {
2323
compile fileTree(dir: 'libs', include: ['*.jar'])
24+
compile 'com.android.support:support-v4:20.0.0'
2425
}

app/src/main/AndroidManifest.xml

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@
55
<application
66
android:allowBackup="true"
77
android:icon="@drawable/ic_launcher"
8-
android:label="@string/app_name"
8+
android:label=""
99
android:theme="@style/AppTheme" >
1010
<activity
1111
android:name=".MyActivity"
12-
android:label="@string/app_name" >
12+
android:label="" >
13+
1314
<intent-filter>
1415
<action android:name="android.intent.action.MAIN" />
15-
1616
<category android:name="android.intent.category.LAUNCHER" />
1717
</intent-filter>
18+
1819
</activity>
1920
</application>
2021

app/src/main/java/com/saulmm/material/MyActivity.java

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.app.Activity;
44
import android.graphics.Outline;
55
import android.os.Bundle;
6+
import android.view.Menu;
67
import android.view.View;
78
import android.widget.Toast;
89

app/src/main/res/layout/activity_my.xml

+32-10
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,44 @@
22
xmlns:tools="http://schemas.android.com/tools"
33
android:layout_width="match_parent"
44
android:layout_height="match_parent"
5-
android:paddingLeft="@dimen/activity_horizontal_margin"
6-
android:paddingRight="@dimen/activity_horizontal_margin"
7-
android:paddingTop="@dimen/activity_vertical_margin"
85
android:paddingBottom="@dimen/activity_vertical_margin"
6+
97
tools:context=".MyActivity"
108
>
119

12-
<TextView
13-
android:text="@string/hello_world"
14-
android:layout_width="wrap_content"
15-
android:layout_height="wrap_content"
10+
<FrameLayout
11+
android:id="@+id/holder_view"
12+
android:layout_width="match_parent"
13+
android:layout_height="72dp"
14+
android:background="?android:colorPrimary">
15+
16+
<TextView
17+
android:id="@+id/holder_text"
18+
android:layout_width="wrap_content"
19+
android:layout_height="wrap_content"
20+
android:text="First activity"
21+
android:textSize="30sp"
22+
android:textColor="?android:colorForeground"
23+
android:layout_marginLeft="72dp"
24+
android:layout_marginBottom="@dimen/activity_vertical_margin"
25+
android:layout_gravity="bottom"
26+
android:fontFamily="sans-serif-light"
1627
/>
1728

18-
<include
29+
</FrameLayout>
30+
31+
<ImageButton
32+
xmlns:android="http://schemas.android.com/apk/res/android"
1933
android:id="@+id/fab_button"
20-
layout="@layout/view_fab_button"
21-
/>
34+
android:layout_width="@dimen/fab_size"
35+
android:layout_height="@dimen/fab_size"
36+
android:layout_marginRight="@dimen/activity_horizontal_margin"
37+
android:background="@drawable/ripple_round"
38+
android:stateListAnimator="@anim/fab_anim"
39+
android:src="@drawable/ic_action_add"
40+
android:elevation="5dp"
41+
android:layout_below="@+id/holder_view"
42+
android:layout_marginTop="-26dp"
43+
android:layout_alignParentEnd="true" />
2244

2345
</RelativeLayout>

app/src/main/res/menu/global.xml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<menu xmlns:android="http://schemas.android.com/apk/res/android">
2+
<item android:id="@+id/action_settings"
3+
android:title="@string/action_settings"
4+
android:orderInCategory="100"
5+
android:showAsAction="never" />
6+
</menu>

app/src/main/res/values-v21/styles.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<item name="android:colorPrimary">@color/theme_default_primary</item>
77
<item name="android:colorPrimaryDark">@color/theme_default_primary_dark</item>
8-
<item name="android:statusBarColor">@color/theme_default_primary_dark</item>
8+
<item name="android:statusBarColor">@color/theme_default_primary</item>
99
<item name="android:colorAccent">@color/accent</item>
1010

1111
</style>

app/src/main/res/values/dimens.xml

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<resources>
3+
24
<!-- Default screen margins, per the Android Design guidelines. -->
35
<dimen name="activity_horizontal_margin">16dp</dimen>
46
<dimen name="activity_vertical_margin">16dp</dimen>
@@ -7,4 +9,6 @@
79
<dimen name="fab_size">56dp</dimen>
810
<dimen name="button_elevation">2dp</dimen>
911
<dimen name="button_press_elevation">4dp</dimen>
12+
<dimen name="navigation_drawer_width">240dp</dimen>
13+
1014
</resources>

app/src/main/res/values/strings.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<resources>
33

44
<string name="app_name">My Application</string>
5-
<string name="hello_world">Hello world!</string>
65
<string name="action_settings">Settings</string>
6+
<string name="title_activity_my_activity2">MyActivity2</string>
7+
<string name="action_example">Example action</string>
78

89
</resources>

0 commit comments

Comments
 (0)