Browse Source

старый пробный проект

Alec 4 years ago
commit
2cb4250a32
70 changed files with 3190 additions and 0 deletions
  1. 11 0
      .gitignore
  2. 113 0
      .idea/codeStyles/Project.xml
  3. 12 0
      .idea/gradle.xml
  4. 9 0
      .idea/misc.xml
  5. 12 0
      .idea/runConfigurations.xml
  6. 1 0
      app/.gitignore
  7. 32 0
      app/build.gradle
  8. 2 0
      app/src/main/AndroidManifest.xml
  9. 1 0
      base/.gitignore
  10. 33 0
      base/build.gradle
  11. 17 0
      base/src/main/AndroidManifest.xml
  12. 34 0
      base/src/main/res/drawable-v24/ic_launcher_foreground.xml
  13. 170 0
      base/src/main/res/drawable/ic_launcher_background.xml
  14. 5 0
      base/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
  15. 5 0
      base/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
  16. BIN
      base/src/main/res/mipmap-hdpi/ic_launcher.png
  17. BIN
      base/src/main/res/mipmap-hdpi/ic_launcher_round.png
  18. BIN
      base/src/main/res/mipmap-mdpi/ic_launcher.png
  19. BIN
      base/src/main/res/mipmap-mdpi/ic_launcher_round.png
  20. BIN
      base/src/main/res/mipmap-xhdpi/ic_launcher.png
  21. BIN
      base/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  22. BIN
      base/src/main/res/mipmap-xxhdpi/ic_launcher.png
  23. BIN
      base/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  24. BIN
      base/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  25. BIN
      base/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  26. 11 0
      base/src/main/res/values/colors.xml
  27. 4 0
      base/src/main/res/values/strings.xml
  28. 20 0
      base/src/main/res/values/styles.xml
  29. 27 0
      build.gradle
  30. 1 0
      feature/.gitignore
  31. 27 0
      feature/build.gradle
  32. 21 0
      feature/proguard-rules.pro
  33. 26 0
      feature/src/androidTest/java/ru/ktk45/www/feature/ExampleInstrumentedTest.java
  34. 28 0
      feature/src/main/AndroidManifest.xml
  35. 111 0
      feature/src/main/java/ru/ktk45/www/feature/Link.java
  36. 373 0
      feature/src/main/java/ru/ktk45/www/feature/LoginActivity.java
  37. 1297 0
      feature/src/main/java/ru/ktk45/www/feature/MainActivity.java
  38. 12 0
      feature/src/main/res/drawable-v21/ic_menu_camera.xml
  39. 9 0
      feature/src/main/res/drawable-v21/ic_menu_gallery.xml
  40. 9 0
      feature/src/main/res/drawable-v21/ic_menu_manage.xml
  41. 9 0
      feature/src/main/res/drawable-v21/ic_menu_send.xml
  42. 9 0
      feature/src/main/res/drawable-v21/ic_menu_share.xml
  43. 9 0
      feature/src/main/res/drawable-v21/ic_menu_slideshow.xml
  44. 12 0
      feature/src/main/res/drawable/schedulet_discipline.xml
  45. 12 0
      feature/src/main/res/drawable/shcedule_background.xml
  46. 9 0
      feature/src/main/res/drawable/side_nav_bar.xml
  47. BIN
      feature/src/main/res/font/play_bold.ttf
  48. BIN
      feature/src/main/res/font/play_regular.ttf
  49. 81 0
      feature/src/main/res/layout/activity_login.xml
  50. 26 0
      feature/src/main/res/layout/activity_main.xml
  51. 35 0
      feature/src/main/res/layout/app_bar_main.xml
  52. 61 0
      feature/src/main/res/layout/content_main.xml
  53. 68 0
      feature/src/main/res/layout/nav_header_main.xml
  54. 29 0
      feature/src/main/res/menu/activity_main_drawer.xml
  55. 9 0
      feature/src/main/res/menu/main.xml
  56. 5 0
      feature/src/main/res/values-v21/strings.xml
  57. 8 0
      feature/src/main/res/values-v21/styles.xml
  58. 13 0
      feature/src/main/res/values/colors.xml
  59. 8 0
      feature/src/main/res/values/dimens.xml
  60. 7 0
      feature/src/main/res/values/drawables.xml
  61. 36 0
      feature/src/main/res/values/strings.xml
  62. 17 0
      feature/src/test/java/ru/ktk45/www/feature/ExampleUnitTest.java
  63. 14 0
      gradle.properties
  64. BIN
      gradle/wrapper/gradle-wrapper.jar
  65. 5 0
      gradle/wrapper/gradle-wrapper.properties
  66. 172 0
      gradlew
  67. 84 0
      gradlew.bat
  68. 1 0
      instantapp/.gitignore
  69. 17 0
      instantapp/build.gradle
  70. 1 0
      settings.gradle

+ 11 - 0
.gitignore

@@ -0,0 +1,11 @@
+*.iml
+.gradle
+/local.properties
+/.idea/caches/build_file_checksums.ser
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+.DS_Store
+/build
+/captures
+.externalNativeBuild

+ 113 - 0
.idea/codeStyles/Project.xml

@@ -0,0 +1,113 @@
+<component name="ProjectCodeStyleConfiguration">
+  <code_scheme name="Project" version="173">
+    <codeStyleSettings language="XML">
+      <arrangement>
+        <rules>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>xmlns:android</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>^$</XML_NAMESPACE>
+                </AND>
+              </match>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>xmlns:.*</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>^$</XML_NAMESPACE>
+                </AND>
+              </match>
+              <order>BY_NAME</order>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>.*:id</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
+                </AND>
+              </match>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>.*:name</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
+                </AND>
+              </match>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>name</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>^$</XML_NAMESPACE>
+                </AND>
+              </match>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>style</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>^$</XML_NAMESPACE>
+                </AND>
+              </match>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>.*</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>^$</XML_NAMESPACE>
+                </AND>
+              </match>
+              <order>BY_NAME</order>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>.*</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
+                </AND>
+              </match>
+              <order>ANDROID_ATTRIBUTE_ORDER</order>
+            </rule>
+          </section>
+          <section>
+            <rule>
+              <match>
+                <AND>
+                  <NAME>.*</NAME>
+                  <XML_ATTRIBUTE />
+                  <XML_NAMESPACE>.*</XML_NAMESPACE>
+                </AND>
+              </match>
+              <order>BY_NAME</order>
+            </rule>
+          </section>
+        </rules>
+      </arrangement>
+    </codeStyleSettings>
+  </code_scheme>
+</component>

+ 12 - 0
.idea/gradle.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="GradleSettings">
+    <option name="linkedExternalProjectsSettings">
+      <GradleProjectSettings>
+        <option name="distributionType" value="DEFAULT_WRAPPED" />
+        <option name="externalProjectPath" value="$PROJECT_DIR$" />
+        <option name="resolveModulePerSourceSet" value="false" />
+      </GradleProjectSettings>
+    </option>
+  </component>
+</project>

+ 9 - 0
.idea/misc.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectRootManager">
+    <output url="file://$PROJECT_DIR$/build/classes" />
+  </component>
+  <component name="ProjectType">
+    <option name="id" value="Android" />
+  </component>
+</project>

+ 12 - 0
.idea/runConfigurations.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="RunConfigurationProducerService">
+    <option name="ignoredProducers">
+      <set>
+        <option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
+        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
+        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
+      </set>
+    </option>
+  </component>
+</project>

+ 1 - 0
app/.gitignore

@@ -0,0 +1 @@
+/build

+ 32 - 0
app/build.gradle

@@ -0,0 +1,32 @@
+apply plugin: 'com.android.application'
+
+android {
+    compileSdkVersion 28
+    defaultConfig {
+        applicationId "ru.ktk45.www.app"
+        minSdkVersion 19
+        targetSdkVersion 25
+        versionCode 1
+        versionName "1.0"
+
+
+    }
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+        }
+    }
+    buildToolsVersion '28.0.3'
+    productFlavors {
+    }
+    compileOptions {
+        sourceCompatibility JavaVersion.VERSION_1_8
+        targetCompatibility JavaVersion.VERSION_1_8
+    }
+}
+
+dependencies {
+    implementation project(':feature')
+    implementation project(':base')
+}

+ 2 - 0
app/src/main/AndroidManifest.xml

@@ -0,0 +1,2 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="ru.ktk45.www.app" />

+ 1 - 0
base/.gitignore

@@ -0,0 +1 @@
+/build

+ 33 - 0
base/build.gradle

@@ -0,0 +1,33 @@
+apply plugin: 'com.android.feature'
+
+android {
+    compileSdkVersion 28
+    baseFeature true
+    defaultConfig {
+        minSdkVersion 19
+        targetSdkVersion 25
+        versionCode 1
+        versionName "1.0"
+    }
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+        }
+    }
+    buildToolsVersion '28.0.3'
+    productFlavors {
+    }
+    compileOptions {
+        sourceCompatibility JavaVersion.VERSION_1_8
+        targetCompatibility JavaVersion.VERSION_1_8
+    }
+}
+
+dependencies {
+    api 'com.android.support:appcompat-v7:27.1.1'
+    api 'com.android.support:design:27.1.1'
+    api 'com.android.support.constraint:constraint-layout:1.1.3'
+    application project(':app')
+    feature project(':feature')
+}

+ 17 - 0
base/src/main/AndroidManifest.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="ru.ktk45.www">
+
+    <application
+        android:allowBackup="true"
+        android:icon="@mipmap/ic_launcher"
+        android:label="@string/app_name"
+        android:roundIcon="@mipmap/ic_launcher_round"
+        android:supportsRtl="true"
+        android:theme="@style/AppTheme">
+        <meta-data
+            android:name="aia-compat-api-min-version"
+            android:value="1" />
+    </application>
+
+</manifest>

+ 34 - 0
base/src/main/res/drawable-v24/ic_launcher_foreground.xml

@@ -0,0 +1,34 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:aapt="http://schemas.android.com/aapt"
+    android:width="108dp"
+    android:height="108dp"
+    android:viewportWidth="108"
+    android:viewportHeight="108">
+    <path
+        android:fillType="evenOdd"
+        android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
+        android:strokeWidth="1"
+        android:strokeColor="#00000000">
+        <aapt:attr name="android:fillColor">
+            <gradient
+                android:endX="78.5885"
+                android:endY="90.9159"
+                android:startX="48.7653"
+                android:startY="61.0927"
+                android:type="linear">
+                <item
+                    android:color="#44000000"
+                    android:offset="0.0" />
+                <item
+                    android:color="#00000000"
+                    android:offset="1.0" />
+            </gradient>
+        </aapt:attr>
+    </path>
+    <path
+        android:fillColor="#FFFFFF"
+        android:fillType="nonZero"
+        android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
+        android:strokeWidth="1"
+        android:strokeColor="#00000000" />
+</vector>

+ 170 - 0
base/src/main/res/drawable/ic_launcher_background.xml

@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="108dp"
+    android:height="108dp"
+    android:viewportWidth="108"
+    android:viewportHeight="108">
+    <path
+        android:fillColor="#008577"
+        android:pathData="M0,0h108v108h-108z" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M9,0L9,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,0L19,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M29,0L29,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M39,0L39,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M49,0L49,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M59,0L59,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M69,0L69,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M79,0L79,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M89,0L89,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M99,0L99,108"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,9L108,9"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,19L108,19"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,29L108,29"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,39L108,39"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,49L108,49"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,59L108,59"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,69L108,69"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,79L108,79"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,89L108,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M0,99L108,99"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,29L89,29"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,39L89,39"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,49L89,49"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,59L89,59"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,69L89,69"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M19,79L89,79"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M29,19L29,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M39,19L39,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M49,19L49,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M59,19L59,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M69,19L69,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+    <path
+        android:fillColor="#00000000"
+        android:pathData="M79,19L79,89"
+        android:strokeWidth="0.8"
+        android:strokeColor="#33FFFFFF" />
+</vector>

+ 5 - 0
base/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+    <background android:drawable="@drawable/ic_launcher_background" />
+    <foreground android:drawable="@drawable/ic_launcher_foreground" />
+</adaptive-icon>

