Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72c9f017 authored by Stephen Bird's avatar Stephen Bird
Browse files

Intro Screen: Initial design and mechanics

Change-Id: I0d96dc6608e565f06f8bfaa7fac1d6f211aa3c91
parent 4852ab0a
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -184,6 +184,13 @@
      </intent-filter>
    </activity>

    <activity
      android:name=".activities.WelcomeActivity"
      android:label="@string/app_name"
      android:launchMode="singleTop"
      android:configChanges="keyboardHidden|screenSize">
    </activity>

    <activity
      android:name=".activities.EditorActivity"
      android:label="@string/editor"
+38 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2012-2013 The CyanogenMod Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
    <item>
        <shape
            android:shape="rectangle">
            <solid android:color="@color/material_palette_blue_primary" />
        </shape>
    </item>

    <!-- this mess is what we have to do to get a bottom border only. -->
    <item android:top="1dp"
        android:left="-2dp"
        android:right="-2dp"
        android:bottom="-3px">
            <shape
                android:shape="rectangle">
                <stroke android:width="1dp" android:color="@color/console_fg" />
                <solid android:color="@null" />
            </shape>
    </item>

</layer-list>
 No newline at end of file
+26 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<!--
     Copyright (C) 2012-2013 The CyanogenMod Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<shape xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/listview_background_shape">
    <stroke android:width="2dp" android:color="#ff207d94" />
    <padding android:left="2dp"
        android:top="2dp"
        android:right="2dp"
        android:bottom="2dp" />
    <corners android:radius="5dp" />
    <solid android:color="#ffffffff" />
</shape>
 No newline at end of file

res/layout/welcome.xml

0 → 100644
+156 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 The CyanogenMod Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
 -->

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

    <android.support.v4.view.ViewPager
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/intro_pager"
        android:background="@drawable/bg_material_statusbar">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:paddingTop="16dp"
            android:paddingLeft="16dp"
            android:paddingRight="16dp"
            android:id="@+id/itemOne">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/welcome_title"
                android:textSize="28sp"
                android:id="@+id/titleMessageOne"
                android:textColor="@android:color/white"/>

            <View
                android:id="@+id/generic_square"
                android:layout_width="fill_parent"
                android:layout_height="match_parent"
                android:layout_above="@+id/bottomMessageOne"
                android:layout_below="@+id/titleMessageOne"
                android:layout_marginTop="16dp"
                android:layout_marginBottom="16dp"
                android:background="@drawable/rectangle"/>

            <TextView
                android:id="@+id/bottomMessageOne"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/first_message"
                android:layout_alignParentBottom="true"
                android:paddingBottom="16dp"
                android:layout_marginBottom="@dimen/default_row_height"
                android:textSize="16sp"
                android:textColor="@android:color/white"/>

        </RelativeLayout>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:paddingTop="16dp"
            android:paddingLeft="16dp"
            android:id="@+id/itemTwo">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/second_title"
                android:textSize="28sp"
                android:textColor="@android:color/white"/>

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/second_message"
                android:layout_alignParentBottom="true"
                android:paddingBottom="16dp"
                android:layout_marginBottom="@dimen/default_row_height"
                android:textSize="16sp"
                android:textColor="@android:color/white"/>

        </RelativeLayout>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:paddingTop="16dp"
            android:paddingLeft="16dp"
            android:id="@+id/itemThree">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/second_title"
                android:textSize="28sp"
                android:textColor="@android:color/white"/>

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/second_message"
                android:layout_alignParentBottom="true"
                android:paddingBottom="16dp"
                android:layout_marginBottom="@dimen/default_row_height"
                android:textSize="16sp"
                android:textColor="@android:color/white"/>

        </RelativeLayout>

    </android.support.v4.view.ViewPager>

    <RelativeLayout
        android:id="@+id/footer"
        android:layout_height="@dimen/default_row_height"
        android:layout_width="fill_parent"
        android:layout_alignParentBottom="true"
        android:layout_alignParentStart="true"
        android:background="@drawable/bottom_bar_walkthrough">

        <Button
            android:id="@+id/skipButton"
            style="?android:attr/buttonBarButtonStyle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/skip_text"
            android:layout_alignParentLeft="true"
            android:textColor="@android:color/white"/>


        <com.cyanogenmod.filemanager.views.CirclePageIndicator
            android:id="@+id/pagination"
            android:layout_height="@dimen/half_row_height"
            android:layout_width="fill_parent"
            android:layout_alignParentBottom="true"
            android:layout_alignParentStart="true" />

        <Button
            android:id="@+id/nextButton"
            style="?android:attr/buttonBarButtonStyle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/next_text"
            android:layout_alignParentRight="true"
            android:textColor="@android:color/white"/>

    </RelativeLayout>

</RelativeLayout>
+41 −0
Original line number Diff line number Diff line
@@ -46,4 +46,45 @@
    <declare-styleable name="ScrimInsetsView">
        <attr name="scrimInsetForeground" format="reference|color" />
    </declare-styleable>

    <declare-styleable name="ViewPagerIndicator">
        <!-- Style of the circle indicator. -->
        <attr name="vpiCirclePageIndicatorStyle" format="reference"/>
        <!-- Style of the icon indicator's views. -->
        <attr name="vpiIconPageIndicatorStyle" format="reference"/>
        <!-- Style of the line indicator. -->
        <attr name="vpiLinePageIndicatorStyle" format="reference"/>
        <!-- Style of the title indicator. -->
        <attr name="vpiTitlePageIndicatorStyle" format="reference"/>
        <!-- Style of the tab indicator's tabs. -->
        <attr name="vpiTabPageIndicatorStyle" format="reference"/>
        <!-- Style of the underline indicator. -->
        <attr name="vpiUnderlinePageIndicatorStyle" format="reference"/>
    </declare-styleable>

    <attr name="centered" format="boolean" />
    <attr name="selectedColor" format="color" />
    <attr name="strokeWidth" format="dimension" />
    <attr name="unselectedColor" format="color" />

    <declare-styleable name="CirclePageIndicator">
        <!-- Whether or not the indicators should be centered. -->
        <attr name="centered" />
        <!-- Color of the filled circle that represents the current page. -->
        <attr name="fillColor" format="color" />
        <!-- Color of the filled circles that represents pages. -->
        <attr name="pageColor" format="color" />
        <!-- Orientation of the indicator. -->
        <attr name="android:orientation"/>
        <!-- Radius of the circles. This is also the spacing between circles. -->
        <attr name="radius" format="dimension" />
        <!-- Whether or not the selected indicator snaps to the circles. -->
        <attr name="snap" format="boolean" />
        <!-- Color of the open circles. -->
        <attr name="strokeColor" format="color" />
        <!-- Width of the stroke used to draw the circles. -->
        <attr name="strokeWidth" />
        <!-- View background -->
        <attr name="android:background"/>
    </declare-styleable>
</resources>
Loading