Skip to content

Commit

Permalink
Merge branch 'feature/prepare_first_activity' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
saulmm committed Oct 15, 2014
2 parents cb2b9a8 + 8ae5ed3 commit 8872619
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 15 deletions.
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:20.0.0'
}
7 changes: 4 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:label=""
android:theme="@style/AppTheme" >
<activity
android:name=".MyActivity"
android:label="@string/app_name" >
android:label="" >

<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

</activity>
</application>

Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/com/saulmm/material/MyActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.app.Activity;
import android.graphics.Outline;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Toast;

Expand Down
42 changes: 32 additions & 10 deletions app/src/main/res/layout/activity_my.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,44 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"

tools:context=".MyActivity"
>

<TextView
android:text="@string/hello_world"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<FrameLayout
android:id="@+id/holder_view"
android:layout_width="match_parent"
android:layout_height="72dp"
android:background="?android:colorPrimary">

<TextView
android:id="@+id/holder_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="First activity"
android:textSize="30sp"
android:textColor="?android:colorForeground"
android:layout_marginLeft="72dp"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:layout_gravity="bottom"
android:fontFamily="sans-serif-light"
/>

<include
</FrameLayout>

<ImageButton
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fab_button"
layout="@layout/view_fab_button"
/>
android:layout_width="@dimen/fab_size"
android:layout_height="@dimen/fab_size"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:background="@drawable/ripple_round"
android:stateListAnimator="@anim/fab_anim"
android:src="@drawable/ic_action_add"
android:elevation="5dp"
android:layout_below="@+id/holder_view"
android:layout_marginTop="-26dp"
android:layout_alignParentEnd="true" />

</RelativeLayout>
6 changes: 6 additions & 0 deletions app/src/main/res/menu/global.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/action_settings"
android:title="@string/action_settings"
android:orderInCategory="100"
android:showAsAction="never" />
</menu>
2 changes: 1 addition & 1 deletion app/src/main/res/values-v21/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<item name="android:colorPrimary">@color/theme_default_primary</item>
<item name="android:colorPrimaryDark">@color/theme_default_primary_dark</item>
<item name="android:statusBarColor">@color/theme_default_primary_dark</item>
<item name="android:statusBarColor">@color/theme_default_primary</item>
<item name="android:colorAccent">@color/accent</item>

</style>
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
Expand All @@ -7,4 +9,6 @@
<dimen name="fab_size">56dp</dimen>
<dimen name="button_elevation">2dp</dimen>
<dimen name="button_press_elevation">4dp</dimen>
<dimen name="navigation_drawer_width">240dp</dimen>

</resources>
3 changes: 2 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<resources>

<string name="app_name">My Application</string>
<string name="hello_world">Hello world!</string>
<string name="action_settings">Settings</string>
<string name="title_activity_my_activity2">MyActivity2</string>
<string name="action_example">Example action</string>

</resources>

0 comments on commit 8872619

Please sign in to comment.