+ 5 - 0
base/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+    <background android:drawable="@drawable/ic_launcher_background" />
+    <foreground android:drawable="@drawable/ic_launcher_foreground" />
+</adaptive-icon>

BIN
base/src/main/res/mipmap-hdpi/ic_launcher.png


BIN
base/src/main/res/mipmap-hdpi/ic_launcher_round.png


BIN
base/src/main/res/mipmap-mdpi/ic_launcher.png


BIN
base/src/main/res/mipmap-mdpi/ic_launcher_round.png


BIN
base/src/main/res/mipmap-xhdpi/ic_launcher.png


BIN
base/src/main/res/mipmap-xhdpi/ic_launcher_round.png


BIN
base/src/main/res/mipmap-xxhdpi/ic_launcher.png


BIN
base/src/main/res/mipmap-xxhdpi/ic_launcher_round.png


BIN
base/src/main/res/mipmap-xxxhdpi/ic_launcher.png


BIN
base/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png


+ 11 - 0
base/src/main/res/values/colors.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <color name="colorPrimary">#666699</color>
+    <color name="colorPrimaryDark">#222277</color>
+    <color name="colorAccent">#e91e63</color>
+    <color name="colorWhite">#ffffff</color>
+    <color name="colorBlack">#000000</color>
+    <color name="colorSecondary">#cc0000</color>
+    <color name="colorBackground">#e0e0e0</color>
+    <color name="colorGray">#9e9e9e</color>
+</resources>

+ 4 - 0
base/src/main/res/values/strings.xml

@@ -0,0 +1,4 @@
+<resources>
+    <string name="app_name">ГБПОУ «КТК»</string>
+    <string name="title_activity_main">ГБПОУ «КТК»</string>
+</resources>

+ 20 - 0
base/src/main/res/values/styles.xml

@@ -0,0 +1,20 @@
+<resources>
+
+    <!-- Base application theme. -->
+    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
+        <!-- Customize your theme here. -->
+        <item name="colorPrimary">@color/colorPrimary</item>
+        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
+        <item name="colorAccent">@color/colorAccent</item>
+    </style>
+
+    <style name="AppTheme.NoActionBar">
+        <item name="windowActionBar">false</item>
+        <item name="windowNoTitle">true</item>
+    </style>
+
+    <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
+
+    <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
+
+</resources>

+ 27 - 0
build.gradle

@@ -0,0 +1,27 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+buildscript {
+
+    repositories {
+        google()
+        jcenter()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:3.2.1'
+
+        // NOTE: Do not place your application dependencies here; they belong
+        // in the individual module build.gradle files
+    }
+}
+allprojects {
+    repositories {
+        google()
+        jcenter()
+    }
+}
+task clean(type: Delete) {
+    delete rootProject.buildDir
+}
+
+dependencies {
+    implementation project(':feature')
+}

+ 1 - 0
feature/.gitignore

@@ -0,0 +1 @@
+/build

+ 27 - 0
feature/build.gradle

@@ -0,0 +1,27 @@
+apply plugin: 'com.android.feature'
+
+android {
+    compileSdkVersion 28
+    defaultConfig {
+        minSdkVersion 19
+        targetSdkVersion 25
+        versionCode 1
+        versionName "1.0"
+        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+    }
+    buildToolsVersion '28.0.3'
+    productFlavors {
+    }
+    compileOptions {
+        sourceCompatibility JavaVersion.VERSION_1_8
+        targetCompatibility JavaVersion.VERSION_1_8
+    }
+}
+
+dependencies {
+    implementation fileTree(include: ['*.jar'], dir: 'libs')
+    implementation project(':base')
+    testImplementation 'junit:junit:4.12'
+    androidTestImplementation 'com.android.support.test:runner:1.0.2'
+    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+}

+ 21 - 0
feature/proguard-rules.pro

@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile

+ 26 - 0
feature/src/androidTest/java/ru/ktk45/www/feature/ExampleInstrumentedTest.java

@@ -0,0 +1,26 @@
+package ru.ktk45.www.feature;
+
+import android.content.Context;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+    @Test
+    public void useAppContext() {
+        // Context of the app under test.
+        Context appContext = InstrumentationRegistry.getTargetContext();
+
+        assertEquals("ru.ktk45.www.feature.test", appContext.getPackageName());
+    }
+}

+ 28 - 0
feature/src/main/AndroidManifest.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="ru.ktk45.www.feature"> <!-- To auto-complete the email text field in the login form with the user's emails -->
+    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
+    <uses-permission android:name="android.permission.READ_PROFILE" />
+    <uses-permission android:name="android.permission.READ_CONTACTS" />
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+
+    <application>
+        <activity
+            android:name=".LoginActivity"
+            android:label="@string/app_name">
+
+        </activity>
+        <activity
+            android:name=".MainActivity"
+            android:label="@string/title_activity_main"
+            android:theme="@style/AppTheme.NoActionBar">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>

+ 111 - 0
feature/src/main/java/ru/ktk45/www/feature/Link.java

@@ -0,0 +1,111 @@
+package ru.ktk45.www.feature;
+
+import android.os.AsyncTask;
+import android.util.Log;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.io.BufferedReader;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.util.HashMap;
+import java.util.Map;
+
+public class Link extends AsyncTask<String, Void, String> {
+    private static final String domain = "http://ktk-45.ru";
+
+    private Map<String, String> parameters = new HashMap<>();
+
+    private String GetParametersString() throws UnsupportedEncodingException {
+        StringBuilder result = new StringBuilder();
+
+
+        for (Map.Entry<String, String> entry : parameters.entrySet()) {
+            result.append(URLEncoder.encode(entry.getKey(), "UTF-8"));
+            result.append("=");
+            result.append(URLEncoder.encode(entry.getValue(), "UTF-8"));
+            result.append("&");
+        }
+
+        // Считали параметры, больше не нужны, очищаем для следущего запроса
+        parameters.clear();
+
+        String resultString = result.toString();
+        return resultString.length() > 0
+                ? resultString.substring(0, resultString.length() - 1)
+                : resultString;
+    }
+
+    public JSONObject POST(String url) throws JSONException {
+
+        String result = doInBackground(domain + url);
+
+        if (result.substring(0, 4).equals("Error")) {
+            return null;
+        }
+
+        JSONObject parser = new JSONObject(result);
+
+        return parser;
+    }
+
+    public void SetParameter(String key, String val) {
+        parameters.put(key, val);
+    }
+
+    @Override
+    protected String doInBackground(String... urls) {
+
+        try {
+            URL _url = new URL(urls[0]);
+
+            HttpURLConnection connection = (HttpURLConnection)_url.openConnection();
+            connection.setRequestMethod("POST");
+            connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
+            connection.setRequestProperty("Accept", "application/json, text/javascript, */*; q=0.01");
+            connection.setRequestProperty("X-Requested-With", "XMLHttpRequest");
+            connection.setRequestProperty("Accept-Encoding", "gzip, deflate");
+            connection.setDoOutput(true);
+            connection.setDoInput(true);
+            connection.setUseCaches(false);
+            connection.setConnectTimeout(20000);
+
+            String toWrite = GetParametersString();
+            DataOutputStream out = new DataOutputStream(connection.getOutputStream());
+            out.writeBytes(toWrite);
+            out.flush();
+            out.close();
+
+            connection.connect();
+
+            BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
+            String inputLine;
+            StringBuffer content = new StringBuffer();
+            while ((inputLine = in.readLine()) != null) {
+                content.append(inputLine);
+            }
+            in.close();
+
+            connection.disconnect();
+
+            return content.toString();
+
+        } catch (IOException e) {
+            return "Error: " + e.getMessage();
+        }
+    }
+    // onPostExecute displays the results of the AsyncTask.
+    @Override
+    protected void onPostExecute(String result) {
+        Log.i("INFO", result);
+    }
+}
+

+ 373 - 0
feature/src/main/java/ru/ktk45/www/feature/LoginActivity.java

