Add semester switch in grades (#94)
This commit is contained in:

committed by
Rafał Borcz

parent
cb6d39fe15
commit
4ef3334bf7
5
app/src/main/res/drawable/ic_filter_list_black_24dp.xml
Normal file
5
app/src/main/res/drawable/ic_filter_list_black_24dp.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M10,18h4v-2h-4v2zM3,6v2h18L21,6L3,6zM6,13h12v-2L6,11v2z"/>
|
||||
</vector>
|
@ -1,33 +1,62 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout 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/main_activity_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="io.github.wulkanowy.ui.main.MainActivity">
|
||||
android:orientation="vertical"
|
||||
android:weightSum="1"
|
||||
tools:context="io.github.wulkanowy.ui.main.MainActivity"
|
||||
>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/main_activity_progress_bar"
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center">
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
>
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="wrap_content"
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
|
||||
/>
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
app:layout_behavior="android.support.design.widget.AppBarLayout$ScrollingViewBehavior"
|
||||
>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/main_activity_progress_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center">
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true" />
|
||||
</RelativeLayout>
|
||||
|
||||
<com.aurelhubert.ahbottomnavigation.AHBottomNavigationViewPager
|
||||
android:id="@+id/main_activity_view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true" />
|
||||
</RelativeLayout>
|
||||
android:layout_marginBottom="@dimen/bottom_navigation_height" />
|
||||
|
||||
<com.aurelhubert.ahbottomnavigation.AHBottomNavigationViewPager
|
||||
android:id="@+id/main_activity_view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/bottom_navigation_height" />
|
||||
<com.aurelhubert.ahbottomnavigation.AHBottomNavigation
|
||||
android:id="@+id/main_activity_nav"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom" />
|
||||
|
||||
<com.aurelhubert.ahbottomnavigation.AHBottomNavigation
|
||||
android:id="@+id/main_activity_nav"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom" />
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
</LinearLayout>
|
||||
|
13
app/src/main/res/menu/semester_switch.xml
Normal file
13
app/src/main/res/menu/semester_switch.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<menu 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"
|
||||
tools:context="io.github.wulkanowy.timetable.MainActivity"
|
||||
>
|
||||
<item
|
||||
android:id="@+id/action_filter"
|
||||
android:orderInCategory="100"
|
||||
android:title="@string/switch_semester"
|
||||
android:icon="@drawable/ic_filter_list_black_24dp"
|
||||
app:showAsAction="always"
|
||||
/>
|
||||
</menu>
|
@ -52,6 +52,10 @@
|
||||
<string name="dialog_date_text">Data</string>
|
||||
<string name="dialog_color_text">Kolor</string>
|
||||
|
||||
<string name="switch_semester">Zmień semestr</string>
|
||||
<string name="semester_text">Semestr %d</string>
|
||||
<string name="cancel">Anuluj</string>
|
||||
|
||||
<string name="timetable_dialog_lesson">Lekcja</string>
|
||||
<string name="timetable_dialog_room">Sala</string>
|
||||
<string name="timetable_dialog_group">Grupa</string>
|
||||
|
@ -52,6 +52,10 @@
|
||||
<string name="dialog_date_text">Date</string>
|
||||
<string name="dialog_color_text">Color</string>
|
||||
|
||||
<string name="switch_semester">Switch semester</string>
|
||||
<string name="semester_text">Semester %d</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
|
||||
<string name="timetable_dialog_lesson">Lesson</string>
|
||||
<string name="timetable_dialog_room">Room</string>
|
||||
<string name="timetable_dialog_group">Group</string>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<resources>
|
||||
|
||||
<style name="WulkanowyTheme" parent="Base.Theme.AppCompat.Light">
|
||||
<style name="WulkanowyTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorPrimary</item>
|
||||
|
Reference in New Issue
Block a user