Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #771 from edx/bguertin/MA-2378
Browse files Browse the repository at this point in the history
New Logistration
  • Loading branch information
Christopher Lee authored Jul 27, 2016
2 parents 690d1da + d12e467 commit 6df8dc9
Show file tree
Hide file tree
Showing 33 changed files with 578 additions and 184 deletions.
12 changes: 12 additions & 0 deletions VideoLocker/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" />

<activity
android:name="org.edx.mobile.view.DiscoveryLaunchActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" />

<activity
android:name="org.edx.mobile.view.LoginActivity"
android:label="@string/app_name"
Expand Down Expand Up @@ -161,6 +167,12 @@
android:screenOrientation="portrait">
</activity>

<activity
android:name=".view.WebViewExploreSubjectsActivity"
android:label="@string/launch_explore_subjects"
android:screenOrientation="portrait">
</activity>

<activity
android:name=".view.NativeFindCoursesActivity"
android:label="@string/find_courses_title"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/white">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<corners android:radius="@dimen/edx_box_radius" />
<solid android:color="@color/transparent_white_26" />
</shape>
</item>
</ripple>
29 changes: 17 additions & 12 deletions VideoLocker/res/drawable/edx_creation_button.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false">
<shape android:shape="rectangle">
<solid android:color="@color/edx_brand_primary_x_light" />
<corners android:radius="@dimen/edx_box_radius" />
</shape>
</item>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/edx_brand_primary_base" />
<corners android:radius="@dimen/edx_box_radius" />
</shape>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false">
<shape android:shape="rectangle">
<solid android:color="@color/edx_brand_primary_x_light" />
<corners android:radius="@dimen/edx_box_radius" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="@color/edx_brand_primary_base" />
<corners android:radius="@dimen/edx_box_radius" />
</shape>
</item>
</selector>
</item>
</selector>
<item android:drawable="@drawable/light_selectable_box_overlay" />
</layer-list>
15 changes: 15 additions & 0 deletions VideoLocker/res/drawable/light_selectable_rounded_box_overlay.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:radius="@dimen/edx_box_radius" />
<solid android:color="@color/transparent_white_10" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<corners android:radius="@dimen/edx_box_radius" />
<solid android:color="@android:color/transparent" />
</shape>
</item>
</selector>
57 changes: 57 additions & 0 deletions VideoLocker/res/layout/activity_discovery_launch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/launch_background"
android:gravity="center_horizontal"
android:orientation="vertical"
android:splitMotionEvents="false">

<ImageView
android:id="@+id/edx_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="75dp"
android:layout_marginBottom="75dp"
android:contentDescription="@string/app_name"
android:src="@drawable/edx_logo" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:orientation="vertical">

<Button
android:id="@+id/explore_subjects"
style="@style/edX.Widget.BrandPillButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/launch_explore_subjects" />

<Button
android:id="@+id/discover_courses"
style="@style/edX.Widget.BrandPillButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:text="@string/launch_discover_courses" />

</LinearLayout>

<android.support.v4.widget.Space
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />

<fragment
android:tag="org.edx.mobile.view.LogInSignUpFragment"
android:name="org.edx.mobile.view.LogInSignUpFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

</LinearLayout>
</layout>
47 changes: 30 additions & 17 deletions VideoLocker/res/layout/activity_find_course_info.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/grey_act_background"
android:orientation="vertical">

<View
android:id="@+id/offline_bar"
style="@style/offline_bar"
android:visibility="gone"
android:layout_alignParentTop="true"/>

<org.edx.mobile.view.custom.EdxWebView
android:id="@+id/webview"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/grey_act_background"
android:layout_below="@id/offline_bar"/>
android:orientation="vertical">

<View
android:id="@+id/offline_bar"
style="@style/offline_bar"
android:layout_alignParentTop="true"
android:visibility="gone" />

<org.edx.mobile.view.custom.EdxWebView
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/offline_bar"
android:background="@color/grey_act_background" />

<include layout="@layout/loading_indicator" />
<include layout="@layout/loading_indicator" />

<TextView
android:id="@+id/offline_mode_message"
style="@style/offline_mode_message"/>
</RelativeLayout>
<TextView
android:id="@+id/offline_mode_message"
style="@style/offline_mode_message" />
</RelativeLayout>

<fragment
android:name="org.edx.mobile.view.LogInSignUpFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:tag="org.edx.mobile.view.LogInSignUpFragment" />
</LinearLayout>
52 changes: 32 additions & 20 deletions VideoLocker/res/layout/activity_find_courses.xml
Original file line number Diff line number Diff line change
@@ -1,36 +1,48 @@
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/grey_act_background"
android:splitMotionEvents="false" >
android:splitMotionEvents="false">

<RelativeLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/grey_act_background">
android:orientation="vertical">

<View
android:id="@+id/offline_bar"
style="@style/offline_bar"
android:visibility="gone"
android:layout_alignParentTop="true"/>