@@ -0,0 +1,373 @@
+package ru.ktk45.www.feature;
+
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
+import android.annotation.TargetApi;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.os.StrictMode;
+import android.support.annotation.NonNull;
+import android.support.design.widget.Snackbar;
+import android.support.v7.app.AppCompatActivity;
+import android.app.LoaderManager.LoaderCallbacks;
+
+import android.content.CursorLoader;
+import android.content.Loader;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.AsyncTask;
+
+import android.os.Build;
+import android.os.Bundle;
+import android.provider.ContactsContract;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.inputmethod.EditorInfo;
+import android.widget.ArrayAdapter;
+import android.widget.AutoCompleteTextView;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import static android.Manifest.permission.READ_CONTACTS;
+
+/**
+ * A login screen that offers login via email/password.
+ */
+public class LoginActivity extends AppCompatActivity implements LoaderCallbacks<Cursor> {
+
+    /**
+     * Id to identity READ_CONTACTS permission request.
+     */
+    private static final int REQUEST_READ_CONTACTS = 0;
+
+    /**
+     * A dummy authentication store containing known user names and passwords.
+     * TODO: remove after connecting to a real authentication system.
+     */
+    private static final String[] DUMMY_CREDENTIALS = new String[]{
+            "foo@example.com:hello", "bar@example.com:world"
+    };
+    /**
+     * Keep track of the login task to ensure we can cancel it if requested.
+     */
+    private UserLoginTask mAuthTask = null;
+
+    // UI references.
+    private AutoCompleteTextView mEmailView;
+    private EditText mPasswordView;
+    private View mProgressView;
+    private View mLoginFormView;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_login);
+
+//        StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
+//        StrictMode.setThreadPolicy(policy);
+
+        // Set up the login form.
+        mEmailView = (AutoCompleteTextView) findViewById(R.id.email);
+        populateAutoComplete();
+
+        mPasswordView = (EditText) findViewById(R.id.password);
+        mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+            @Override
+            public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) {
+                if (id == EditorInfo.IME_ACTION_DONE || id == EditorInfo.IME_NULL) {
+                    attemptLogin();
+                    return true;
+                }
+                return false;
+            }
+        });
+
+        Button mEmailSignInButton = (Button) findViewById(R.id.email_sign_in_button);
+        mEmailSignInButton.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                attemptLogin();
+            }
+        });
+
+        mLoginFormView = findViewById(R.id.login_form);
+        mProgressView = findViewById(R.id.login_progress);
+
+        Intent intent = new Intent(LoginActivity.this, MainActivity.class);
+        startActivity(intent);
+    }
+
+    private void populateAutoComplete() {
+        if (!mayRequestContacts()) {
+            return;
+        }
+
+        getLoaderManager().initLoader(0, null, this);
+    }
+
+    private boolean mayRequestContacts() {
+        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
+            return true;
+        }
+        if (checkSelfPermission(READ_CONTACTS) == PackageManager.PERMISSION_GRANTED) {
+            return true;
+        }
+        if (shouldShowRequestPermissionRationale(READ_CONTACTS)) {
+            Snackbar.make(mEmailView, R.string.permission_rationale, Snackbar.LENGTH_INDEFINITE)
+                    .setAction(android.R.string.ok, new View.OnClickListener() {
+                        @Override
+                        @TargetApi(Build.VERSION_CODES.M)
+                        public void onClick(View v) {
+                            requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS);
+                        }
+                    });
+        } else {
+            requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS);
+        }
+        return false;
+    }
+
+    /**
+     * Callback received when a permissions request has been completed.
+     */
+    @Override
+    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
+                                           @NonNull int[] grantResults) {
+        if (requestCode == REQUEST_READ_CONTACTS) {
+            if (grantResults.length == 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
+                populateAutoComplete();
+            }
+        }
+    }
+
+
+    /**
+     * Attempts to sign in or register the account specified by the login form.
+     * If there are form errors (invalid email, missing fields, etc.), the
+     * errors are presented and no actual login attempt is made.
+     */
+    private void attemptLogin() {
+        if (mAuthTask != null) {
+            return;
+        }
+
+        // Reset errors.
+        mEmailView.setError(null);
+        mPasswordView.setError(null);
+
+        // Store values at the time of the login attempt.
+        String email = mEmailView.getText().toString();
+        String password = mPasswordView.getText().toString();
+
+        boolean cancel = false;
+        View focusView = null;
+
+        // Check for a valid password, if the user entered one.
+        if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {
+            mPasswordView.setError(getString(R.string.error_invalid_password));
+            focusView = mPasswordView;
+            cancel = true;
+        }
+
+        // Check for a valid email address.
+        if (TextUtils.isEmpty(email)) {
+            mEmailView.setError(getString(R.string.error_field_required));
+            focusView = mEmailView;
+            cancel = true;
+        } else if (!isEmailValid(email)) {
+            mEmailView.setError(getString(R.string.error_invalid_login));
+            focusView = mEmailView;
+            cancel = true;
+        }
+
+        if (cancel) {
+            // There was an error; don't attempt login and focus the first
+            // form field with an error.
+            focusView.requestFocus();
+        } else {
+            // Show a progress spinner, and kick off a background task to
+            // perform the user login attempt.
+            showProgress(true);
+            mAuthTask = new UserLoginTask(email, password);
+            mAuthTask.execute((Void) null);
+        }
+    }
+
+    private boolean isEmailValid(String email) {
+        char[] test = email.toCharArray();
+
+        for (int i = 0; i < test.length; i++) {
+            if (test[i] < 48 || test[i] > 57) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    private boolean isPasswordValid(String password) {
+        //TODO: Replace this with your own logic
+        return password.length() > 4;
+    }
+
+    /**
+     * Shows the progress UI and hides the login form.
+     */
+    @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)
+    private void showProgress(final boolean show) {
+        // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow
+        // for very easy animations. If available, use these APIs to fade-in
+        // the progress spinner.
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
+            int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);
+
+            mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
+            mLoginFormView.animate().setDuration(shortAnimTime).alpha(
+                    show ? 0 : 1).setListener(new AnimatorListenerAdapter() {
+                @Override
+                public void onAnimationEnd(Animator animation) {
+                    mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
+                }
+            });
+
+            mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
+            mProgressView.animate().setDuration(shortAnimTime).alpha(
+                    show ? 1 : 0).setListener(new AnimatorListenerAdapter() {
+                @Override
+                public void onAnimationEnd(Animator animation) {
+                    mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
+                }
+            });
+        } else {
+            // The ViewPropertyAnimator APIs are not available, so simply show
+            // and hide the relevant UI components.
+            mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
+            mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
+        }
+    }
+
+    @Override
+    public Loader<Cursor> onCreateLoader(int i, Bundle bundle) {
+        return new CursorLoader(this,
+                // Retrieve data rows for the device user's 'profile' contact.
+                Uri.withAppendedPath(ContactsContract.Profile.CONTENT_URI,
+                        ContactsContract.Contacts.Data.CONTENT_DIRECTORY), ProfileQuery.PROJECTION,
+
+                // Select only email addresses.
+                ContactsContract.Contacts.Data.MIMETYPE +
+                        " = ?", new String[]{ContactsContract.CommonDataKinds.Email
+                .CONTENT_ITEM_TYPE},
+
+                // Show primary email addresses first. Note that there won't be
+                // a primary email address if the user hasn't specified one.
+                ContactsContract.Contacts.Data.IS_PRIMARY + " DESC");
+    }
+
+    @Override
+    public void onLoadFinished(Loader<Cursor> cursorLoader, Cursor cursor) {
+        List<String> emails = new ArrayList<>();
+        cursor.moveToFirst();
+        while (!cursor.isAfterLast()) {
+            emails.add(cursor.getString(ProfileQuery.ADDRESS));
+            cursor.moveToNext();
+        }
+
+        addEmailsToAutoComplete(emails);
+    }
+
+    @Override
+    public void onLoaderReset(Loader<Cursor> cursorLoader) {
+
+    }
+
+    private void addEmailsToAutoComplete(List<String> emailAddressCollection) {
+        //Create adapter to tell the AutoCompleteTextView what to show in its dropdown list.
+        ArrayAdapter<String> adapter =
+                new ArrayAdapter<>(LoginActivity.this,
+                        android.R.layout.simple_dropdown_item_1line, emailAddressCollection);
+
+        mEmailView.setAdapter(adapter);
+    }
+
+
+    private interface ProfileQuery {
+        String[] PROJECTION = {
+                ContactsContract.CommonDataKinds.Email.ADDRESS,
+                ContactsContract.CommonDataKinds.Email.IS_PRIMARY,
+        };
+
+        int ADDRESS = 0;
+        int IS_PRIMARY = 1;
+    }
+
+    /**
+     * Represents an asynchronous login/registration task used to authenticate
+     * the user.
+     */
+    public class UserLoginTask extends AsyncTask<Void, Void, Boolean> {
+
+        private final String mEmail;
+        private final String mPassword;
+
+        UserLoginTask(String email, String password) {
+            mEmail = email;
+            mPassword = password;
+        }
+
+        @Override
+        protected Boolean doInBackground(Void... params) {
+            // TODO: attempt authentication against a network service.
+
+            try {
+                Link h = new Link();
+                h.SetParameter("f0", mEmail);
+                h.SetParameter("f1", mPassword);
+                JSONObject obj = h.POST("/Authorization/Login");
+                String res = obj.getString("Error");
+
+                if (res.equals("null")) {
+                    Intent intent = new Intent(LoginActivity.this, MainActivity.class);
+                    startActivity(intent);
+                } else {
+                    Toast.makeText(LoginActivity.this, obj.getString("Note"), Toast.LENGTH_LONG);
+                }
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+
+            // TODO: register the new account here.
+            return true;
+        }
+
+        @Override
+        protected void onPostExecute(final Boolean success) {
+            mAuthTask = null;
+            showProgress(false);
+
+            if (success) {
+//                finish();
+            } else {
+                mPasswordView.setError(getString(R.string.error_incorrect_password));
+                mPasswordView.requestFocus();
+            }
+        }
+
+        @Override
+        protected void onCancelled() {
+            mAuthTask = null;
+            showProgress(false);
+        }
+    }
+}
+

+ 1297 - 0
feature/src/main/java/ru/ktk45/www/feature/MainActivity.java

