Skip to content

Commit

Permalink
Added activity_last.xml + activity_main.xml + activity_splash.xml lay…
Browse files Browse the repository at this point in the history
…outs both for phone and tablet
  • Loading branch information
opticod committed Aug 8, 2016
1 parent 0e96756 commit a33af75
Show file tree
Hide file tree
Showing 5 changed files with 337 additions and 0 deletions.
@@ -0,0 +1,92 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.LastActivity">

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.v7.widget.Toolbar
android:id="@+id/toolbar_main"
android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_height"
android:background="@color/colorPrimary"
android:minHeight="?attr/actionBarSize"
app:theme="@style/ToolBarStyle_heading" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/toolbar_main"
android:layout_marginEnd="@dimen/medium_margin"
android:layout_marginLeft="@dimen/medium_margin"
android:layout_marginRight="@dimen/medium_margin"
android:layout_marginStart="@dimen/medium_margin"
android:layout_marginTop="@dimen/negative_margin_tablet"
android:orientation="vertical">

<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/cardHeightLastActivity"
android:layout_marginLeft="@dimen/extra_margin"
android:layout_marginRight="@dimen/extra_margin"
android:layout_marginTop="@dimen/paddingTop">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:gravity="center"
android:paddingBottom="@dimen/paddingTop"
android:paddingLeft="@dimen/paddingTop"
android:paddingRight="@dimen/paddingTop"
android:paddingTop="@dimen/paddingTop"
android:text="@string/completed_message"
android:textAppearance="?android:textAppearanceMedium" />

<Button
android:id="@+id/exit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:background="@android:color/transparent"
android:paddingBottom="@dimen/paddingTop"
android:paddingLeft="@dimen/paddingTop"
android:paddingRight="@dimen/paddingTop"
android:paddingTop="@dimen/paddingTop"
android:text="@string/exit"
android:textAppearance="?android:textAppearanceMedium"
android:textColor="@color/colorAccent" />

<Button
android:id="@+id/restart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_toLeftOf="@+id/exit"
android:layout_toStartOf="@+id/exit"
android:background="@android:color/transparent"
android:paddingBottom="@dimen/paddingTop"
android:paddingLeft="@dimen/paddingTop"
android:paddingRight="@dimen/paddingTop"
android:paddingTop="@dimen/paddingTop"
android:text="@string/restart"
android:textAppearance="?android:textAppearanceMedium"
android:textColor="@color/black_secondary_text" />
</RelativeLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
</RelativeLayout>
</merge>
@@ -0,0 +1,82 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.SplashActivity">

<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:contentDescription="@string/background_image"
android:scaleType="centerCrop"
android:src="@drawable/first_run_bg" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:orientation="vertical">

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:contentDescription="@string/buildmlearn_logo"
android:scaleType="centerCrop"
android:src="@drawable/logo_70" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/splash_text_margin"
android:fontFamily="sans-serif-light"
android:gravity="center_horizontal"
android:text="@string/main_title"
android:textColor="@color/white_secondary_text"
android:textSize="@dimen/headline_leading" />

<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-light"
android:gravity="center_horizontal"
android:text="@string/main_subtitle"
android:textColor="@color/white_secondary_text"
android:textSize="@dimen/title" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-light"
android:gravity="center_horizontal"
android:text="@string/by"
android:textColor="@color/white_secondary_text"
android:textSize="@dimen/title" />

<TextView
android:id="@+id/author_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-light"
android:gravity="center_horizontal"
android:text="@string/anupam"
android:textColor="@color/white_secondary_text"
android:textSize="@dimen/title" />

<Button
android:id="@+id/enter"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/splash_button_margin_top_tablet"
android:background="@android:color/transparent"
android:drawableTop="@drawable/ic_input_white_48dp"
android:text="@string/enter"
android:textColor="@color/white_secondary_text" />

</LinearLayout>

</RelativeLayout>
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/cardHeightLastActivity"
android:layout_margin="@dimen/paddingTop">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:gravity="center"
android:paddingBottom="@dimen/paddingTop"
android:paddingLeft="@dimen/paddingTop"
android:paddingRight="@dimen/paddingTop"
android:paddingTop="@dimen/paddingTop"
android:text="@string/completed_message"
android:textAppearance="?android:textAppearanceMedium" />

<Button
android:id="@+id/exit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:background="@android:color/transparent"
android:paddingBottom="@dimen/paddingTop"
android:paddingLeft="@dimen/paddingTop"
android:paddingRight="@dimen/paddingTop"
android:paddingTop="@dimen/paddingTop"
android:text="@string/exit"
android:textAppearance="?android:textAppearanceMedium"
android:textColor="@color/colorAccent" />

<Button
android:id="@+id/restart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_toLeftOf="@+id/exit"
android:layout_toStartOf="@+id/exit"
android:background="@android:color/transparent"
android:paddingBottom="@dimen/paddingTop"
android:paddingLeft="@dimen/paddingTop"
android:paddingRight="@dimen/paddingTop"
android:paddingTop="@dimen/paddingTop"
android:text="@string/restart"
android:textAppearance="?android:textAppearanceMedium"
android:textColor="@color/black_secondary_text" />
</RelativeLayout>
</android.support.v7.widget.CardView>
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">

<include
layout="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />

<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main" />

</android.support.v4.widget.DrawerLayout>
@@ -0,0 +1,82 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.SplashActivity">

<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:contentDescription="@string/background_image"
android:scaleType="centerCrop"
android:src="@drawable/first_run_bg" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:orientation="vertical">

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:contentDescription="@string/buildmlearn_logo"
android:scaleType="centerCrop"
android:src="@drawable/logo_70" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/splash_text_margin"
android:fontFamily="sans-serif-light"
android:gravity="center_horizontal"
android:text="@string/main_title"
android:textColor="@color/white_secondary_text"
android:textSize="@dimen/headline_leading" />

<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-light"
android:gravity="center_horizontal"
android:text="@string/main_subtitle"
android:textColor="@color/white_secondary_text"
android:textSize="@dimen/title" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-light"
android:gravity="center_horizontal"
android:text="@string/by"
android:textColor="@color/white_secondary_text"
android:textSize="@dimen/title" />

<TextView
android:id="@+id/author_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-light"
android:gravity="center_horizontal"
android:text="@string/anupam"
android:textColor="@color/white_secondary_text"
android:textSize="@dimen/title" />

<Button
android:id="@+id/enter"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/splash_button_margin_top"
android:background="@android:color/transparent"
android:drawableTop="@drawable/ic_input_white_48dp"
android:text="@string/enter"
android:textColor="@color/white_secondary_text" />

</LinearLayout>

</RelativeLayout>

0 comments on commit a33af75

Please sign in to comment.