Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New styles (Material design) #516

Merged
merged 4 commits into from Mar 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions AndroidManifest.xml
@@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.digitalcampus.mobile.learning"
android:versionCode="56"
android:versionName="5.5.0">
android:versionName="@string/version_name">

<uses-sdk
android:minSdkVersion="14"
Expand Down Expand Up @@ -42,7 +42,7 @@
<activity
android:name="org.digitalcampus.oppia.activity.OppiaMobileActivity"
android:label="@string/app_name"
android:theme="@style/Oppia.Theme.Dark">
android:theme="@style/Oppia.ToolbarTheme.Dark">
</activity>
<activity
android:name="org.digitalcampus.oppia.activity.CourseIndexActivity"
Expand All @@ -51,7 +51,8 @@
</activity>
<activity
android:name="org.digitalcampus.oppia.activity.CourseActivity"
android:label="@string/title_activity_course"
android:label="@string/title_activity_course"
android:theme="@style/Oppia.ToolbarTheme"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="org.digitalcampus.oppia.activity.DownloadActivity"
Expand All @@ -66,9 +67,11 @@
android:label="@string/title_prefs"/>
<activity
android:name="org.digitalcampus.oppia.activity.AboutActivity"
android:theme="@style/Oppia.ToolbarTheme"
android:label="@string/title_about" />
<activity
android:name="org.digitalcampus.oppia.activity.WelcomeActivity"
android:theme="@style/Oppia.ToolbarTheme"
android:label="@string/title_welcome" />
<activity
android:name="org.digitalcampus.oppia.activity.MonitorActivity"
Expand All @@ -82,6 +85,7 @@
android:label="@string/title_download_media" />
<activity
android:name="org.digitalcampus.oppia.activity.ScorecardActivity"
android:theme="@style/Oppia.ToolbarTheme"
android:label="@string/title_scorecard" />
<activity
android:name="org.digitalcampus.oppia.activity.SearchActivity"
Expand Down
Binary file modified res/drawable-hdpi/quiz_cross.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-hdpi/quiz_tick.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-xhdpi/drawer_header.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-xhdpi/ic_scorecard.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 26 additions & 7 deletions res/layout/activity_about.xml
@@ -1,14 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/coordinator"
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.v4.view.ViewPager
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/activity_about_pager"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
android:layout_height="fill_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" >
</android.support.v4.view.ViewPager>

</merge>
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

<include android:id="@+id/toolbar" layout="@layout/toolbar" />

<android.support.design.widget.TabLayout
android:id="@+id/tabs_toolbar"
android:layout_width="match_parent"
android:background="@color/highlight_label"
android:layout_height="wrap_content"
style="@style/Oppia.ToolbarTheme.AppTabLayout"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/>
</android.support.design.widget.AppBarLayout>

</android.support.design.widget.CoordinatorLayout>
46 changes: 32 additions & 14 deletions res/layout/activity_course.xml
@@ -1,15 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">

<android.support.v4.view.ViewPager
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/activity_widget_pager"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</android.support.v4.view.ViewPager>

</merge>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/coordinator"
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.v4.view.ViewPager
android:id="@+id/activity_widget_pager"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" >
</android.support.v4.view.ViewPager>

<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

<include android:id="@+id/toolbar" layout="@layout/toolbar" />

<android.support.design.widget.TabLayout
android:id="@+id/tabs_toolbar"
android:layout_width="match_parent"
android:background="@color/highlight_label"
android:layout_height="wrap_content"
style="@style/Oppia.ToolbarTheme.AppTabLayout"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/>
</android.support.design.widget.AppBarLayout>

</android.support.design.widget.CoordinatorLayout>
1 change: 1 addition & 0 deletions res/layout/activity_course_index.xml
Expand Up @@ -34,6 +34,7 @@
android:dividerHeight="1dp"
android:listSelector="@drawable/background_change_pressed"
android:cacheColorHint="#00000000"
android:foreground="?android:windowContentOverlay"
/>