@@ -0,0 +1,1297 @@
+package ru.ktk45.www.feature;
+
+
+import android.app.DatePickerDialog;
+import android.graphics.Typeface;
+import android.os.Bundle;
+import android.os.StrictMode;
+import android.support.annotation.Nullable;
+import android.support.design.widget.FloatingActionButton;
+import android.support.design.widget.Snackbar;
+import android.support.v4.content.res.ResourcesCompat;
+import android.text.InputType;
+import android.util.Log;
+import android.util.TypedValue;
+import android.view.Gravity;
+import android.view.View;
+import android.support.design.widget.NavigationView;
+import android.support.v4.view.GravityCompat;
+import android.support.v4.widget.DrawerLayout;
+import android.support.v7.app.ActionBarDrawerToggle;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.Toolbar;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.ViewGroup;
+import android.webkit.WebSettings;
+import android.webkit.WebView;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.DatePicker;
+import android.widget.EditText;
+import android.widget.FrameLayout;
+import android.widget.LinearLayout;
+import android.widget.Spinner;
+import android.widget.TableRow;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.w3c.dom.Text;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Locale;
+
+public class MainActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener {
+
+    // Динамический список подразделений
+    private ArrayAdapter<String> _BranchCaption;
+    private ArrayAdapter<String> _BranchHash;
+
+    private int _BranchSelectID;
+    private int _GroupSelectID;
+    private int _ScheduleLayoutID;
+
+    // Динамический список групп для расписания (для установки в список Spinner'а)
+    private ArrayAdapter<Integer> _Group;
+    // Объект с группами подразделений
+    private JSONArray _GroupList;
+
+    private final Calendar _Calendar = Calendar.getInstance();
+    private final Calendar _CalendarMon = Calendar.getInstance();
+    private final Calendar _CalendarSat = Calendar.getInstance();
+
+    private final SimpleDateFormat _DateFormat = new SimpleDateFormat("dd-MM-yyyy", Locale.US);
+    private final SimpleDateFormat _DateQueryFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.US);
+    private EditText _DateSetup;
+
+    // Для сохраниения даты подготовленной для отправки запроса расписания
+    private int _DateIs = 0;
+    private String[] _DateIsString = new String[2];
+
+    // LinearLayout основного окна
+    private LinearLayout _ContentPage;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
+        StrictMode.setThreadPolicy(policy);
+
+        setContentView(R.layout.activity_main);
+        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
+        setSupportActionBar(toolbar);
+
+        FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
+        fab.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
+                        .setAction("Action", null).show();
+            }
+        });
+
+        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
+        ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
+                this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
+        drawer.addDrawerListener(toggle);
+        toggle.syncState();
+
+        NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
+        navigationView.setNavigationItemSelectedListener(this);
+
+        _ContentPage = (LinearLayout) findViewById(R.id.content_layout);
+
+        setWeekDateRange();
+
+        loadScheduleFilter();
+        createGuestSchedule();
+        loadSchedule();
+    }
+
+    @Override
+    public void onBackPressed() {
+        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
+        if (drawer.isDrawerOpen(GravityCompat.START)) {
+            drawer.closeDrawer(GravityCompat.START);
+        } else {
+            super.onBackPressed();
+        }
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        // Inflate the menu; this adds items to the action bar if it is present.
+        getMenuInflater().inflate(R.menu.main, menu);
+
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        // Handle action bar item clicks here. The action bar will
+        // automatically handle clicks on the Home/Up button, so long
+        // as you specify a parent activity in AndroidManifest.xml.
+        int id = item.getItemId();
+
+        //noinspection SimplifiableIfStatement
+        if (id == R.id.action_settings) {
+            return true;
+        }
+
+        return super.onOptionsItemSelected(item);
+    }
+
+    @SuppressWarnings("StatementWithEmptyBody")
+    @Override
+    public boolean onNavigationItemSelected(MenuItem item) {
+        // Handle navigation view item clicks here.
+        int id = item.getItemId();
+
+        if (id == R.id.nav_news) {
+
+            loadNews();
+
+        } else if (id == R.id.nav_schedule) {
+
+            setWeekDateRange();
+
+            loadScheduleFilter();
+            createGuestSchedule();
+            loadSchedule();
+
+        } else if (id == R.id.nav_schedule_call) {
+
+        } else if (id == R.id.nav_manage) {
+
+        } else if (id == R.id.nav_send) {
+
+        }
+
+        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
+        drawer.closeDrawer(GravityCompat.START);
+        return true;
+    }
+
+    public void loadNews() {
+        try {
+            Link h = new Link();
+            h.SetParameter("Limit", "20");
+            h.SetParameter("Page", "0");
+            JSONObject obj = h.POST("/news");
+            if (obj == null) {
+                Toast toast = Toast.makeText(getApplicationContext(), "Ошибка получения данных", Toast.LENGTH_LONG);
+                toast.show();
+                return;
+            }
+
+            if (obj.getString("Error").equals("null")) {
+
+                _ContentPage.removeAllViewsInLayout();
+
+                LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
+                LinearLayout.LayoutParams layoutParams2 = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
+//                layoutParams.gravity = Gravity.FILL_HORIZONTAL;
+
+                layoutParams.bottomMargin = 15;
+                layoutParams.leftMargin = 0;
+                layoutParams.rightMargin = 0;
+                layoutParams.topMargin = 0;
+//
+//                layoutParams2.bottomMargin = 0;
+//                layoutParams2.leftMargin = 0;
+//                layoutParams2.rightMargin = 0;
+//                layoutParams2.topMargin = 0;
+
+                JSONArray _news = obj.getJSONArray("News");
+                Typeface face = ResourcesCompat.getFont(this, R.font.play_regular);
+
+                for (int i = 0; i < _news.length(); i++) {
+                    JSONObject _n =  _news.getJSONObject(i);
+
+                    LinearLayout field = new LinearLayout(this);
+                    field.setOrientation(LinearLayout.VERTICAL);
+                    field.setLayoutParams(layoutParams);
+                    field.setBackgroundColor(getResources().getColor(R.color.colorWhite));
+                    field.setPadding(10, 10, 10, 10);
+//                    field.setMinimumHeight(100);
+
+                    TextView _date = new TextView(this);
+                    _date.setText(_n.getString("Published"));
+                    _date.setTextColor(getResources().getColor(R.color.colorGray));
+                    _date.setTypeface(face);
+
+                    TextView _caption = new TextView(this);
+                    _caption.setLayoutParams(layoutParams2);
+                    _caption.setText(_n.getString("Caption") );
+                    _caption.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
+                    _caption.setTypeface(face);
+                    _caption.setTextSize(18);
+
+                    newsClick(field, _n.getString("Link"));
+
+                    field.addView(_date);
+                    field.addView(_caption);
+
+                    _ContentPage.addView(field);
+                }
+            }
+        } catch (JSONException e) {
+            Toast toast = Toast.makeText(getApplicationContext(),e.getMessage(), Toast.LENGTH_LONG);
+            toast.show();
+        }
+    }
+
+    private void newsClick(final LinearLayout fl, final String link) {
+        fl.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                Link h = new Link();
+
+                try {
+                    JSONObject obj = h.POST("/mtl/"+link);
+                    if (obj == null) {
+                        Toast toast = Toast.makeText(getApplicationContext(), "Ошибка получения данных", Toast.LENGTH_LONG);
+                        toast.show();
+                        return;
+                    }
+                    Log.i("INFO", obj.toString());
+                    JSONObject _news = obj.getJSONObject("mtl");
+
+                    _ContentPage.removeAllViewsInLayout();
+
+                    WebView webView = new WebView(MainActivity.this);
+
+                    webView.loadDataWithBaseURL("http://ktk-45.ru/", getNewsHTML(_news.getString("Caption"), _news.getString("Content")), "text/html", "UTF-8", null);
+
+                    _ContentPage.addView(webView);
+
+                } catch (JSONException e) {
+                    Toast toast = Toast.makeText(getApplicationContext(),e.getMessage(), Toast.LENGTH_LONG);
+                    toast.show();
+                }
+            }
+        });
+    }
+
+    private String getNewsHTML(String caption, String content) {
+        return cssStyle1 + caption + cssStyle2 + content + cssStyle3;
+    }
+
+    private static final String cssStyle1 = "<!DOCTYPE html><html><head><meta charset=\"UTF-8\"><style type=\"text/css\">@font-face{font-family:'play';src:url(\"/assets/fonts/google/Play/Play-Regular.ttf\")} body{font-family:'play' !important;} p{text-indent:2.5em;text-align:justify;margin: 10px 0 10px 0;} .the-news-signature{font-style: italic;text-align: right;padding-top: 16px;} h1{text-align:center;font-size:18px;} hr{margin:20px 0;} a{pointer-events: none;} img{width:100%;} .text-center{text-align:center;} .text-right{text-align:right;}</style></head><body><h1>";
+    private static final String cssStyle2 = "</h1>";
+    private static final String cssStyle3 = "</body></html>";
+
+//
+//    РАСПИСАНИЕ
+//
+
+    public void loadSchedule() {
+
+    }
+
+    // Загрузка данных о подразделениях и группах
+    private void loadScheduleFilter() {
+        try {
+            Link h = new Link();
+            JSONObject obj = h.POST("/select/schedule-filter");
+            if (obj == null) {
+                Toast toast = Toast.makeText(getApplicationContext(), "Ошибка получения данных", Toast.LENGTH_LONG);
+                toast.show();
+                return;
+            }
+
+            if (obj.getString("Error").equals("null")) {
+                if (_BranchCaption == null) {
+                    _BranchCaption = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item);
+                }
+                _BranchCaption.clear();
+                _BranchCaption.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+                if (_BranchHash == null) {
+                    _BranchHash = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item);
+                }
+                _BranchHash.clear();
+
+                if (_Group == null) {
+                    _Group = new ArrayAdapter<Integer>(this, android.R.layout.simple_spinner_item);
+                }
+                _Group.clear();
+                _Group.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+
+                if (obj.isNull("Branch")) {
+                    Toast toast = Toast.makeText(getApplicationContext(),"Не удалось получить список подразделений!", Toast.LENGTH_LONG);
+                    toast.show();
+                    return;
+                }
+                JSONArray _list = obj.getJSONArray("Branch");
+                
+                for (int i = 0; i < _list.length(); i++) {
+                    _BranchCaption.add(_list.getJSONObject(i).getString("Caption"));
+                    _BranchHash.add(_list.getJSONObject(i).getString("Hash"));
+                }
+
+                if (obj.isNull("Data")) {
+                    Toast toast = Toast.makeText(getApplicationContext(),"Не удалось получить список групп!", Toast.LENGTH_LONG);
+                    toast.show();
+                    return;
+                }
+                _GroupList = obj.getJSONArray("Data");
+                for (int i = 0; i < _GroupList.length(); i++) {
+                    JSONObject _groupObj = _GroupList.getJSONObject(i);
+                    if (_groupObj.getString("Branch").equals(_BranchHash.getItem(0))) {
+                        JSONArray _groups = _groupObj.getJSONArray("Groups");
+
+                        for (int j = 0; j < _groups.length(); j++) {
+                            _Group.add(_groups.getInt(j));
+                        }
+                    }
+                }
+            }
+
+        } catch (JSONException e) {
+            Toast toast = Toast.makeText(getApplicationContext(),e.getMessage(), Toast.LENGTH_LONG);
+            toast.show();
+        }
+    }
+
+    // Загрузка списка групп выбранного подразделения
+    private void loadGroupList() {
+        try {
+            Link h = new Link();
+
+            Spinner spinner = (Spinner) findViewById(_BranchSelectID);
+
+            int id = (int)spinner.getSelectedItemId();
+
+            h.SetParameter("Branch", _BranchHash.getItem(id));
+            JSONObject obj = h.POST("/select/schedule-call");
+            if (obj == null) {
+                Toast toast = Toast.makeText(getApplicationContext(), "Ошибка получения данных", Toast.LENGTH_LONG);
+                toast.show();
+                return;
+            }
+
+            if (obj.getString("Error").equals("null")) {
+                if (_Group == null) {
+                    _Group = new ArrayAdapter<Integer>(this, android.R.layout.simple_spinner_item);
+                }
+                _Group.clear();
+                _Group.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+
+                Log.i("INFO", obj.toString());
+
+//                if (obj.isNull("Branch")) {
+//                    Toast toast = Toast.makeText(getApplicationContext(),"Не удалось получить список подразделений!", Toast.LENGTH_LONG);
+//                    toast.show();
+//                    return;
+//                }
+//                JSONArray _list = obj.getJSONArray("Branch");
+
+//                for (int i = 0; i < _list.length(); i++) {
+//                    _Group.add(_list.getJSONObject(i).getString("Caption"));
+//                }
+            }
+
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+    }
+
+    public void createGuestSchedule() {
+
+        if (_BranchCaption == null) {
+            // Сообразить сообщение об ошибке
+            Toast toast = Toast.makeText(getApplicationContext(),"Список подразделений не был получен!", Toast.LENGTH_LONG);
+            toast.show();
+            return;
+        }
+        if (_Group == null) {
+            Toast toast = Toast.makeText(getApplicationContext(),"Список групп не был получен!", Toast.LENGTH_LONG);
+            toast.show();
+            return;
+        }
+
+        // Для начала нужно сформировать основную форму с фильтрами
+
+        final Typeface face = ResourcesCompat.getFont(this, R.font.play_bold);
+        LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
+        layoutParams.bottomMargin = 20;
+        layoutParams.leftMargin = 0;
+        layoutParams.rightMargin = 0;
+        layoutParams.topMargin = 0;
+
+        _ContentPage.removeAllViewsInLayout();
+
+        TextView textViewBranchCaption = new TextView(this);
+        textViewBranchCaption.setText(R.string.branch_label);
+        textViewBranchCaption.setTypeface(face);
+
+        _ContentPage.addView(textViewBranchCaption);
+
+        Spinner selectBranch = new Spinner(this);
+        _BranchSelectID = View.generateViewId();
+        selectBranch.setId(_BranchSelectID);
+        selectBranch.setAdapter(_BranchCaption);
+        selectBranch.setLayoutParams(layoutParams);
+
+        // Событие выбора подразделения
+        selectBranch.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+            @Override
+            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+                _Group.clear();
+                try {
+                    for (int i = 0; i < _GroupList.length(); i++) {
+                        JSONObject _groupObj = _GroupList.getJSONObject(i);
+                        if (_groupObj.getString("Branch").equals(_BranchHash.getItem(position))) {
+                            JSONArray _groups = _groupObj.getJSONArray("Groups");
+
+                            for (int j = 0; j < _groups.length(); j++) {
+                                _Group.add(_groups.getInt(j));
+                            }
+                        }
+                    }
+                    Spinner spinner = (Spinner) findViewById(_GroupSelectID);
+                    spinner.setAdapter(_Group);
+                } catch (JSONException e) {
+                    Toast toast = Toast.makeText(getApplicationContext(),e.getMessage(), Toast.LENGTH_LONG);
+                    toast.show();
+                }
+            }
+
+            @Override
+            public void onNothingSelected(AdapterView<?> parent) {
+
+            }
+        });
+
+        _ContentPage.addView(selectBranch);
+
+        TextView textViewGroupCaption = new TextView(this);
+        textViewGroupCaption.setText(R.string.group_label);
+        textViewGroupCaption.setTypeface(face);
+
+        _ContentPage.addView(textViewGroupCaption);
+
+        Spinner selectGroup = new Spinner(this);
+        _GroupSelectID = View.generateViewId();
+        selectGroup.setId(_GroupSelectID);
+        selectGroup.setLayoutParams(layoutParams);
+        selectGroup.setAdapter(_Group);
+
+        selectGroup.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+            @Override
+            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+
+                int selectedGroup = 0;
+
+                try {
+                    selectedGroup = _Group.getItem(position);
+                } catch (NullPointerException e) {
+                    Toast toast = Toast.makeText(getApplicationContext(),e.getMessage(), Toast.LENGTH_LONG);
+                    toast.show();
+                }
+
+                try {
+                    Spinner spinner = (Spinner) findViewById(_BranchSelectID);
+
+                    Date date = new Date();
+
+                    Link h = new Link();
+                    h.SetParameter("Branch", _BranchHash.getItem((int)spinner.getSelectedItemId()));
+                    h.SetParameter("Group", ""+selectedGroup);
+
+                    if (_DateIsString[0] != null) {
+                        h.SetParameter("FirstDate", _DateIsString[0]);
+                    } else {
+                        setWeekDateRange();
+                        h.SetParameter("FirstDate", _DateIsString[0]);
+                    }
+
+                    if (_DateIsString[1] != null) {
+                        h.SetParameter("LastDate", _DateIsString[1]);
+                    } else {
+                        setWeekDateRange();
+                        h.SetParameter("LastDate", _DateIsString[1]);
+                    }
+
+                    JSONObject obj = h.POST("/select/schedule-group");
+                    if (obj == null) {
+                        Toast toast = Toast.makeText(getApplicationContext(), "Ошибка получения данных", Toast.LENGTH_LONG);
+                        toast.show();
+                        return;
+                    }
+
+                    if (!obj.getString("Error").equals("null")) {
+                        Toast toast = Toast.makeText(getApplicationContext(), obj.getString("Error"), Toast.LENGTH_LONG);
+                        toast.show();
+                        return;
+                    }
+
+                    if (obj.isNull("Data")) {
+                        Toast toast = Toast.makeText(getApplicationContext(), "Данные расписания выбранной группы/даты отсутствуют в базе", Toast.LENGTH_LONG);
+                        toast.show();
+                        return;
+                    }
+
+                    JSONArray _sch = obj.getJSONArray("Data");
+
+                    prevDate = "";
+
+                    LinearLayout schLayout = (LinearLayout)findViewById(_ScheduleLayoutID);
+                    if (schLayout == null) {
+                        Toast toast = Toast.makeText(getApplicationContext(), "Не найден слой для создания расписания", Toast.LENGTH_LONG);
+                        toast.show();
+                        return;
+                    }
+
+                    schLayout.removeAllViewsInLayout();
+
+                    for (int i = 0; i < _sch.length(); i++) {
+
+                        JSONObject _currentPair = _sch.getJSONObject(i);
+
+                        String _currentDay = _currentPair.getString("Date");
+                        if (!prevDate.equals(_currentDay)) {
+                            schLayout.addView(createDateRow(_currentDay));
+                            prevDate = _currentDay;
+                        }
+
+                        String _subgroup = _currentPair.getString("Subgroup");
+                        switch (_subgroup) {
+                            case "left":
+                                if (i+1 < _sch.length()) {
+                                    JSONObject _next = _sch.getJSONObject(i+1);
+
+                                    if (_currentPair.getString("Pair").equals(_next.getString("Pair")) &&
+                                            _next.getString("Subgroup").equals("right")) {
+
+                                        schLayout.addView(createBoth(_currentPair, _next));
+
+                                        i++;
+                                    } else {
+                                        schLayout.addView(createLeft(_currentPair));
+                                    }
+                                }
+                                break;
+                            case "middle":
+                                schLayout.addView(createMiddle(_currentPair));
+                                break;
+                            case "right":
+                                schLayout.addView(createRight(_currentPair));
+                                break;
+
+                            default: continue;
+                        }
+
+//                        schLayout.addView(pushSchedulePair(_sch.getJSONObject(i)));
+                    }
+
+                } catch (JSONException e) {
+                    Toast toast = Toast.makeText(getApplicationContext(),e.getMessage(), Toast.LENGTH_LONG);
+                    toast.show();
+                }
+            }
+
+            @Override
+            public void onNothingSelected(AdapterView<?> parent) {
+
+            }
+        });
+
+        _ContentPage.addView(selectGroup);
+
+        final DatePickerDialog.OnDateSetListener date = new DatePickerDialog.OnDateSetListener() {
+            @Override
+            public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {
+                _Calendar.set(Calendar.YEAR, year);
+                _Calendar.set(Calendar.MONTH, month);
+                _Calendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);
+
+                if (_DateSetup == null) {
+                    Toast toast = Toast.makeText(getApplicationContext(),"Нет элемента для установки даты!", Toast.LENGTH_LONG);
+                    toast.show();
+                    return;
+                }
+                _DateSetup.setText(_DateFormat.format(_Calendar.getTime()));
+                _DateIsString[_DateIs] = _DateQueryFormat.format(_Calendar.getTime());
+            }
+        };
+
+        LinearLayout.LayoutParams layoutParamsDate = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
+        layoutParamsDate.weight = 0.5f;
+
+        LinearLayout _llDate = new LinearLayout(this);
+        _llDate.setOrientation(LinearLayout.VERTICAL);
+
+        LinearLayout _llDateCaption = new LinearLayout(this);
+        _llDateCaption.setOrientation(LinearLayout.HORIZONTAL);
+
+        LinearLayout _llDateDate = new LinearLayout(this);
+        _llDateDate.setOrientation(LinearLayout.HORIZONTAL);
+
+        TextView _tvCaption1 = new TextView(this);
+        TextView _tvCaption2 = new TextView(this);
+        _tvCaption1.setTypeface(face);
+        _tvCaption2.setTypeface(face);
+        _tvCaption1.setText("Дата с:");
+        _tvCaption2.setText("по:");
+        _tvCaption1.setLayoutParams(layoutParamsDate);
+        _tvCaption2.setLayoutParams(layoutParamsDate);
+
+        EditText _etDate1 = new EditText(this);
+        _etDate1.setInputType(InputType.TYPE_CLASS_DATETIME | InputType.TYPE_DATETIME_VARIATION_DATE);
+        _etDate1.setLayoutParams(layoutParamsDate);
+        _etDate1.setTypeface(face);
+        _etDate1.setFocusable(false);
+        _etDate1.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+
+                _DateSetup = (EditText)v;
+                _DateIs = 0;
+
+                new DatePickerDialog(MainActivity.this, date,
+                        _Calendar.get(Calendar.YEAR),
+                        _Calendar.get(Calendar.MONTH),
+                        _Calendar.get(Calendar.DAY_OF_MONTH)).show();
+            }
+        });
+        _etDate1.setText(_DateFormat.format(_CalendarMon.getTime()));
+
+        EditText _etDate2 = new EditText(this);
+        _etDate2.setInputType(InputType.TYPE_CLASS_DATETIME | InputType.TYPE_DATETIME_VARIATION_DATE);
+        _etDate2.setLayoutParams(layoutParamsDate);
+        _etDate2.setTypeface(face);
+        _etDate2.setFocusable(false);
+        _etDate2.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+
+                _DateSetup = (EditText)v;
+                _DateIs = 1;
+
+                new DatePickerDialog(MainActivity.this, date,
+                        _Calendar.get(Calendar.YEAR),
+                        _Calendar.get(Calendar.MONTH),
+                        _Calendar.get(Calendar.DAY_OF_MONTH)).show();
+            }
+        });
+        _etDate2.setText(_DateFormat.format(_CalendarSat.getTime()));
+
+        _llDateCaption.addView(_tvCaption1);
+        _llDateCaption.addView(_tvCaption2);
+
+        _llDateDate.addView(_etDate1);
+        _llDateDate.addView(_etDate2);
+
+        _llDate.addView(_llDateCaption);
+        _llDate.addView(_llDateDate);
+
+        _ContentPage.addView(_llDate);
+
+        LinearLayout.LayoutParams layoutParamsSch = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        LinearLayout _llSch = new LinearLayout(this);
+        _llSch.setOrientation(LinearLayout.VERTICAL);
+        _llSch.setLayoutParams(layoutParamsSch);
+        _ScheduleLayoutID = View.generateViewId();
+        _llSch.setId(_ScheduleLayoutID);
+
+        _ContentPage.addView(_llSch);
+    }
+
+    // Установить в элементы Date1 & Date2 диапозон текущей недели
+    private void setWeekDateRange() {
+
+        /*
+        *   1   Воскресенье     0
+        *   2   Понедельник     1
+        *   3   Вторник         2
+        *   4   Среда           3
+        *   5   Четверг         4
+        *   6   Пятница         5
+        *   7   Суббота         6
+        *
+        * */
+
+        int IDayToFirstWeedDay[] = {
+                1,
+                0,
+                -1,
+                -2,
+                -3,
+                -4,
+                0,
+        };
+        int IDayToLastWeedDay[] = {
+                6,
+                5,
+                4,
+                3,
+                2,
+                1,
+                7,
+        };
+
+        int _day = _Calendar.get(Calendar.DAY_OF_WEEK) - 1;
+
+        _CalendarMon.setTimeInMillis((new Date()).getTime() + (86400000 * IDayToFirstWeedDay[_day]));
+
+        int _date = _CalendarMon.get(Calendar.DAY_OF_MONTH);
+        int _month = _CalendarMon.get(Calendar.MONTH) + 1;
+        int _year = _CalendarMon.get(Calendar.YEAR);
+
+        _DateIsString[0] = "" + _year + "-" + _month + "-" + (_date > 9 ? _date : "0" + _date);
+
+        _CalendarSat.setTimeInMillis((new Date()).getTime() + (86400000 * IDayToLastWeedDay[_day]));
+
+        _date = _CalendarSat.get(Calendar.DAY_OF_MONTH);
+        _month = _CalendarSat.get(Calendar.MONTH) + 1;
+        _year = _CalendarSat.get(Calendar.YEAR);
+
+        _DateIsString[1] = "" + _year + "-" + _month + "-" + (_date > 9 ? _date : "0" + _date);
+    }
+
+
+    private String _DayName[] = {
+            "Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота",
+    };
+    private String _MonthName[] = {
+            " января ", " февраля ", " марта ", " апреля ", " июня ", " июля ", " августа ", " сентября ", " октября ", " ноября ", " декабря ",
+    };
+
+    private String prevDate = "";
+
+    private LinearLayout createDateRow(String dateStr) {
+        LinearLayout _ll_day = new LinearLayout(this);
+
+        _ll_day.setOrientation(LinearLayout.VERTICAL);
+
+        TextView _tv_day = new TextView(this);
+
+        final Typeface faceReg = ResourcesCompat.getFont(this, R.font.play_regular);
+
+        TableRow.LayoutParams _lp_day = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT);
+        _lp_day.weight = 1;
+        _lp_day.topMargin = 20;
+
+        String _currentDay = "";
+        String __date[] = dateStr.split("-");
+        try {
+            _currentDay = __date[2].split("T")[0] + _MonthName[Integer.parseInt(__date[1]) - 1] + __date[0];
+        } catch (NumberFormatException e) {
+            _currentDay = __date[2].split("T")[0] + "-" + __date[1] + "-" + __date[0];
+        }
+        _tv_day.setText(_currentDay);
+        _tv_day.setTypeface(faceReg);
+        _tv_day.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16);
+        _tv_day.setLayoutParams(_lp_day);
+        _tv_day.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
+        _tv_day.setBackgroundColor(getResources().getColor(R.color.colorSchHead));
+        _tv_day.setTextColor(getResources().getColor(R.color.colorWhite));
+
+        LinearLayout.LayoutParams _llpd = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
+        _llpd.weight = 1;
+        _ll_day.setLayoutParams(_llpd);
+
+        // = = = = = = = = = = = = = = = = =
+
+        _ll_day.addView(_tv_day);
+
+        return _ll_day;
+    }
+
+    // Строка расписания Middle
+    private LinearLayout createMiddle(JSONObject data) throws JSONException {
+        LinearLayout _pair_row = new LinearLayout(this);
+        LinearLayout _ll_pair = new LinearLayout(this);
+        LinearLayout _ll_desc = new LinearLayout(this);
+        LinearLayout _ll_disc = new LinearLayout(this);
+        LinearLayout _ll_lect = new LinearLayout(this);
+
+        _pair_row.setOrientation(LinearLayout.VERTICAL);
+        _ll_disc.setOrientation(LinearLayout.VERTICAL);
+        _ll_lect.setOrientation(LinearLayout.VERTICAL);
+        _ll_pair.setOrientation(LinearLayout.HORIZONTAL);
+        _ll_desc.setOrientation(LinearLayout.HORIZONTAL);
+
+        TextView _tv_day = new TextView(this);
+        TextView _tv_pair = new TextView(this);
+        TextView _tv_disc = new TextView(this);
+        TextView _tv_teacher = new TextView(this);
+        TextView _tv_lect = new TextView(this);
+
+        final Typeface faceReg = ResourcesCompat.getFont(this, R.font.play_regular);
+
+        TableRow.LayoutParams _lp_pair = new TableRow.LayoutParams(40, TableRow.LayoutParams.MATCH_PARENT);
+
+        _tv_pair.setText(data.getString("Pair"));
+        _tv_pair.setTypeface(faceReg);
+        _tv_pair.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
+        _tv_pair.setLayoutParams(_lp_pair);
+        _tv_pair.setTextColor(getResources().getColor(R.color.colorBlack));
+        _tv_pair.setGravity(Gravity.CENTER);
+
+        TableRow.LayoutParams _lp_lect = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT);
+        _lp_lect.weight = 1;
+
+        _tv_lect.setText(data.getString("Lecture"));
+        _tv_lect.setTypeface(faceReg);
+        _tv_lect.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
+        _tv_lect.setLayoutParams(_lp_lect);
+//            _tv_lect.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
+        _tv_lect.setTextColor(getResources().getColor(R.color.colorBlack));
+        _tv_lect.setGravity(Gravity.CENTER | Gravity.END);
+
+        TableRow.LayoutParams _lp_disc = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT);
+        _lp_disc.weight = 1;
+
+        _tv_disc.setText(data.getString("Discipline"));
+        _tv_disc.setTypeface(faceReg);
+        _tv_disc.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
+        _tv_disc.setLayoutParams(_lp_disc);
+        _tv_disc.setHeight(52);
+        _tv_disc.setShadowLayer(5, 0, 0, R.color.colorBlack);
+        _tv_disc.setTextColor(getResources().getColor(R.color.colorBlack));
+
+        TableRow.LayoutParams _lp_teacher = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT);
+        _lp_teacher.weight = 1;
+
+        _tv_teacher.setText(data.getString("Teacher"));
+        _tv_teacher.setTypeface(faceReg, Typeface.ITALIC);
+        _tv_teacher.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
+        _tv_teacher.setLayoutParams(_lp_teacher);
+        _tv_teacher.setTextColor(getResources().getColor(R.color.colorTeacher));
+
+        LinearLayout.LayoutParams _llpdi = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        _llpdi.weight = 1;
+        _ll_disc.setLayoutParams(_llpdi);
+
+        LinearLayout.LayoutParams _llpp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        _llpp.weight = 1;
+        _ll_pair.setLayoutParams(_llpp);
+        _ll_pair.setBackground(getResources().getDrawable(R.drawable.shcedule_background));
+
+        LinearLayout.LayoutParams _llpds = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        _llpds.weight = 1;
+        _llpds.setMargins(4, 4, 4, 4);
+        _ll_desc.setLayoutParams(_llpds);
+        _ll_desc.setBackground(getResources().getDrawable(R.drawable.schedulet_discipline));
+        _ll_desc.setPadding(4, 4, 4, 4);
+
+        LinearLayout.LayoutParams _llpl = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        _llpl.weight = 5;
+        _ll_lect.setLayoutParams(_llpl);
+
+        LinearLayout.LayoutParams _llpd = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
+        _llpd.weight = 1;
+        _pair_row.setLayoutParams(_llpd);
+
+        // = = = = = = = = = = = = = = = = =
+
+        _ll_lect.addView(_tv_lect);
+        _ll_disc.addView(_tv_disc);
+        _ll_disc.addView(_tv_teacher);
+        _ll_desc.addView(_ll_disc);
+        _ll_desc.addView(_ll_lect);
+        _ll_pair.addView(_tv_pair);
+        _ll_pair.addView(_ll_desc);
+
+        _pair_row.addView(_ll_pair);
+
+        return _pair_row;
+    }
+
+    // Строка расписания Left
+    private LinearLayout createLeft(JSONObject data) throws JSONException {
+        LinearLayout _pair_row = new LinearLayout(this);
+        LinearLayout _ll_pair = new LinearLayout(this);
+        LinearLayout _ll_desc = new LinearLayout(this);
+        LinearLayout _ll_desc_null = new LinearLayout(this);
+        LinearLayout _ll_disc = new LinearLayout(this);
+        LinearLayout _ll_lect = new LinearLayout(this);
+
+        _pair_row.setOrientation(LinearLayout.VERTICAL);
+        _ll_disc.setOrientation(LinearLayout.VERTICAL);
+        _ll_lect.setOrientation(LinearLayout.VERTICAL);
+        _ll_pair.setOrientation(LinearLayout.HORIZONTAL);
+        _ll_desc.setOrientation(LinearLayout.HORIZONTAL);
+        _ll_desc_null.setOrientation(LinearLayout.HORIZONTAL);
+
+        TextView _tv_day = new TextView(this);
+        TextView _tv_pair = new TextView(this);
+        TextView _tv_disc = new TextView(this);
+        TextView _tv_teacher = new TextView(this);
+        TextView _tv_lect = new TextView(this);
+
+        final Typeface faceReg = ResourcesCompat.getFont(this, R.font.play_regular);
+
+        TableRow.LayoutParams _lp_pair = new TableRow.LayoutParams(40, TableRow.LayoutParams.MATCH_PARENT);
+
+        _tv_pair.setText(data.getString("Pair"));
+        _tv_pair.setTypeface(faceReg);
+        _tv_pair.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
+        _tv_pair.setLayoutParams(_lp_pair);
+        _tv_pair.setTextColor(getResources().getColor(R.color.colorBlack));
+        _tv_pair.setGravity(Gravity.CENTER);
+
+        TableRow.LayoutParams _lp_lect = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT);
+        _lp_lect.weight = 1;
+
+        _tv_lect.setText(data.getString("Lecture"));
+        _tv_lect.setTypeface(faceReg);
+        _tv_lect.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
+        _tv_lect.setLayoutParams(_lp_lect);
+//            _tv_lect.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
+        _tv_lect.setTextColor(getResources().getColor(R.color.colorBlack));
+        _tv_lect.setGravity(Gravity.CENTER);
+
+        TableRow.LayoutParams _lp_disc = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT);
+        _lp_disc.weight = 1;
+
+        _tv_disc.setText(data.getString("Discipline"));
+        _tv_disc.setTypeface(faceReg);
+        _tv_disc.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
+        _tv_disc.setLayoutParams(_lp_disc);
+        _tv_disc.setHeight(52);
+        _tv_disc.setShadowLayer(5, 0, 0, R.color.colorBlack);
+        _tv_disc.setTextColor(getResources().getColor(R.color.colorBlack));
+
+        TableRow.LayoutParams _lp_teacher = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT);
+        _lp_teacher.weight = 1;
+
+        _tv_teacher.setText(data.getString("Teacher"));
+        _tv_teacher.setTypeface(faceReg, Typeface.ITALIC);
+        _tv_teacher.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
+        _tv_teacher.setLayoutParams(_lp_teacher);
+        _tv_teacher.setTextColor(getResources().getColor(R.color.colorTeacher));
+
+        LinearLayout.LayoutParams _llpdi = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        _llpdi.weight = 1;
+        _ll_disc.setLayoutParams(_llpdi);
+
+        LinearLayout.LayoutParams _llpp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        _llpp.weight = 1;
+        _ll_pair.setLayoutParams(_llpp);
+        _ll_pair.setBackground(getResources().getDrawable(R.drawable.shcedule_background));
+
+        LinearLayout.LayoutParams _llpds = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        _llpds.weight = 1;
+        _llpds.setMargins(4, 4, 2, 4);
+        _ll_desc.setLayoutParams(_llpds);
+        _ll_desc.setBackground(getResources().getDrawable(R.drawable.schedulet_discipline));
+        _ll_desc.setPadding(4, 4, 4, 4);
+
+        LinearLayout.LayoutParams _llpdsn = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        _llpdsn.weight = 1;
+        _llpdsn.setMargins(2, 4, 4, 4);
+        _ll_desc_null.setLayoutParams(_llpds);
+        _ll_desc_null.setBackground(getResources().getDrawable(R.drawable.schedulet_discipline));
+        _ll_desc_null.setPadding(4, 4, 4, 4);
+
+        LinearLayout.LayoutParams _llpl = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        _llpl.weight = 5;
+        _ll_lect.setLayoutParams(_llpl);
+
+        LinearLayout.LayoutParams _llpd = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
+        _llpd.weight = 1;
+        _pair_row.setLayoutParams(_llpd);
+
+        // = = = = = = = = = = = = = = = = =
+
+        _ll_lect.addView(_tv_lect);
+        _ll_disc.addView(_tv_disc);
+        _ll_disc.addView(_tv_teacher);
+        _ll_desc.addView(_ll_disc);
+        _ll_desc.addView(_ll_lect);
+        _ll_pair.addView(_tv_pair);
+        _ll_pair.addView(_ll_desc);
+        _ll_pair.addView(_ll_desc_null);
+
+        _pair_row.addView(_ll_pair);
+
+        return _pair_row;
+    }
+
+    // Строка расписания Right
+    private LinearLayout createRight(JSONObject data) throws JSONException {
+        LinearLayout _pair_row = new LinearLayout(this);
+        LinearLayout _ll_pair = new LinearLayout(this);
+        LinearLayout _ll_desc = new LinearLayout(this);
+        LinearLayout _ll_desc_null = new LinearLayout(this);
+        LinearLayout _ll_disc = new LinearLayout(this);
+        LinearLayout _ll_lect = new LinearLayout(this);
+
+        _pair_row.setOrientation(LinearLayout.VERTICAL);
+        _ll_disc.setOrientation(LinearLayout.VERTICAL);
+        _ll_lect.setOrientation(LinearLayout.VERTICAL);
+        _ll_pair.setOrientation(LinearLayout.HORIZONTAL);
+        _ll_desc.setOrientation(LinearLayout.HORIZONTAL);
+        _ll_desc_null.setOrientation(LinearLayout.HORIZONTAL);
+
+        TextView _tv_day = new TextView(this);
+        TextView _tv_pair = new TextView(this);
+        TextView _tv_disc = new TextView(this);
+        TextView _tv_teacher = new TextView(this);
+        TextView _tv_lect = new TextView(this);
+
+        final Typeface faceReg = ResourcesCompat.getFont(this, R.font.play_regular);
+
+        TableRow.LayoutParams _lp_pair = new TableRow.LayoutParams(40, TableRow.LayoutParams.MATCH_PARENT);
+
+        _tv_pair.setText(data.getString("Pair"));
+        _tv_pair.setTypeface(faceReg);
+        _tv_pair.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
+        _tv_pair.setLayoutParams(_lp_pair);
+        _tv_pair.setTextColor(getResources().getColor(R.color.colorBlack));
+        _tv_pair.setGravity(Gravity.CENTER);
+
+        TableRow.LayoutParams _lp_lect = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT);
+        _lp_lect.weight = 1;
+
+        _tv_lect.setText(data.getString("Lecture"));
+        _tv_lect.setTypeface(faceReg);
+        _tv_lect.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
+        _tv_lect.setLayoutParams(_lp_lect);
+//            _tv_lect.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
+        _tv_lect.setTextColor(getResources().getColor(R.color.colorBlack));
+        _tv_lect.setGravity(Gravity.CENTER);
+
+        TableRow.LayoutParams _lp_disc = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT);
+        _lp_disc.weight = 1;
+
+        _tv_disc.setText(data.getString("Discipline"));
+        _tv_disc.setTypeface(faceReg);
+        _tv_disc.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
+        _tv_disc.setLayoutParams(_lp_disc);
+        _tv_disc.setHeight(52);
+        _tv_disc.setShadowLayer(5, 0, 0, R.color.colorBlack);
+        _tv_disc.setTextColor(getResources().getColor(R.color.colorBlack));
+
+        TableRow.LayoutParams _lp_teacher = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT);
+        _lp_teacher.weight = 1;
+
+        _tv_teacher.setText(data.getString("Teacher"));
+        _tv_teacher.setTypeface(faceReg, Typeface.ITALIC);
+        _tv_teacher.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
+        _tv_teacher.setLayoutParams(_lp_teacher);
+        _tv_teacher.setTextColor(getResources().getColor(R.color.colorTeacher));
+
+        LinearLayout.LayoutParams _llpdi = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        _llpdi.weight = 1;
+        _ll_disc.setLayoutParams(_llpdi);
+
+        LinearLayout.LayoutParams _llpp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        _llpp.weight = 1;
+        _ll_pair.setLayoutParams(_llpp);
+        _ll_pair.setBackground(getResources().getDrawable(R.drawable.shcedule_background));
+
+        LinearLayout.LayoutParams _llpds = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        _llpds.weight = 1;
+        _llpds.setMargins(4, 4, 2, 4);
+        _ll_desc.setLayoutParams(_llpds);
+        _ll_desc.setBackground(getResources().getDrawable(R.drawable.schedulet_discipline));
+        _ll_desc.setPadding(4, 4, 4, 4);
+
+        LinearLayout.LayoutParams _llpdsn = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        _llpdsn.weight = 1;
+        _llpdsn.setMargins(2, 4, 4, 4);
+        _ll_desc_null.setLayoutParams(_llpds);
+        _ll_desc_null.setBackground(getResources().getDrawable(R.drawable.schedulet_discipline));
+        _ll_desc_null.setPadding(4, 4, 4, 4);
+
+        LinearLayout.LayoutParams _llpl = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        _llpl.weight = 5;
+        _ll_lect.setLayoutParams(_llpl);
+
+        LinearLayout.LayoutParams _llpd = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
+        _llpd.weight = 1;
+        _pair_row.setLayoutParams(_llpd);
+
+        // = = = = = = = = = = = = = = = = =
+
+        _ll_lect.addView(_tv_lect);
+        _ll_disc.addView(_tv_disc);
+        _ll_disc.addView(_tv_teacher);
+        _ll_desc.addView(_ll_disc);
+        _ll_desc.addView(_ll_lect);
+        _ll_pair.addView(_tv_pair);
+        _ll_pair.addView(_ll_desc_null);
+        _ll_pair.addView(_ll_desc);
+
+        _pair_row.addView(_ll_pair);
+
+        return _pair_row;
+    }
+
+    // Строка расписания Both
+    private LinearLayout createBoth(JSONObject dataL, JSONObject dataR) throws JSONException {
+        LinearLayout _pair_row = new LinearLayout(this);
+        LinearLayout _ll_pair = new LinearLayout(this);
+        LinearLayout _ll_desc = new LinearLayout(this);
+        LinearLayout _ll_desc_r = new LinearLayout(this);
+        LinearLayout _ll_disc = new LinearLayout(this);
+        LinearLayout _ll_disc_r = new LinearLayout(this);
+        LinearLayout _ll_lect = new LinearLayout(this);
+        LinearLayout _ll_lect_r = new LinearLayout(this);
+
+        _pair_row.setOrientation(LinearLayout.VERTICAL);
+        _ll_disc.setOrientation(LinearLayout.VERTICAL);
+        _ll_lect.setOrientation(LinearLayout.VERTICAL);
+        _ll_disc_r.setOrientation(LinearLayout.VERTICAL);
+        _ll_lect_r.setOrientation(LinearLayout.VERTICAL);
+        _ll_pair.setOrientation(LinearLayout.HORIZONTAL);
+        _ll_desc.setOrientation(LinearLayout.HORIZONTAL);
+        _ll_desc_r.setOrientation(LinearLayout.HORIZONTAL);
+
+        TextView _tv_day = new TextView(this);
+        TextView _tv_pair = new TextView(this);
+        TextView _tv_disc = new TextView(this);
+        TextView _tv_teacher = new TextView(this);
+        TextView _tv_lect = new TextView(this);
+        TextView _tv_disc_r = new TextView(this);
+        TextView _tv_teacher_r = new TextView(this);
+        TextView _tv_lect_r = new TextView(this);
+
+        final Typeface faceReg = ResourcesCompat.getFont(this, R.font.play_regular);
+
+        TableRow.LayoutParams _lp_pair = new TableRow.LayoutParams(40, TableRow.LayoutParams.MATCH_PARENT);
+
+        _tv_pair.setText(dataL.getString("Pair"));
+        _tv_pair.setTypeface(faceReg);
+        _tv_pair.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
+        _tv_pair.setLayoutParams(_lp_pair);
+        _tv_pair.setTextColor(getResources().getColor(R.color.colorBlack));
+        _tv_pair.setGravity(Gravity.CENTER);
+
+        TableRow.LayoutParams _lp_lect = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT);
+        _lp_lect.weight = 1;
+
+        _tv_lect.setText(dataL.getString("Lecture"));
+        _tv_lect.setTypeface(faceReg);
+        _tv_lect.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
+        _tv_lect.setLayoutParams(_lp_lect);
+//            _tv_lect.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
+        _tv_lect.setTextColor(getResources().getColor(R.color.colorBlack));
+        _tv_lect.setGravity(Gravity.CENTER);
+
+        TableRow.LayoutParams _lp_lect_r = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT);
+        _lp_lect_r.weight = 1;
+
+        _tv_lect_r.setText(dataL.getString("Lecture"));
+        _tv_lect_r.setTypeface(faceReg);
+        _tv_lect_r.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
+        _tv_lect_r.setLayoutParams(_lp_lect_r);
+//            _tv_lect_r.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
+        _tv_lect_r.setTextColor(getResources().getColor(R.color.colorBlack));
+        _tv_lect_r.setGravity(Gravity.CENTER);
+
+        TableRow.LayoutParams _lp_disc = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT);
+        _lp_disc.weight = 1;
+
+        _tv_disc.setText(dataL.getString("Discipline"));
+        _tv_disc.setTypeface(faceReg);
+        _tv_disc.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
+        _tv_disc.setLayoutParams(_lp_disc);
+        _tv_disc.setHeight(52);
+        _tv_disc.setShadowLayer(5, 0, 0, R.color.colorBlack);
+        _tv_disc.setTextColor(getResources().getColor(R.color.colorBlack));
+
+        TableRow.LayoutParams _lp_disc_r = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT);
+        _lp_disc_r.weight = 1;
+
+        _tv_disc_r.setText(dataL.getString("Discipline"));
+        _tv_disc_r.setTypeface(faceReg);
+        _tv_disc_r.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
+        _tv_disc_r.setLayoutParams(_lp_disc_r);
+        _tv_disc_r.setHeight(52);
+        _tv_disc_r.setShadowLayer(5, 0, 0, R.color.colorBlack);
+        _tv_disc_r.setTextColor(getResources().getColor(R.color.colorBlack));
+
+        TableRow.LayoutParams _lp_teacher = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT);
+        _lp_teacher.weight = 1;
+
+        _tv_teacher.setText(dataL.getString("Teacher"));
+        _tv_teacher.setTypeface(faceReg, Typeface.ITALIC);
+        _tv_teacher.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
+        _tv_teacher.setLayoutParams(_lp_teacher);
+        _tv_teacher.setTextColor(getResources().getColor(R.color.colorTeacher));
+
+        TableRow.LayoutParams _lp_teacher_r = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT);
+        _lp_teacher_r.weight = 1;
+
+        _tv_teacher_r.setText(dataL.getString("Teacher"));
+        _tv_teacher_r.setTypeface(faceReg, Typeface.ITALIC);
+        _tv_teacher_r.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
+        _tv_teacher_r.setLayoutParams(_lp_teacher_r);
+        _tv_teacher_r.setTextColor(getResources().getColor(R.color.colorTeacher));
+
+        LinearLayout.LayoutParams _llpdi = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        _llpdi.weight = 1;
+        _ll_disc.setLayoutParams(_llpdi);
+
+        LinearLayout.LayoutParams _llpdi_r = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        _llpdi_r.weight = 1;
+        _ll_disc_r.setLayoutParams(_llpdi_r);
+
+        LinearLayout.LayoutParams _llpp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        _llpp.weight = 1;
+        _ll_pair.setLayoutParams(_llpp);
+        _ll_pair.setBackground(getResources().getDrawable(R.drawable.shcedule_background));
+
+        LinearLayout.LayoutParams _llpds = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        _llpds.weight = 1;
+        _llpds.setMargins(4, 4, 2, 4);
+        _ll_desc.setLayoutParams(_llpds);
+        _ll_desc.setBackground(getResources().getDrawable(R.drawable.schedulet_discipline));
+        _ll_desc.setPadding(4, 4, 4, 4);
+
+        LinearLayout.LayoutParams _llpdsn = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        _llpdsn.weight = 1;
+        _llpdsn.setMargins(2, 4, 4, 4);
+        _ll_desc_r.setLayoutParams(_llpds);
+        _ll_desc_r.setBackground(getResources().getDrawable(R.drawable.schedulet_discipline));
+        _ll_desc_r.setPadding(4, 4, 4, 4);
+
+        LinearLayout.LayoutParams _llpl = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        _llpl.weight = 5;
+        _ll_lect.setLayoutParams(_llpl);
+
+        LinearLayout.LayoutParams _llpl_r = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
+        _llpl_r.weight = 5;
+        _ll_lect_r.setLayoutParams(_llpl);
+
+        LinearLayout.LayoutParams _llpd = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
+        _llpd.weight = 1;
+        _pair_row.setLayoutParams(_llpd);
+
+        // = = = = = = = = = = = = = = = = =
+
+        _ll_lect.addView(_tv_lect);
+        _ll_disc.addView(_tv_disc);
+        _ll_disc.addView(_tv_teacher);
+        _ll_desc.addView(_ll_disc);
+        _ll_desc.addView(_ll_lect);
+
+        _ll_lect_r.addView(_tv_lect_r);
+        _ll_disc_r.addView(_tv_disc_r);
+        _ll_disc_r.addView(_tv_teacher_r);
+        _ll_desc_r.addView(_ll_disc_r);
+        _ll_desc_r.addView(_ll_lect_r);
+
+        _ll_pair.addView(_tv_pair);
+        _ll_pair.addView(_ll_desc);
+        _ll_pair.addView(_ll_desc_r);
+
+        _pair_row.addView(_ll_pair);
+
+        return _pair_row;
+    }
+
+}