<org.edx.mobile.view.custom.EdxWebView
android:id="@+id/webview"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/grey_act_background"
android:layout_below="@id/offline_bar"/>
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/grey_act_background">

<View
android:id="@+id/offline_bar"
style="@style/offline_bar"
android:layout_alignParentTop="true"
android:visibility="gone" />

<org.edx.mobile.view.custom.EdxWebView
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/offline_bar"
android:background="@color/grey_act_background" />

<include layout="@layout/loading_indicator" />
<include layout="@layout/loading_indicator" />

<TextView
android:id="@+id/offline_mode_message"
style="@style/offline_mode_message"/>
<TextView
android:id="@+id/offline_mode_message"
style="@style/offline_mode_message" />

</RelativeLayout>
</RelativeLayout>

<fragment
android:name="org.edx.mobile.view.LogInSignUpFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:tag="org.edx.mobile.view.LogInSignUpFragment" />
</LinearLayout>

<include layout="@layout/navigation_drawer_container" />

Expand Down
6 changes: 6 additions & 0 deletions VideoLocker/res/layout/activity_single_fragment_base.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@

</RelativeLayout>

<fragment
android:name="org.edx.mobile.view.LogInSignUpFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:tag="org.edx.mobile.view.LogInSignUpFragment" />

</LinearLayout>

<TextView
Expand Down
38 changes: 38 additions & 0 deletions VideoLocker/res/layout/fragment_auth_panel.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">

<LinearLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/transparent_black_80"
android:orientation="horizontal">

<Button
android:id="@+id/sign_up"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/light_selectable_box_overlay"
android:padding="@dimen/edx_margin"
android:text="@string/launch_register"
android:textColor="@color/white"
android:textSize="@dimen/edx_base" />

<View
android:layout_width="@dimen/edx_hairline"
android:layout_height="match_parent"
android:background="@color/edx_grayscale_neutral_base" />

<Button
android:id="@+id/log_in"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/light_selectable_box_overlay"
android:padding="@dimen/edx_margin"
android:text="@string/login"
android:textColor="@color/white"
android:textSize="@dimen/edx_base" />
</LinearLayout>
</layout>
1 change: 1 addition & 0 deletions VideoLocker/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<color name="black">#000000</color>
<color name="transparent_black">#90000000</color>
<color name="transparent_black_80">#CC000000</color>
<color name="transparent_black_90">#e5000000</color>
<color name="transparent_black_50">#80000000</color>
<color name="transparent_black_10">#19000000</color>
<color name="transparent_white_90">#E6FFFFFF</color>
Expand Down
10 changes: 8 additions & 2 deletions VideoLocker/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
<!-- Error message shown when dashboard cannot be shown from course detail view -->
<string name="cannot_show_dashboard">Unable to show dashboard.</string>



<!-- Course Sharing -->

<!-- Description of button that will open the share course menu -->
Expand Down Expand Up @@ -477,6 +475,14 @@
<!-- In Sign up screen -->
<string name="or_sign_up_with_email">or sign up with email</string>

<!-- New Logistration Launch screen text -->
<!-- Button leading user to create account screen -->
<string name="launch_register">Register</string>
<!-- Button leading user to Find Courses screen from the launch screen -->
<string name="launch_discover_courses">Discover Courses</string>
<!-- Button leading user to Find Courses screen from the launch screen -->
<string name="launch_explore_subjects">Explore Subjects</string>

<!-- Registration Screen -->
<!-- Create account agreement. Followed by list of agreement names like "End User License Agreement" -->
<string name="by_creating_account">By creating an {platform_name} account, you agree to the </string>
Expand Down
9 changes: 9 additions & 0 deletions VideoLocker/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,15 @@
<item name="android:textAllCaps">false</item>
</style>

<style name="edX.Widget.BrandPillButton" parent="@style/edX.Widget.Button">
<item name="android:paddingLeft">@dimen/widget_margin</item>
<item name="android:paddingRight">@dimen/widget_margin</item>
<item name="android:minHeight">@dimen/edx_button_height</item>
<item name="android:background">@drawable/edx_creation_button</item>
<item name="android:textColor">@color/edx_grayscale_neutral_white</item>
<item name="android:textSize">@dimen/edx_base</item>
</style>

<style name="edX.Widget.DisableableButton" parent="edX.Widget.Button">
<item name="android:textColor">?attr/disableableButtonTextColor</item>
</style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,18 @@ public void onDrawerOpened(View drawerView) {
}
}

/**
* Call this function if you do not want to allow
* opening/showing the drawer(Navigation Fragment) on swiping left to right
*/
protected void blockDrawerFromOpening(){
DrawerLayout drawerLayout = (DrawerLayout)
findViewById(R.id.drawer_layout);
if (drawerLayout != null) {
drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
}
}

//Closing the Navigation Drawer
public void closeDrawer() {
DrawerLayout mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
Expand Down
Loading

0 comments on commit 6df8dc9

Please sign in to comment.