</merge>
210 changes: 119 additions & 91 deletions res/layout/activity_main.xml
@@ -1,114 +1,142 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<org.digitalcampus.oppia.application.ScheduleReminders
android:id="@+id/schedule_reminders"
android:background="@drawable/message_background"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:visibility="gone" />
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/drawer">

<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
android:id="@+id/loading_courses"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dip"
android:gravity="center"
android:text="@string/loading_courses"
android:textSize="18sp"
android:textColor="@color/text_light"/>
</LinearLayout>

<LinearLayout
android:layout_height="fill_parent"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:paddingTop="@dimen/tool_bar_top_padding"
android:layout_marginTop="?attr/actionBarSize">

<ListView
android:id="@+id/course_list"
<org.digitalcampus.oppia.application.ScheduleReminders
android:id="@+id/schedule_reminders"
android:background="@drawable/message_background"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:listSelector="@drawable/background_change_pressed"
android:divider="@color/list_divider"
android:dividerHeight="1dp"
android:cacheColorHint="#00000000"
android:scrollingCache="false" />

<LinearLayout
android:id="@+id/no_courses"
android:visibility="gone" />

<FrameLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone" >
android:layout_height="fill_parent">

<TextView
android:id="@+id/manage_courses_text"
android:layout_width="wrap_content"
<LinearLayout
android:id="@+id/loading_courses"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="2dip"
android:gravity="center"
android:text="@string/no_courses"
android:textSize="18sp"
android:textColor="@color/text_light"/>
android:orientation="vertical">

<Button
android:id="@+id/manage_courses_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:gravity="center"
android:text="@string/title_download_activity"/>
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dip"
android:gravity="center"
android:text="@string/loading_courses"
android:textSize="18sp"
android:textColor="@color/text_light"/>
</LinearLayout>

</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
android:id="@+id/home_messages"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/message_background"
android:orientation="horizontal"
android:padding="5dp"
android:weightSum="1.0"
android:visibility="gone" >

<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.6" >
<ListView
android:id="@+id/course_list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:listSelector="@drawable/background_change_pressed"
android:divider="@color/list_divider"
android:dividerHeight="1dp"
android:cacheColorHint="#00000000"
android:scrollingCache="false" />

<LinearLayout
android:id="@+id/no_courses"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone" >

<TextView
android:id="@+id/manage_courses_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dip"
android:gravity="center"
android:text="@string/no_courses"
android:textSize="18sp"
android:textColor="@color/text_light"/>

<TextView
android:id="@+id/home_message"
<Button
android:id="@+id/manage_courses_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:gravity="center"
android:text="@string/title_download_activity"/>
</LinearLayout>

</LinearLayout>

<LinearLayout
android:id="@+id/home_messages"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:textSize="14sp"
android:textColor="@color/text_dark"/>
</LinearLayout>

<Button
android:id="@+id/message_action_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".4"
android:gravity="center_vertical|center"
android:text="@string/scan_media_download_button"
android:textColor="@color/text_dark"/>
android:background="@drawable/message_background"
android:orientation="horizontal"
android:padding="5dp"
android:weightSum="1.0"
android:visibility="gone" >

<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.6" >

<TextView
android:id="@+id/home_message"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:textSize="14sp"
android:textColor="@color/text_dark"/>
</LinearLayout>

<Button
android:id="@+id/message_action_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".4"
android:gravity="center_vertical|center"
android:text="@string/scan_media_download_button"
android:textColor="@color/text_dark"/>
</LinearLayout>
</FrameLayout>

</LinearLayout>
<include android:id="@+id/toolbar" layout="@layout/toolbar" />

</FrameLayout>

</LinearLayout>
<android.support.design.widget.NavigationView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
android:id="@+id/navigation_view"
app:headerLayout="@layout/drawer_header"
app:theme="@style/Oppia.Theme"
app:menu="@menu/drawer_main" />

</android.support.v4.widget.DrawerLayout>