+ 12 - 0
feature/src/main/res/drawable-v21/ic_menu_camera.xml

@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0" />
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M9,2L7.17,4H4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2H9zm3,15c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z" />
+</vector>

+ 9 - 0
feature/src/main/res/drawable-v21/ic_menu_gallery.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M22,16V4c0,-1.1 -0.9,-2 -2,-2H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2zm-11,-4l2.03,2.71L16,11l4,5H8l3,-4zM2,6v14c0,1.1 0.9,2 2,2h14v-2H4V6H2z" />
+</vector>

+ 9 - 0
feature/src/main/res/drawable-v21/ic_menu_manage.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M22.7,19l-9.1,-9.1c0.9,-2.3 0.4,-5 -1.5,-6.9 -2,-2 -5,-2.4 -7.4,-1.3L9,6 6,9 1.6,4.7C0.4,7.1 0.9,10.1 2.9,12.1c1.9,1.9 4.6,2.4 6.9,1.5l9.1,9.1c0.4,0.4 1,0.4 1.4,0l2.3,-2.3c0.5,-0.4 0.5,-1.1 0.1,-1.4z" />
+</vector>

+ 9 - 0
feature/src/main/res/drawable-v21/ic_menu_send.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z" />
+</vector>

+ 9 - 0
feature/src/main/res/drawable-v21/ic_menu_share.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92s-1.31,-2.92 -2.92,-2.92z" />
+</vector>

+ 9 - 0
feature/src/main/res/drawable-v21/ic_menu_slideshow.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M4,6H2v14c0,1.1 0.9,2 2,2h14v-2H4V6zm16,-4H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V4c0,-1.1 -0.9,-2 -2,-2zm-8,12.5v-9l6,4.5 -6,4.5z" />
+</vector>

+ 12 - 0
feature/src/main/res/drawable/schedulet_discipline.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <stroke
+        android:width="1px"
+        android:color="#666699">
+    </stroke>
+    <solid
+        android:color="#d3d3e2">
+    </solid>
+</shape>

+ 12 - 0
feature/src/main/res/drawable/shcedule_background.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <!--<stroke-->
+        <!--android:width="1px"-->
+        <!--android:color="@color/colorSchHead">-->
+    <!--</stroke>-->
+    <solid android:color="#efeff5">
+
+    </solid>
+</shape>

+ 9 - 0
feature/src/main/res/drawable/side_nav_bar.xml

@@ -0,0 +1,9 @@
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <gradient
+        android:angle="0"
+        android:centerColor="#666699"
+        android:endColor="#666699"
+        android:startColor="#666699"
+        android:type="linear" />
+</shape>

BIN
feature/src/main/res/font/play_bold.ttf


BIN
feature/src/main/res/font/play_regular.ttf


+ 81 - 0
feature/src/main/res/layout/activity_login.xml

@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout 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:gravity="center_horizontal"
+    android:orientation="vertical"
+    android:paddingLeft="@dimen/activity_horizontal_margin"
+    android:paddingTop="@dimen/activity_vertical_margin"
+    android:paddingRight="@dimen/activity_horizontal_margin"
+    android:paddingBottom="@dimen/activity_vertical_margin"
+    tools:context=".LoginActivity">
+
+    <!-- Login progress -->
+    <ProgressBar
+        android:id="@+id/login_progress"
+        style="?android:attr/progressBarStyleLarge"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginBottom="8dp"
+        android:visibility="gone" />
+
+    <ScrollView
+        android:id="@+id/login_form"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+
+        <LinearLayout
+            android:id="@+id/email_login_form"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical">
+
+            <android.support.design.widget.TextInputLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+
+                <AutoCompleteTextView
+                    android:id="@+id/email"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:fontFamily="@font/play_regular"
+                    android:hint="@string/prompt_email"
+                    android:inputType="textEmailAddress"
+                    android:maxLines="1"
+                    android:singleLine="true" />
+
+            </android.support.design.widget.TextInputLayout>
+
+            <android.support.design.widget.TextInputLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+
+                <EditText
+                    android:id="@+id/password"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:fontFamily="@font/play_regular"
+                    android:hint="@string/prompt_password"
+                    android:imeActionId="6"
+                    android:imeActionLabel="@string/action_sign_in_short"
+                    android:imeOptions="actionUnspecified"
+                    android:inputType="textPassword"
+                    android:maxLines="1"
+                    android:singleLine="true" />
+
+            </android.support.design.widget.TextInputLayout>
+
+            <Button
+                android:id="@+id/email_sign_in_button"
+                style="?android:textAppearanceSmall"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="16dp"
+                android:fontFamily="@font/play_regular"
+                android:text="@string/action_sign_in"
+                android:textStyle="bold" />
+
+        </LinearLayout>
+    </ScrollView>
+</LinearLayout>

+ 26 - 0
feature/src/main/res/layout/activity_main.xml

@@ -0,0 +1,26 @@
+<?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:layout_marginTop="0dp"
+        android:fitsSystemWindows="false"
+        app:headerLayout="@layout/nav_header_main"
+        app:menu="@menu/activity_main_drawer" />
+
+</android.support.v4.widget.DrawerLayout>

+ 35 - 0
feature/src/main/res/layout/app_bar_main.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.design.widget.CoordinatorLayout 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=".MainActivity">
+
+    <android.support.design.widget.AppBarLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:theme="@style/AppTheme.AppBarOverlay">
+
+        <android.support.v7.widget.Toolbar
+            android:id="@+id/toolbar"
+            android:layout_width="match_parent"
+            android:layout_height="48dp"
+            android:background="?attr/colorPrimary"
+            app:popupTheme="@style/AppTheme.PopupOverlay" />
+
+    </android.support.design.widget.AppBarLayout>
+
+    <include layout="@layout/content_main" />
+
+    <android.support.design.widget.FloatingActionButton
+        android:id="@+id/fab"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="bottom|end"
+        android:layout_margin="@dimen/fab_margin"
+        android:visibility="invisible"
+        app:rippleColor="@color/colorPrimary"
+        app:srcCompat="@android:drawable/ic_dialog_email" />
+
+</android.support.design.widget.CoordinatorLayout>

+ 61 - 0
feature/src/main/res/layout/content_main.xml

@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout 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/content_main"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/colorBackground"
+    android:minHeight="152dp"
+    app:layout_behavior="@string/appbar_scrolling_view_behavior"
+    tools:context=".MainActivity"
+    tools:showIn="@layout/app_bar_main">
+
+    <ScrollView
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent">
+
+        <LinearLayout
+            android:id="@+id/content_layout"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical"
+            android:theme="@style/AppTheme">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:background="@color/colorWhite"
+                android:orientation="vertical"
+                android:padding="10dp">
+
+                <TextView
+                    android:id="@+id/textView2"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:fontFamily="@font/play_regular"
+                    android:text="date" />
+
+                <TextView
+                    android:id="@+id/textView3"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:fontFamily="@font/play_regular"
+                    android:text="Турнир по мини-футболу" />
+
+                <TextView
+                    android:id="@+id/textView4"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="right|center_vertical"
+                    android:text="10 октября 2018 года на базе Далматовского филиала «КТК» был проведен турнир по мини-футболу памяти Андрея Чащина. Организаторами турнира выступили Администрация Далматовского филиала «КТК» и ДРОО " />
+
+            </LinearLayout>
+        </LinearLayout>
+    </ScrollView>
+
+</android.support.constraint.ConstraintLayout>

+ 68 - 0
feature/src/main/res/layout/nav_header_main.xml

@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<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:layout_width="match_parent"
+    android:layout_height="@dimen/nav_header_height"
+    android:background="@drawable/side_nav_bar"
+    android:gravity="top"
+    android:orientation="vertical"
+    android:paddingLeft="@dimen/activity_horizontal_margin"
+    android:paddingTop="@dimen/activity_vertical_margin"
+    android:paddingRight="@dimen/activity_horizontal_margin"
+    android:paddingBottom="@dimen/activity_vertical_margin"
+    android:theme="@style/ThemeOverlay.AppCompat.Dark">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="top|fill_horizontal"
+        android:orientation="horizontal">
+
+        <ImageView
+            android:id="@+id/nav_imageAvatar"
+            android:layout_width="100dp"
+            android:layout_height="100dp"
+            android:layout_gravity="center_vertical|start"
+            android:background="@color/colorGray"
+            android:contentDescription="@string/nav_imgAvatarDesc" />
+
+        <TextView
+            android:id="@+id/nav_textUser"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:fontFamily="@font/play_regular"
+            android:gravity="center_vertical|end"
+            android:text="@string/nav_guest_str"
+            android:textColor="@color/colorWhite"
+            android:textSize="14sp" />
+    </LinearLayout>
+
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:fontFamily="@font/play_bold"
+        android:paddingTop="@dimen/nav_header_vertical_spacing"
+        android:shadowColor="@color/colorBlack"
+        android:shadowDx="2"
+        android:shadowDy="2"
+        android:shadowRadius="4"
+        android:text="@string/nav_header_title"
+        android:textAlignment="viewEnd"
+        android:textAppearance="@style/TextAppearance.AppCompat.Body1"
+        android:textColor="@color/colorWhite"
+        android:textSize="26sp" />
+
+    <TextView
+        android:id="@+id/textView"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:fontFamily="@font/play_regular"
+        android:text="@string/nav_header_subtitle"
+        android:textAlignment="viewEnd"
+        android:textAllCaps="false"
+        android:textColor="@color/colorWhite"
+        android:textSize="14sp"
+        android:textStyle="italic" />
+
+</LinearLayout>

+ 29 - 0
feature/src/main/res/menu/activity_main_drawer.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    tools:showIn="navigation_view">
+
+    <group android:checkableBehavior="single">
+        <item
+            android:id="@+id/nav_news"
+            android:title="@string/nav_news_str" />
+        <item
+            android:id="@+id/nav_schedule"
+            android:title="@string/nav_schedule_str" />
+        <item
+            android:id="@+id/nav_schedule_call"
+            android:title="@string/nav_schedule_call_str" />
+        <item
+            android:id="@+id/nav_manage"
+            android:title="@string/nav_manage_str" />
+    </group>
+
+    <item android:title="@string/nav_feedback_str">
+        <menu>
+            <item
+                android:id="@+id/nav_send"
+                android:title="@string/nav_send_str" />
+        </menu>
+    </item>
+
+</menu>

+ 9 - 0
feature/src/main/res/menu/main.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto">
+    <item
+        android:id="@+id/action_settings"
+        android:orderInCategory="100"
+        android:title="@string/action_settings"
+        app:showAsAction="never" />
+</menu>

+ 5 - 0
feature/src/main/res/values-v21/strings.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="nav_guest_str">Гостевой сеанс</string>
+    <string name="nav_imgAvatarDesc">Аватарка пользователя</string>
+</resources>

+ 8 - 0
feature/src/main/res/values-v21/styles.xml

@@ -0,0 +1,8 @@
+<resources>
+
+    <style name="AppTheme.NoActionBar">
+        <item name="windowActionBar">false</item>
+        <item name="windowNoTitle">true</item>
+        <item name="android:statusBarColor">@android:color/transparent</item>
+    </style>
+</resources>

+ 13 - 0
feature/src/main/res/values/colors.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <color name="colorPrimary">#666699</color>
+    <color name="colorPrimaryDark">#222277</color>
+    <color name="colorAccent">#e91e63</color>
+    <color name="colorWhite">#ffffff</color>
+    <color name="colorBlack">#000000</color>
+    <color name="colorSecondary">#cc0000</color>
+    <color name="colorBackground">#e0e0e0</color>
+    <color name="colorGray">#9e9e9e</color>
+    <color name="colorTeacher">#203546</color>
+    <color name="colorSchHead">#0c0c42</color>
+</resources>

+ 8 - 0
feature/src/main/res/values/dimens.xml

@@ -0,0 +1,8 @@
+<resources>
+    <!-- Default screen margins, per the Android Design guidelines. -->
+    <dimen name="activity_horizontal_margin">16dp</dimen>
+    <dimen name="activity_vertical_margin">16dp</dimen>
+    <dimen name="nav_header_vertical_spacing">8dp</dimen>
+    <dimen name="nav_header_height">276dp</dimen>
+    <dimen name="fab_margin">16dp</dimen>
+</resources>

+ 7 - 0
feature/src/main/res/values/drawables.xml

@@ -0,0 +1,7 @@
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+    <item name="ic_menu_news" type="drawable">@android:drawable/ic_menu_camera</item>
+    <item name="ic_menu_schedule" type="drawable">@android:drawable/ic_menu_gallery</item>
+    <item name="ic_menu_schedule_call" type="drawable">@android:drawable/ic_menu_slideshow</item>
+    <item name="ic_menu_manage" type="drawable">@android:drawable/ic_menu_manage</item>
+    <item name="ic_menu_send" type="drawable">@android:drawable/ic_menu_send</item>
+</resources>

+ 36 - 0
feature/src/main/res/values/strings.xml

@@ -0,0 +1,36 @@
+<resources>
+    <!-- Strings related to login -->
+    <string name="prompt_email">Идентификатор</string>
+    <string name="prompt_password">Пароль</string>
+    <string name="action_sign_in">Войти</string>
+    <string name="action_sign_in_short">Войти</string>
+    <string name="error_invalid_login">Неверный формат</string>
+    <string name="error_invalid_password">Слишком короткий пароль</string>
+    <string name="error_incorrect_password">Некорректный пароль</string>
+    <string name="error_field_required">Необходимо ввести идентификатор</string>
+    <string name="permission_rationale">"Contacts permissions are needed for providing email completions."</string>
+    <string name="navigation_drawer_open">Open navigation drawer</string>
+    <string name="navigation_drawer_close">Close navigation drawer</string>
+    <string name="nav_header_title">Курганский технологический колледж</string>
+    <string name="nav_header_subtitle">Обучаем каждого, профессионально - всех!</string>
+    <string name="nav_header_desc">Navigation header</string>
+    <string name="action_settings">Settings</string>
+    <string name="nav_news_str">Новости</string>
+    <string name="nav_schedule_str">Расписание занятий</string>
+    <string name="nav_schedule_call_str">Расписание звонков</string>
+    <string name="nav_manage_str">Настройки</string>
+    <string name="nav_send_str">Оставить отзыв</string>
+    <string name="nav_feedback_str">Обратная связь</string>
+    <string name="nav_guest_str">Гостевой сеанс</string>
+    <string name="nav_imgAvatarDesc">Аватарка пользователя</string>
+
+    <string-array name="branches">
+        <item>default</item>
+    </string-array>
+
+    <string name="sch_container">sch_container</string>
+    <string name="branch_label">Подразделение:</string>
+    <string name="sch_branch">sch_branch</string>
+    <string name="group_label">Группа:</string>
+
+</resources>

+ 17 - 0
feature/src/test/java/ru/ktk45/www/feature/ExampleUnitTest.java

@@ -0,0 +1,17 @@
+package ru.ktk45.www.feature;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+public class ExampleUnitTest {
+    @Test
+    public void addition_isCorrect() {
+        assertEquals(4, 2 + 2);
+    }
+}

+ 14 - 0
gradle.properties

@@ -0,0 +1,14 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx1536m
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+

BIN
gradle/wrapper/gradle-wrapper.jar


+ 5 - 0
gradle/wrapper/gradle-wrapper.properties

@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists

+ 172 - 0
gradlew

@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+    echo "$*"
+}
+
+die () {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+  NONSTOP* )
+    nonstop=true
+    ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Escape application args
+save () {
+    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+    echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+  cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"

+ 84 - 0
gradlew.bat

@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega

+ 1 - 0
instantapp/.gitignore

@@ -0,0 +1 @@
+/build

+ 17 - 0
instantapp/build.gradle

@@ -0,0 +1,17 @@
+apply plugin: 'com.android.instantapp'
+
+dependencies {
+    implementation project(':feature')
+    implementation project(':base')
+}
+
+android {
+    compileSdkVersion 27
+    buildToolsVersion '28.0.3'
+    defaultConfig {
+        minSdkVersion 19
+        targetSdkVersion 25
+    }
+    productFlavors {
+    }
+}

+ 1 - 0
settings.gradle

@@ -0,0 +1 @@
+include ':feature', ':app', ':base', ':instantapp'