diff --git a/MaterialThemeBuilder/README.md b/MaterialThemeBuilder/README.md
deleted file mode 100644
index 7d172a0a..00000000
--- a/MaterialThemeBuilder/README.md
+++ /dev/null
@@ -1,34 +0,0 @@
-## Build a Material Theme
-Build a Material Theme lets you create your own Material theme by customizing values for color, typography, and shape. See how these values appear when applied to Material Components and discover how to implement your custom theme in your own projects. Build a Material Theme is also available for the web as a remixable project on [Glitch](https://glitch.com/~material-theme-builder).
-
-## Overview
-Material Components for Android supports Material Theming by exposing top level theme attributes for color, typography and shape. Customizing these attributes will apply your custom theme throughout your entire app.
-
-This project shows how you can organize and use your theme and style resources to take advantage of the robust support for theming in Material Components for Android.
-
-## Change values for typography, shape, and color
-By default, apps built with Material Components inherit our baseline theme values. To begin customizing, override properties in `color.xml`, `type.xml` and `shape.xml`. Each file includes detailed comments that illustrate how each subsystem can be customized.
-
-### type.xml
-To change your theme’s typography, we recommend using [Google Fonts](https://fonts.google.com/) and choosing a font family that best reflects your style. Set TextApperances to use your custom font and additional type properties to apply a custom type scale globally. [Learn how to add fonts in Android Studio](https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts)
-
-### shape.xml
-To systematically apply shape throughout your app, it helps to understand that components are grouped by size into categories of small, medium and large. The shape of each component size group can be themed by customizing its ShapeApperance style. We recommend using our [shape customization tool](https://material.io/design/shape/about-shape.html#shape-customization-tool) to help you pick your corner family and size values.
-
-### color.xml
-To change your theme's color scheme, replace the existing HEX color values with your custom HEX values. This project has both light and dark themes, toggle between them within the app to see your changes. Use our [color palette generator](https://material.io/design/color/the-color-system.html#tools-for-picking-colors) to help come up with pairings and check your color contrast.
-
-## Get Started
-Clone the material-components-android-examples repository
-
-```
-git clone https://github.com/material-components/material-components-android-examples.git
-```
-
-In Android Studio - Choose ‘Open an existing Android Studio Project’ and select ‘material-components-android-examples/MaterialThemeBuilder’
-
-Sync, build and run the project. The project, by default, will be configured with the baseline Material theme.
-
-Under the ‘res’ folder, open `color.xml`, `type.xml` and `shape.xml`. Each file has detailed comments describing the Material subsystem it controls. Try modifying each subsystem, re-running the app and seeing how changes are propagated throughout the app.
-
-Once you build your Material theme, move the theme resources (`color.xml`, `type.xml`, `shape.xml`, `styles.xml`, `themes.xml` and `night/themes.xml`) over to your app to start using your Material theme in your own projects.
diff --git a/MaterialThemeBuilder/app/build.gradle b/MaterialThemeBuilder/app/build.gradle
deleted file mode 100644
index 4387a014..00000000
--- a/MaterialThemeBuilder/app/build.gradle
+++ /dev/null
@@ -1,44 +0,0 @@
-apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
-
-android {
- compileSdkVersion 29
- defaultConfig {
- applicationId "io.material.materialthemebuilder"
- minSdkVersion 23
- targetSdkVersion 29
- versionCode 1
- versionName "1.0"
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- }
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
- compileOptions {
- sourceCompatibility = 1.8
- targetCompatibility = 1.8
- }
- kotlinOptions {
- jvmTarget = "1.8"
- }
-}
-
-dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
-
- // Kotlin
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
-
- // AndroidX
- implementation 'androidx.appcompat:appcompat:1.1.0'
- implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
- implementation 'androidx.legacy:legacy-support-v4:1.0.0'
- implementation 'androidx.recyclerview:recyclerview:1.2.0-alpha01'
- implementation 'androidx.core:core-ktx:1.1.0'
-
- //MDC
- implementation 'com.google.android.material:material:1.2.0-alpha03'
-}
diff --git a/MaterialThemeBuilder/app/proguard-rules.pro b/MaterialThemeBuilder/app/proguard-rules.pro
deleted file mode 100644
index f1b42451..00000000
--- a/MaterialThemeBuilder/app/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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
diff --git a/MaterialThemeBuilder/app/src/main/AndroidManifest.xml b/MaterialThemeBuilder/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 5d1010f9..00000000
--- a/MaterialThemeBuilder/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/ic_launcher-web.png b/MaterialThemeBuilder/app/src/main/ic_launcher-web.png
deleted file mode 100644
index ab7a270e..00000000
Binary files a/MaterialThemeBuilder/app/src/main/ic_launcher-web.png and /dev/null differ
diff --git a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/App.kt b/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/App.kt
deleted file mode 100644
index c65effd2..00000000
--- a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/App.kt
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.material.materialthemebuilder
-
-import android.app.Application
-import android.content.Context
-import io.material.materialthemebuilder.data.PreferenceRepository
-
-class App : Application() {
-
- lateinit var preferenceRepository: PreferenceRepository
-
- override fun onCreate() {
- super.onCreate()
- preferenceRepository = PreferenceRepository(
- getSharedPreferences(DEFAULT_PREFERENCES, Context.MODE_PRIVATE)
- )
- }
-
- companion object {
- const val DEFAULT_PREFERENCES = "default_preferences"
- }
-}
diff --git a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/data/PreferenceRepository.kt b/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/data/PreferenceRepository.kt
deleted file mode 100644
index f12c0eaa..00000000
--- a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/data/PreferenceRepository.kt
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.material.materialthemebuilder.data
-
-import android.content.SharedPreferences
-import androidx.appcompat.app.AppCompatDelegate
-import androidx.lifecycle.LiveData
-import androidx.lifecycle.MutableLiveData
-
-/**
- * A simple data repository for in-app settings.
- */
-class PreferenceRepository(private val sharedPreferences: SharedPreferences) {
-
- val nightMode: Int
- get() = sharedPreferences.getInt(PREFERENCE_NIGHT_MODE, PREFERENCE_NIGHT_MODE_DEF_VAL)
-
- private val _nightModeLive: MutableLiveData = MutableLiveData()
- val nightModeLive: LiveData
- get() = _nightModeLive
-
- var isDarkTheme: Boolean = false
- get() = nightMode == AppCompatDelegate.MODE_NIGHT_YES
- set(value) {
- sharedPreferences.edit().putInt(PREFERENCE_NIGHT_MODE, if (value) {
- AppCompatDelegate.MODE_NIGHT_YES
- } else {
- AppCompatDelegate.MODE_NIGHT_NO
- }).apply()
- field = value
- }
-
- private val _isDarkThemeLive: MutableLiveData = MutableLiveData()
- val isDarkThemeLive: LiveData
- get() = _isDarkThemeLive
-
- private val preferenceChangedListener =
- SharedPreferences.OnSharedPreferenceChangeListener { _, key ->
- when (key) {
- PREFERENCE_NIGHT_MODE -> {
- _nightModeLive.value = nightMode
- _isDarkThemeLive.value = isDarkTheme
- }
- }
- }
-
- init {
- // Init preference LiveData objects.
- _nightModeLive.value = nightMode
- _isDarkThemeLive.value = isDarkTheme
-
- sharedPreferences.registerOnSharedPreferenceChangeListener(preferenceChangedListener)
- }
-
- companion object {
- private const val PREFERENCE_NIGHT_MODE = "preference_night_mode"
- private const val PREFERENCE_NIGHT_MODE_DEF_VAL = AppCompatDelegate.MODE_NIGHT_NO
- }
-}
diff --git a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/MainActivity.kt b/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/MainActivity.kt
deleted file mode 100644
index 7482621f..00000000
--- a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/MainActivity.kt
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.material.materialthemebuilder.ui
-
-import androidx.appcompat.app.AppCompatActivity
-import android.os.Bundle
-import androidx.lifecycle.Observer
-import com.google.android.material.tabs.TabLayout
-import androidx.viewpager.widget.ViewPager
-import io.material.materialthemebuilder.R
-import io.material.materialthemebuilder.App
-import io.material.materialthemebuilder.ui.instruction.InstructionsFragment
-import io.material.materialthemebuilder.ui.themesummary.ThemeSummaryFragment
-import io.material.materialthemebuilder.ui.component.ComponentFragment
-
-/**
- * Single activity which contains the [MainViewPagerAdapter] that shows the [InstructionsFragment],
- * [ThemeSummaryFragment] and [ComponentFragment].
- */
-class MainActivity : AppCompatActivity() {
-
- private lateinit var viewPager: ViewPager
- private lateinit var tabLayout: TabLayout
-
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContentView(R.layout.activity_main)
- viewPager = findViewById(R.id.view_pager)
- tabLayout = findViewById(R.id.tab_layout)
-
- tabLayout.setupWithViewPager(viewPager)
- val adapter = MainViewPagerAdapter(this, supportFragmentManager)
- viewPager.adapter = adapter
-
- (application as App).preferenceRepository
- .nightModeLive.observe(this, Observer { nightMode ->
- nightMode?.let { delegate.localNightMode = it }
- }
- )
- }
-}
diff --git a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/MainViewPagerAdapter.kt b/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/MainViewPagerAdapter.kt
deleted file mode 100644
index 20f6a2b9..00000000
--- a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/MainViewPagerAdapter.kt
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.material.materialthemebuilder.ui
-
-import android.content.Context
-import androidx.fragment.app.Fragment
-import androidx.fragment.app.FragmentManager
-import androidx.fragment.app.FragmentStatePagerAdapter
-import io.material.materialthemebuilder.R
-import io.material.materialthemebuilder.ui.component.ComponentFragment
-import io.material.materialthemebuilder.ui.instruction.InstructionsFragment
-import io.material.materialthemebuilder.ui.themesummary.ThemeSummaryFragment
-
-/**
- * View pager to show all tabbed destinations - Instructions, Theme Summary and Components.
- */
-class MainViewPagerAdapter(
- private val context: Context,
- fragmentManager: FragmentManager
-) : FragmentStatePagerAdapter(fragmentManager) {
-
- enum class MainFragments(val titleRes: Int) {
- INSTRUCTIONS(R.string.tab_title_instructions),
- THEME_SUMMARY(R.string.tab_title_theme_summary),
- COMPONENTS(R.string.tab_title_components)
- }
-
- override fun getCount(): Int = MainFragments.values().size
-
- private fun getItemType(position: Int): MainFragments {
- return MainFragments.values()[position]
- }
-
- override fun getPageTitle(position: Int): CharSequence? {
- return context.getString(getItemType(position).titleRes)
- }
-
- override fun getItem(position: Int): Fragment {
- return when (getItemType(position)) {
- MainFragments.INSTRUCTIONS -> InstructionsFragment()
- MainFragments.THEME_SUMMARY -> ThemeSummaryFragment()
- MainFragments.COMPONENTS -> ComponentFragment()
- }
- }
-}
diff --git a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/component/BottomSheetFragment.kt b/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/component/BottomSheetFragment.kt
deleted file mode 100644
index 81d46fad..00000000
--- a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/component/BottomSheetFragment.kt
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.material.materialthemebuilder.ui.component
-
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import com.google.android.material.bottomsheet.BottomSheetDialogFragment
-import io.material.materialthemebuilder.R
-
-/**
- * A simple Modal Bottom Sheet.
- */
-class BottomSheetFragment : BottomSheetDialogFragment() {
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View? {
- return inflater.inflate(R.layout.fragment_bottom_sheet, container, false)
- }
-
- companion object {
- const val FRAGMENT_TAG = "bottom_sheet_fragment_tag"
- }
-}
diff --git a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/component/Component.kt b/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/component/Component.kt
deleted file mode 100644
index a162d535..00000000
--- a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/component/Component.kt
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.material.materialthemebuilder.ui.component
-
-/**
- * Enumeration of all components to be displayed by [ComponentAdapter].
- *
- * All components in this enum will be shown by [ComponentAdapter]. The order of the components
- * here will be the order they are displayed in by [ComponentAdapter].
- */
-enum class Component {
- BUTTON,
- FAB,
- CARD,
- TOP_APP_BAR,
- CHIP,
- DRAWER,
- TEXT_FIELD,
- BOTTOM_NAVIGATION,
- SWITCH,
- RADIO_BUTTON,
- CHECKBOX,
- BOTTOM_APP_BAR,
- TABS,
- SNACKBAR,
- DIALOG,
- BOTTOM_SHEET
-}
diff --git a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/component/ComponentAdapter.kt b/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/component/ComponentAdapter.kt
deleted file mode 100644
index d8a88530..00000000
--- a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/component/ComponentAdapter.kt
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.material.materialthemebuilder.ui.component
-
-import android.view.ViewGroup
-import androidx.recyclerview.widget.DiffUtil
-import androidx.recyclerview.widget.ListAdapter
-
-/**
- * An adapter to display all [Component]s using their corresponding [ComponentViewHolder].
- */
-class ComponentAdapter(
- private val listener: ComponentAdapterListener
-) : ListAdapter(DIFF_CALLBACK) {
-
- interface ComponentAdapterListener {
- fun onShowBottomSheetClicked()
- }
-
- override fun getItemViewType(position: Int): Int = getItem(position).ordinal
-
- override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ComponentViewHolder {
- return ComponentViewHolder.create(parent, viewType, listener)
- }
-
- override fun onBindViewHolder(holder: ComponentViewHolder, position: Int) {
- holder.bind(getItem(position))
- }
-
- companion object {
- private val DIFF_CALLBACK = object : DiffUtil.ItemCallback() {
- override fun areItemsTheSame(oldItem: Component, newItem: Component): Boolean {
- return oldItem == newItem
- }
- override fun areContentsTheSame(oldItem: Component, newItem: Component): Boolean {
- return oldItem == newItem
- }
- }
- }
-}
diff --git a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/component/ComponentFragment.kt b/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/component/ComponentFragment.kt
deleted file mode 100644
index 6db56fdf..00000000
--- a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/component/ComponentFragment.kt
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.material.materialthemebuilder.ui.component
-
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.fragment.app.Fragment
-import androidx.recyclerview.widget.RecyclerView
-import androidx.recyclerview.widget.LinearLayoutManager
-import io.material.materialthemebuilder.R
-
-/**
- * Fragment to hold a list of all [Component]s.
- */
-class ComponentFragment : Fragment(), ComponentAdapter.ComponentAdapterListener {
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View? {
- return inflater.inflate(R.layout.fragment_component, container, false)
- }
-
- override fun onViewCreated(view: View, savedInstanceBundle: Bundle?) {
- super.onViewCreated(view, savedInstanceBundle)
-
- val recyclerView: RecyclerView = view.findViewById(R.id.recycler_view)
- val adapter = ComponentAdapter(this)
- recyclerView.layoutManager = LinearLayoutManager(requireContext())
- recyclerView.adapter = adapter
- adapter.submitList(Component.values().toList())
- }
-
- override fun onShowBottomSheetClicked() {
- BottomSheetFragment().show(requireFragmentManager(), BottomSheetFragment.FRAGMENT_TAG)
- }
-}
diff --git a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/component/ComponentViewHolder.kt b/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/component/ComponentViewHolder.kt
deleted file mode 100644
index f340f966..00000000
--- a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/component/ComponentViewHolder.kt
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Copyright 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.material.materialthemebuilder.ui.component
-
-import android.view.Gravity
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.FrameLayout
-import androidx.core.content.ContextCompat
-import androidx.drawerlayout.widget.DrawerLayout
-import androidx.recyclerview.widget.RecyclerView
-import com.google.android.material.bottomappbar.BottomAppBar
-import com.google.android.material.button.MaterialButton
-import com.google.android.material.dialog.MaterialAlertDialogBuilder
-import com.google.android.material.navigation.NavigationView
-import com.google.android.material.snackbar.Snackbar
-import io.material.materialthemebuilder.R
-import io.material.materialthemebuilder.ui.component.Component.BUTTON
-import io.material.materialthemebuilder.ui.component.Component.FAB
-import io.material.materialthemebuilder.ui.component.Component.CARD
-import io.material.materialthemebuilder.ui.component.Component.TOP_APP_BAR
-import io.material.materialthemebuilder.ui.component.Component.CHIP
-import io.material.materialthemebuilder.ui.component.Component.DRAWER
-import io.material.materialthemebuilder.ui.component.Component.TEXT_FIELD
-import io.material.materialthemebuilder.ui.component.Component.BOTTOM_NAVIGATION
-import io.material.materialthemebuilder.ui.component.Component.SWITCH
-import io.material.materialthemebuilder.ui.component.Component.RADIO_BUTTON
-import io.material.materialthemebuilder.ui.component.Component.CHECKBOX
-import io.material.materialthemebuilder.ui.component.Component.BOTTOM_APP_BAR
-import io.material.materialthemebuilder.ui.component.Component.TABS
-import io.material.materialthemebuilder.ui.component.Component.SNACKBAR
-import io.material.materialthemebuilder.ui.component.Component.DIALOG
-import io.material.materialthemebuilder.ui.component.Component.BOTTOM_SHEET
-
-/**
- * Sealed class to define all [RecyclerView.ViewHolder]s used to display [Component]s.
- */
-sealed class ComponentViewHolder(val view: View) : RecyclerView.ViewHolder(view) {
-
- open fun bind(component: Component) {
- // Override in subclass if needed.
- }
-
- class ButtonComponentViewHolder(
- parent: ViewGroup
- ) : ComponentViewHolder(inflate(parent, R.layout.component_buttons))
-
- class FabComponentViewHolder(
- parent: ViewGroup
- ) : ComponentViewHolder(inflate(parent, R.layout.component_fabs))
-
- class CardComponentViewHolder(
- parent: ViewGroup
- ) : ComponentViewHolder(inflate(parent, R.layout.component_cards))
-
- class TopAppBarComponentViewHolder(
- parent: ViewGroup
- ) : ComponentViewHolder(inflate(parent, R.layout.component_top_app_bar))
-
- class ChipComponentViewHolder(
- parent: ViewGroup
- ) : ComponentViewHolder(inflate(parent, R.layout.component_chips))
-
- class DrawerComponentViewHolder(
- parent: ViewGroup
- ) : ComponentViewHolder(inflate(parent, R.layout.component_drawer)) {
- private val drawerLayout: DrawerLayout = view.findViewById(R.id.drawer_layout)
- private val navigationView: NavigationView = view.findViewById(R.id.nav_view)
-
- override fun bind(component: Component) {
- drawerLayout.openDrawer(Gravity.LEFT)
- navigationView.setNavigationItemSelectedListener { true }
- navigationView.setCheckedItem(R.id.nav_item_one)
- }
- }
-
- class TextFieldComponentViewHolder(
- parent: ViewGroup
- ) : ComponentViewHolder(inflate(parent, R.layout.component_text_field))
-
- class BottomNavigationComponentViewHolder(
- parent: ViewGroup
- ) : ComponentViewHolder(inflate(parent, R.layout.component_bottom_navigation))
-
- class SwitchComponentViewHolder(
- parent: ViewGroup
- ) : ComponentViewHolder(inflate(parent, R.layout.component_switch))
-
- class RadioButtonComponentViewHolder(
- parent: ViewGroup
- ) : ComponentViewHolder(inflate(parent, R.layout.component_radio_button))
-
- class CheckboxComponentViewHolder(
- parent: ViewGroup
- ) : ComponentViewHolder(inflate(parent, R.layout.component_checkbox))
-
- class BottomAppBarComponentViewHolder(
- parent: ViewGroup
- ) : ComponentViewHolder(inflate(parent, R.layout.component_bottom_app_bar)) {
- private val bottomAppBar: BottomAppBar = view.findViewById(R.id.bottom_app_bar)
-
- override fun bind(component: Component) {
- bottomAppBar.overflowIcon = ContextCompat.getDrawable(
- bottomAppBar.context,
- R.drawable.ic_more_vert_on_surface_24dp
- )
- }
- }
-
- class TabsComponentViewHolder(
- parent: ViewGroup
- ) : ComponentViewHolder(inflate(parent, R.layout.component_tabs))
-
- class SnackbarComponentViewHolder(
- parent: ViewGroup
- ) : ComponentViewHolder(inflate(parent, R.layout.component_snackbar)) {
-
- init {
- val container: FrameLayout = view.findViewById(R.id.snackbar_container)
- val snackbarView = Snackbar.make(
- container,
- R.string.snackbar_message_text,
- Snackbar.LENGTH_INDEFINITE
- )
- .setAction(R.string.snackbar_action_text) { }
- .view
- (snackbarView.layoutParams as FrameLayout.LayoutParams).gravity = Gravity.CENTER
-
- container.addView(snackbarView)
- }
- }
-
- class DialogComponentViewHolder(
- parent: ViewGroup
- ) : ComponentViewHolder(inflate(parent, R.layout.component_dialog)) {
- init {
- val button = view.findViewById(R.id.button)
- button.setOnClickListener {
- showDialog()
- }
- }
-
- private fun showDialog() {
- MaterialAlertDialogBuilder(view.context)
- .setTitle(R.string.text_headline_6)
- .setMessage(R.string.lorem_ipsum)
- .setPositiveButton(R.string.text_button, null)
- .setNegativeButton(R.string.text_button, null)
- .show()
- }
- }
-
- class BottomSheetComponentViewHolder(
- parent: ViewGroup,
- listener: ComponentAdapter.ComponentAdapterListener
- ) : ComponentViewHolder(inflate(parent, R.layout.component_bottom_sheet)) {
- init {
- view.findViewById(R.id.button).setOnClickListener {
- listener.onShowBottomSheetClicked()
- }
- }
- }
-
- companion object {
- fun create(
- parent: ViewGroup,
- viewType: Int,
- listener: ComponentAdapter.ComponentAdapterListener
- ): ComponentViewHolder {
- return when (Component.values()[viewType]) {
- BUTTON -> ComponentViewHolder.ButtonComponentViewHolder(parent)
- FAB -> ComponentViewHolder.FabComponentViewHolder(parent)
- CARD -> ComponentViewHolder.CardComponentViewHolder(parent)
- TOP_APP_BAR -> ComponentViewHolder.TopAppBarComponentViewHolder(parent)
- CHIP -> ComponentViewHolder.ChipComponentViewHolder(parent)
- DRAWER -> ComponentViewHolder.DrawerComponentViewHolder(parent)
- TEXT_FIELD -> ComponentViewHolder.TextFieldComponentViewHolder(parent)
- BOTTOM_NAVIGATION -> ComponentViewHolder.BottomNavigationComponentViewHolder(parent)
- SWITCH -> ComponentViewHolder.SwitchComponentViewHolder(parent)
- RADIO_BUTTON -> ComponentViewHolder.RadioButtonComponentViewHolder(parent)
- CHECKBOX -> ComponentViewHolder.CheckboxComponentViewHolder(parent)
- BOTTOM_APP_BAR -> ComponentViewHolder.BottomAppBarComponentViewHolder(parent)
- TABS -> ComponentViewHolder.TabsComponentViewHolder(parent)
- SNACKBAR -> ComponentViewHolder.SnackbarComponentViewHolder(parent)
- DIALOG -> ComponentViewHolder.DialogComponentViewHolder(parent)
- BOTTOM_SHEET -> ComponentViewHolder.BottomSheetComponentViewHolder(parent, listener)
- }
- }
-
- private fun inflate(parent: ViewGroup, layout: Int): View {
- return LayoutInflater.from(parent.context).inflate(layout, parent, false)
- }
- }
-}
diff --git a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/instruction/InstructionsFragment.kt b/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/instruction/InstructionsFragment.kt
deleted file mode 100644
index ec204ae6..00000000
--- a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/instruction/InstructionsFragment.kt
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.material.materialthemebuilder.ui.instruction
-
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.fragment.app.Fragment
-import androidx.lifecycle.Observer
-import com.google.android.material.switchmaterial.SwitchMaterial
-import io.material.materialthemebuilder.App
-import io.material.materialthemebuilder.R
-
-/**
- * Fragment to display static instructions text and in-app theming options.
- */
-class InstructionsFragment : Fragment() {
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View? {
- return inflater.inflate(R.layout.fragment_instructions, container, false)
- }
-
- override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
- super.onViewCreated(view, savedInstanceState)
- val darkThemeSwitch: SwitchMaterial = view.findViewById(R.id.dark_theme_switch)
- val preferenceRepository = (requireActivity().application as App).preferenceRepository
-
- preferenceRepository.isDarkThemeLive.observe(this, Observer { isDarkTheme ->
- isDarkTheme?.let { darkThemeSwitch.isChecked = it }
- })
-
- darkThemeSwitch.setOnCheckedChangeListener { _, checked ->
- preferenceRepository.isDarkTheme = checked
- }
- }
-}
diff --git a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/themesummary/SubsystemAdapter.kt b/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/themesummary/SubsystemAdapter.kt
deleted file mode 100644
index 518e0af5..00000000
--- a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/themesummary/SubsystemAdapter.kt
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.material.materialthemebuilder.ui.themesummary
-
-import android.view.ViewGroup
-import androidx.recyclerview.widget.DiffUtil
-import androidx.recyclerview.widget.ListAdapter
-
-/**
- * Adapter to display [Subsystem]s using their corresponding [SubsystemViewHolder].
- */
-class SubsystemAdapter : ListAdapter(DIFF_CALLBACK) {
-
- override fun getItemViewType(position: Int): Int = getItem(position).ordinal
-
- override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): SubsystemViewHolder {
- return SubsystemViewHolder.create(parent, viewType)
- }
-
- override fun onBindViewHolder(holder: SubsystemViewHolder, position: Int) {
- holder.bind(getItem(position))
- }
-
- companion object {
- private val DIFF_CALLBACK = object : DiffUtil.ItemCallback() {
- override fun areItemsTheSame(oldItem: Subsystem, newItem: Subsystem): Boolean {
- return oldItem == newItem
- }
- override fun areContentsTheSame(oldItem: Subsystem, newItem: Subsystem): Boolean {
- return oldItem == newItem
- }
- }
- }
-}
diff --git a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/themesummary/SubsystemViewHolder.kt b/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/themesummary/SubsystemViewHolder.kt
deleted file mode 100644
index 919cad14..00000000
--- a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/themesummary/SubsystemViewHolder.kt
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.material.materialthemebuilder.ui.themesummary
-
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.recyclerview.widget.RecyclerView
-import io.material.materialthemebuilder.R
-import io.material.materialthemebuilder.ui.themesummary.Subsystem.COLOR
-import io.material.materialthemebuilder.ui.themesummary.Subsystem.TYPE
-import io.material.materialthemebuilder.ui.themesummary.Subsystem.SHAPE
-
-/**
- * Sealed class to define all [RecyclerView.ViewHolder]s used to display [Subsystem]s.
- */
-sealed class SubsystemViewHolder(val view: View) : RecyclerView.ViewHolder(view) {
-
- open fun bind(subsystem: Subsystem) {
- // Override in subclass if needed.
- }
-
- class ColorSubsystemViewHolder(
- parent: ViewGroup
- ) : SubsystemViewHolder(inflate(parent, R.layout.subsystem_color))
-
- class TypeSubsystemViewHolder(
- parent: ViewGroup
- ) : SubsystemViewHolder(inflate(parent, R.layout.subsystem_type))
-
- class ShapeSubsystemViewHolder(
- parent: ViewGroup
- ) : SubsystemViewHolder(inflate(parent, R.layout.subsystem_shape))
-
- companion object {
- fun create(parent: ViewGroup, viewType: Int): SubsystemViewHolder {
- return when (Subsystem.values()[viewType]) {
- COLOR -> SubsystemViewHolder.ColorSubsystemViewHolder(parent)
- TYPE -> SubsystemViewHolder.TypeSubsystemViewHolder(parent)
- SHAPE -> SubsystemViewHolder.ShapeSubsystemViewHolder(parent)
- }
- }
-
- private fun inflate(parent: ViewGroup, layout: Int): View {
- return LayoutInflater.from(parent.context).inflate(layout, parent, false)
- }
- }
-}
diff --git a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/themesummary/ThemeSummaryFragment.kt b/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/themesummary/ThemeSummaryFragment.kt
deleted file mode 100644
index a709a2ec..00000000
--- a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/themesummary/ThemeSummaryFragment.kt
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.material.materialthemebuilder.ui.themesummary
-
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.fragment.app.Fragment
-import androidx.recyclerview.widget.LinearLayoutManager
-import androidx.recyclerview.widget.RecyclerView
-import io.material.materialthemebuilder.R
-
-/**
- * Fragment to display a list of subsystems that show the values of this app's theme.
- */
-class ThemeSummaryFragment : Fragment() {
-
- override fun onCreateView(
- inflater: LayoutInflater,
- container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View? {
- return inflater.inflate(R.layout.fragment_theme_summary, container, false)
- }
-
- override fun onViewCreated(view: View, savedInstanceBundle: Bundle?) {
- super.onViewCreated(view, savedInstanceBundle)
-
- val adapter = SubsystemAdapter()
- val recyclerView: RecyclerView = view.findViewById(R.id.recycler_view)
- recyclerView.layoutManager = LinearLayoutManager(requireContext())
- recyclerView.adapter = adapter
- adapter.submitList(Subsystem.values().toList())
- }
-}
diff --git a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/widget/ColorAttributeView.kt b/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/widget/ColorAttributeView.kt
deleted file mode 100644
index 88a273b6..00000000
--- a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/widget/ColorAttributeView.kt
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.material.materialthemebuilder.widget
-
-import android.content.Context
-import android.graphics.Color
-import android.util.AttributeSet
-import android.view.View
-import android.widget.FrameLayout
-import androidx.appcompat.widget.AppCompatTextView
-import io.material.materialthemebuilder.R
-
-/**
- * Composite view to show an item containing a text label and a [ColorDotView].
- */
-class ColorAttributeView @JvmOverloads constructor(
- context: Context,
- attrs: AttributeSet? = null,
- defStyleAttr: Int = 0,
- defStyleRes: Int = 0
-) : FrameLayout(context, attrs, defStyleAttr, defStyleRes) {
-
- private val colorAttributeTextView: AppCompatTextView
- private val colorDotView: ColorDotView
-
- private var attributeText: String = ""
- set(value) {
- colorAttributeTextView.text = value
- field = value
- }
-
- private var dotFillColor: Int = Color.LTGRAY
- set(value) {
- colorDotView.fillColor = value
- field = value
- }
-
- private var dotStrokeColor: Int = Color.DKGRAY
- set(value) {
- colorDotView.strokeColor = value
- field = value
- }
-
- init {
- val view = View.inflate(context, R.layout.color_attribute_view_layout, this)
- colorAttributeTextView = view.findViewById(R.id.color_attribute)
- colorDotView = view.findViewById(R.id.color_dot)
-
- val a = context.theme.obtainStyledAttributes(
- attrs,
- R.styleable.ColorAttributeView,
- defStyleAttr,
- defStyleRes
- )
- attributeText = a.getString(
- R.styleable.ColorAttributeView_android_text
- ) ?: attributeText
- dotFillColor = a.getColor(R.styleable.ColorAttributeView_colorFillColor, dotFillColor)
- dotStrokeColor = a.getColor(
- R.styleable.ColorAttributeView_colorStrokeColor,
- dotStrokeColor
- )
- a.recycle()
- }
-}
diff --git a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/widget/ColorDotView.kt b/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/widget/ColorDotView.kt
deleted file mode 100644
index 02941a9e..00000000
--- a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/widget/ColorDotView.kt
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.material.materialthemebuilder.widget
-
-import android.content.Context
-import android.graphics.Canvas
-import android.graphics.Color
-import android.graphics.Paint
-import android.util.AttributeSet
-import android.view.View
-import io.material.materialthemebuilder.R
-
-/**
- * Simple view that draws a filled circle with a stroke.
- */
-class ColorDotView @JvmOverloads constructor(
- context: Context,
- attrs: AttributeSet? = null,
- defStyleAttr: Int = 0
-) : View(context, attrs, defStyleAttr) {
-
- var fillColor: Int = Color.LTGRAY
- set(value) {
- paintFill.color = value
- field = value
- }
-
- var strokeColor: Int = Color.DKGRAY
- set(value) {
- paintStroke.color = value
- field = value
- }
-
- private val paintFill = Paint(Paint.ANTI_ALIAS_FLAG).apply {
- style = Paint.Style.FILL
- color = Color.RED
- }
-
- private val paintStroke = Paint(Paint.ANTI_ALIAS_FLAG).apply {
- style = Paint.Style.STROKE
- color = Color.BLACK
- }
-
- private var cx: Float = 0F
- private var cy: Float = 0F
- private var radius: Float = 0F
-
- init {
- val a = context.theme.obtainStyledAttributes(
- attrs,
- R.styleable.ColorDotView,
- defStyleAttr,
- 0
- )
- fillColor = a.getColor(R.styleable.ColorDotView_colorFillColor, fillColor)
- strokeColor = a.getColor(R.styleable.ColorDotView_colorStrokeColor, strokeColor)
- a.recycle()
- }
-
- override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
- super.onSizeChanged(w, h, oldw, oldh)
- cx = w / 2F
- cy = h / 2F
- // Decreases our circle's radius slightly so our stroke doesn't get clipped.
- radius = (w / 2F) - 1F
- }
-
- override fun onDraw(canvas: Canvas) {
- canvas.drawCircle(cx, cy, radius, paintFill)
- canvas.drawCircle(cx, cy, radius, paintStroke)
- }
-}
diff --git a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/widget/LabelLinkView.kt b/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/widget/LabelLinkView.kt
deleted file mode 100644
index ddf8a81a..00000000
--- a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/widget/LabelLinkView.kt
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.material.materialthemebuilder.widget
-
-import android.content.Context
-import android.content.Intent
-import android.graphics.drawable.Drawable
-import android.net.Uri
-import android.util.AttributeSet
-import android.view.View
-import android.widget.LinearLayout
-import androidx.appcompat.widget.AppCompatTextView
-import androidx.appcompat.widget.AppCompatImageView
-import io.material.materialthemebuilder.R
-
-/**
- * Composite view to show an (optional) leading icon, followed by a text label, followed by
- * a trailing icon.
- *
- * Clicking on this view's trailing icon will launch [linkUrl].
- */
-class LabelLinkView @JvmOverloads constructor(
- context: Context,
- attrs: AttributeSet? = null,
- defStyleAttr: Int = 0,
- defStyleRes: Int = 0
-) : LinearLayout(context, attrs, defStyleAttr, defStyleRes) {
-
- private val leadingImageView: AppCompatImageView
- private val labelTextView: AppCompatTextView
- private val trailingImageView: AppCompatImageView
-
- private var leadingIcon: Drawable? = null
- set(value) {
- if (value == null) {
- leadingImageView.visibility = View.GONE
- } else {
- leadingImageView.setImageDrawable(value)
- leadingImageView.visibility = View.VISIBLE
- }
- field = value
- }
-
- private var label: String = ""
- set(value) {
- labelTextView.text = value
- field = value
- }
-
- private var linkUrl: String = ""
-
- private val onLinkClickedListener = OnClickListener {
- if (linkUrl.isBlank()) return@OnClickListener
-
- launchUrl(linkUrl)
- }
-
- init {
- clipToPadding = false
- orientation = LinearLayout.HORIZONTAL
-
- val view = View.inflate(context, R.layout.label_view_layout, this)
- leadingImageView = view.findViewById(R.id.label_leading_image_view)
- labelTextView = view.findViewById(R.id.label_text_view)
- trailingImageView = view.findViewById(R.id.label_trailing_image_view)
- trailingImageView.setOnClickListener(onLinkClickedListener)
-
- val a = context.theme.obtainStyledAttributes(
- attrs,
- R.styleable.LabelLinkView,
- defStyleAttr,
- defStyleRes
- )
- leadingIcon = a.getDrawable(R.styleable.LabelLinkView_leadingIcon)
- label = a.getString(R.styleable.LabelLinkView_android_text) ?: label
- linkUrl = a.getString(R.styleable.LabelLinkView_linkUrl) ?: linkUrl
- a.recycle()
- }
-
- private fun launchUrl(urlString: String) {
- context.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(urlString)))
- }
-}
diff --git a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/widget/ShapeAttributeView.kt b/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/widget/ShapeAttributeView.kt
deleted file mode 100644
index 84144b82..00000000
--- a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/widget/ShapeAttributeView.kt
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.material.materialthemebuilder.widget
-
-import android.content.Context
-import android.content.res.ColorStateList
-import android.graphics.Color
-import com.google.android.material.shape.MaterialShapeDrawable
-import com.google.android.material.shape.ShapeAppearanceModel
-import androidx.core.view.ViewCompat
-import androidx.appcompat.widget.AppCompatTextView
-import android.util.AttributeSet
-import android.view.View
-import android.widget.FrameLayout
-import io.material.materialthemebuilder.R
-
-/**
- * A composite view to display a text label and a shape preview view.
- *
- * The shape preview view is used to visualize the properties of shapeAppearance theme attributes.
- * The shape preview view is a TextView with it's background set to a MaterialShapeDrawable,
- * inflated according to this view's app:shapeAppearanceAttr property.
- */
-class ShapeAttributeView @JvmOverloads constructor(
- context: Context,
- private val attrs: AttributeSet? = null,
- private val defStyleAttr: Int = 0,
- defStyleRes: Int = 0
-) : FrameLayout(context, attrs, defStyleAttr, defStyleRes) {
-
- private val shapeAttributeTextView: AppCompatTextView
- private val shapePreviewView: AppCompatTextView
-
- var shapeAttrText: String = "?shapeAppearanceSmallComponent"
- set(value) {
- shapeAttributeTextView.text = value
- field = value
- }
-
- private var shape = MaterialShapeDrawable().apply {
- strokeWidth = DEFAULT_SHAPE_STROKE_WIDTH
- }
-
- var shapeAppearanceRes: Int = R.attr.shapeAppearanceSmallComponent
- set(value) {
- shape.shapeAppearanceModel = ShapeAppearanceModel.builder(
- context,
- attrs,
- defStyleAttr,
- getShapeAppearanceDefaultRes(value)
- ).build()
-
- ViewCompat.setBackground(shapePreviewView, shape)
-
- field = value
- }
-
- var shapeFillColor: Int = Color.LTGRAY
- set(value) {
- shape.fillColor = ColorStateList.valueOf(value)
- field = value
- }
-
- var shapeStrokeColor: Int = Color.DKGRAY
- set(value) {
- shape.strokeColor = ColorStateList.valueOf(value)
- field = value
- }
-
- var shapeLetter: String = context.getString(R.string.shape_appearance_small_label)
- set(value) {
- shapePreviewView.text = value
- field = value
- }
-
- init {
- val view = View.inflate(context, R.layout.shape_attribute_view_layout, this)
- shapeAttributeTextView = view.findViewById(R.id.shape_attribute)
- shapePreviewView = view.findViewById(R.id.shape_preview)
-
- val a = context.theme.obtainStyledAttributes(
- attrs,
- R.styleable.ShapeAttributeView,
- defStyleAttr,
- defStyleRes
- )
- shapeAttrText = a.getString(
- R.styleable.ShapeAttributeView_android_text
- ) ?: shapeAttrText
-
- shapeFillColor = a.getColor(
- R.styleable.ShapeAttributeView_shapeFillColor,
- Color.LTGRAY
- )
- shapeStrokeColor = a.getColor(
- R.styleable.ShapeAttributeView_shapeStrokeColor,
- Color.DKGRAY
- )
- shapeAppearanceRes = a.getInt(
- R.styleable.ShapeAttributeView_shapeAppearanceAttr,
- R.attr.shapeAppearanceSmallComponent
- )
-
- shapeLetter = a.getString(
- R.styleable.ShapeAttributeView_shapeSizeLetter
- ) ?: shapeLetter
-
- a.recycle()
- }
-
- private fun getShapeAppearanceDefaultRes(shapeAppearanceRes: Int) = when (shapeAppearanceRes) {
- R.attr.shapeAppearanceMediumComponent -> R.style.Widget_MaterialComponents_CardView
- R.attr.shapeAppearanceLargeComponent -> R.style.Widget_MaterialComponents_NavigationView
- else -> R.style.Widget_MaterialComponents_Button
- }
-
- companion object {
- private const val DEFAULT_SHAPE_STROKE_WIDTH = 2F
- }
-}
diff --git a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/widget/TypeAttributeView.kt b/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/widget/TypeAttributeView.kt
deleted file mode 100644
index 9030f2f2..00000000
--- a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/widget/TypeAttributeView.kt
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.material.materialthemebuilder.widget
-
-import android.content.Context
-import android.util.AttributeSet
-import android.view.View
-import androidx.appcompat.widget.AppCompatTextView
-import android.widget.LinearLayout
-import androidx.appcompat.content.res.AppCompatResources
-import io.material.materialthemebuilder.R
-
-/**
- * A composite view to display a text label and a preview of a TextAppearance theme attribute.
- */
-class TypeAttributeView @JvmOverloads constructor(
- context: Context,
- attrs: AttributeSet? = null,
- defStyleAttr: Int = 0,
- defStyleRes: Int = 0
-) : LinearLayout(context, attrs, defStyleAttr, defStyleRes) {
-
- private val typeAttributeTextView: AppCompatTextView
- private val typeAttributePreviewTextView: AppCompatTextView
-
- var typeAttrText: String = "?textAppearanceHeadline1"
- set(value) {
- typeAttributeTextView.text = value
- field = value
- }
-
- var typeAttrPreviewText: String = context.getString(R.string.text_appearance_h1_label)
- set(value) {
- typeAttributePreviewTextView.text = value
- field = value
- }
-
- var typeAttrPreviewTextAppearance: Int = R.attr.textAppearanceHeadline1
- set(value) {
- typeAttributePreviewTextView.setTextAppearance(value)
- field = value
- }
-
- var typeAttrPreviewTextColor = AppCompatResources.getColorStateList(
- context,
- R.color.material_on_background_emphasis_high_type
- )
- set(value) {
- typeAttributePreviewTextView.setTextColor(value)
- field = value
- }
-
- init {
- orientation = LinearLayout.HORIZONTAL
- val view = View.inflate(context, R.layout.type_attribute_view_layout, this)
- typeAttributeTextView = view.findViewById(R.id.type_attribute)
- typeAttributePreviewTextView = view.findViewById(R.id.type_attribute_preview)
-
- val a = context.theme.obtainStyledAttributes(
- attrs,
- R.styleable.TypeAttributeView,
- defStyleAttr,
- defStyleRes
- )
- typeAttrText = a.getString(R.styleable.TypeAttributeView_android_text) ?: typeAttrText
- typeAttrPreviewText = a.getString(
- R.styleable.TypeAttributeView_previewText
- ) ?: typeAttrPreviewText
- typeAttrPreviewTextAppearance = a.getResourceId(
- R.styleable.TypeAttributeView_previewTextAppearance,
- typeAttrPreviewTextAppearance
- )
- typeAttrPreviewTextColor = a.getColorStateList(
- R.styleable.TypeAttributeView_previewTextColor
- ) ?: typeAttrPreviewTextColor
- a.recycle()
- }
-}
diff --git a/MaterialThemeBuilder/app/src/main/res/anim/bottom_sheet_slide_in.xml b/MaterialThemeBuilder/app/src/main/res/anim/bottom_sheet_slide_in.xml
deleted file mode 100644
index 75b48919..00000000
--- a/MaterialThemeBuilder/app/src/main/res/anim/bottom_sheet_slide_in.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/anim/bottom_sheet_slide_out.xml b/MaterialThemeBuilder/app/src/main/res/anim/bottom_sheet_slide_out.xml
deleted file mode 100644
index 465f9730..00000000
--- a/MaterialThemeBuilder/app/src/main/res/anim/bottom_sheet_slide_out.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/MaterialThemeBuilder/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
deleted file mode 100644
index 5b233b28..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_add_on_secondary_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_add_on_secondary_24dp.xml
deleted file mode 100644
index c8be1fea..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_add_on_secondary_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_bookmark_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_bookmark_24dp.xml
deleted file mode 100644
index 6f6aa581..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_bookmark_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_bookmark_control_normal_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_bookmark_control_normal_24dp.xml
deleted file mode 100644
index 12f086cc..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_bookmark_control_normal_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_bookmark_on_surface_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_bookmark_on_surface_24dp.xml
deleted file mode 100644
index 3bd1535d..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_bookmark_on_surface_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_colorize_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_colorize_24dp.xml
deleted file mode 100644
index f53a0e24..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_colorize_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_favorite_on_surface_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_favorite_on_surface_24dp.xml
deleted file mode 100644
index a1b80340..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_favorite_on_surface_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_format_size_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_format_size_24dp.xml
deleted file mode 100644
index 44595ade..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_format_size_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_inbox_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_inbox_24dp.xml
deleted file mode 100644
index 111e2414..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_inbox_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_launcher_background.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_launcher_background.xml
deleted file mode 100644
index c0ec19f5..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_launcher_background.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_material_icon_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_material_icon_24dp.xml
deleted file mode 100644
index cfe21c59..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_material_icon_24dp.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_menu_control_normal_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_menu_control_normal_24dp.xml
deleted file mode 100644
index 3ba200ee..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_menu_control_normal_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_menu_on_surface_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_menu_on_surface_24dp.xml
deleted file mode 100644
index ad77a374..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_menu_on_surface_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_more_vert_on_surface_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_more_vert_on_surface_24dp.xml
deleted file mode 100644
index c7c6b366..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_more_vert_on_surface_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_music_note_on_surface_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_music_note_on_surface_24dp.xml
deleted file mode 100644
index 444f58f2..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_music_note_on_surface_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_news_on_surface_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_news_on_surface_24dp.xml
deleted file mode 100644
index 52d8ad34..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_news_on_surface_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_open_in_new_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_open_in_new_24dp.xml
deleted file mode 100644
index 3d043075..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_open_in_new_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_place_on_surface_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_place_on_surface_24dp.xml
deleted file mode 100644
index 246e74dd..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_place_on_surface_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_rounded_corner_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_rounded_corner_24dp.xml
deleted file mode 100644
index e1966d42..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_rounded_corner_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_search_control_normal_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_search_control_normal_24dp.xml
deleted file mode 100644
index 56a6e274..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_search_control_normal_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_search_on_surface_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_search_on_surface_24dp.xml
deleted file mode 100644
index a73e0e9d..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_search_on_surface_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_send_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_send_24dp.xml
deleted file mode 100644
index 328f1cc9..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_send_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_share_control_normal_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_share_control_normal_24dp.xml
deleted file mode 100644
index f883971e..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_share_control_normal_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_share_on_surface_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_share_on_surface_24dp.xml
deleted file mode 100644
index 1f637976..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_share_on_surface_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/ic_star_24dp.xml b/MaterialThemeBuilder/app/src/main/res/drawable/ic_star_24dp.xml
deleted file mode 100644
index dd0ec02a..00000000
--- a/MaterialThemeBuilder/app/src/main/res/drawable/ic_star_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/drawable/sample_image.png b/MaterialThemeBuilder/app/src/main/res/drawable/sample_image.png
deleted file mode 100644
index 8648f274..00000000
Binary files a/MaterialThemeBuilder/app/src/main/res/drawable/sample_image.png and /dev/null differ
diff --git a/MaterialThemeBuilder/app/src/main/res/font/roboto_black_italic.xml b/MaterialThemeBuilder/app/src/main/res/font/roboto_black_italic.xml
deleted file mode 100644
index afaa1a9e..00000000
--- a/MaterialThemeBuilder/app/src/main/res/font/roboto_black_italic.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/activity_main.xml b/MaterialThemeBuilder/app/src/main/res/layout/activity_main.xml
deleted file mode 100644
index 064976fa..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/activity_main.xml
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/color_attribute_view_layout.xml b/MaterialThemeBuilder/app/src/main/res/layout/color_attribute_view_layout.xml
deleted file mode 100644
index b1a39712..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/color_attribute_view_layout.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/component_bottom_app_bar.xml b/MaterialThemeBuilder/app/src/main/res/layout/component_bottom_app_bar.xml
deleted file mode 100644
index 034ad197..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/component_bottom_app_bar.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/component_bottom_navigation.xml b/MaterialThemeBuilder/app/src/main/res/layout/component_bottom_navigation.xml
deleted file mode 100644
index 2fc9f475..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/component_bottom_navigation.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/component_bottom_sheet.xml b/MaterialThemeBuilder/app/src/main/res/layout/component_bottom_sheet.xml
deleted file mode 100644
index 680ceb80..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/component_bottom_sheet.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/component_buttons.xml b/MaterialThemeBuilder/app/src/main/res/layout/component_buttons.xml
deleted file mode 100644
index cb7535c6..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/component_buttons.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/component_cards.xml b/MaterialThemeBuilder/app/src/main/res/layout/component_cards.xml
deleted file mode 100644
index 7bace357..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/component_cards.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/component_checkbox.xml b/MaterialThemeBuilder/app/src/main/res/layout/component_checkbox.xml
deleted file mode 100644
index 512e36b3..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/component_checkbox.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/component_chips.xml b/MaterialThemeBuilder/app/src/main/res/layout/component_chips.xml
deleted file mode 100644
index b83de485..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/component_chips.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/component_dialog.xml b/MaterialThemeBuilder/app/src/main/res/layout/component_dialog.xml
deleted file mode 100644
index 37fa968b..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/component_dialog.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/component_drawer.xml b/MaterialThemeBuilder/app/src/main/res/layout/component_drawer.xml
deleted file mode 100644
index 8e115e4f..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/component_drawer.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/component_fabs.xml b/MaterialThemeBuilder/app/src/main/res/layout/component_fabs.xml
deleted file mode 100644
index 136635ed..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/component_fabs.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/component_radio_button.xml b/MaterialThemeBuilder/app/src/main/res/layout/component_radio_button.xml
deleted file mode 100644
index ad9c7cde..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/component_radio_button.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/component_snackbar.xml b/MaterialThemeBuilder/app/src/main/res/layout/component_snackbar.xml
deleted file mode 100644
index ec38632c..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/component_snackbar.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/component_switch.xml b/MaterialThemeBuilder/app/src/main/res/layout/component_switch.xml
deleted file mode 100644
index 4b113486..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/component_switch.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/component_tabs.xml b/MaterialThemeBuilder/app/src/main/res/layout/component_tabs.xml
deleted file mode 100644
index 35b8a3bd..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/component_tabs.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/component_text_field.xml b/MaterialThemeBuilder/app/src/main/res/layout/component_text_field.xml
deleted file mode 100644
index a4343784..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/component_text_field.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/component_top_app_bar.xml b/MaterialThemeBuilder/app/src/main/res/layout/component_top_app_bar.xml
deleted file mode 100644
index 61399795..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/component_top_app_bar.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/drawer_header_layout.xml b/MaterialThemeBuilder/app/src/main/res/layout/drawer_header_layout.xml
deleted file mode 100644
index 9cf5f4f2..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/drawer_header_layout.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/fragment_bottom_sheet.xml b/MaterialThemeBuilder/app/src/main/res/layout/fragment_bottom_sheet.xml
deleted file mode 100644
index c785096d..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/fragment_bottom_sheet.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/fragment_component.xml b/MaterialThemeBuilder/app/src/main/res/layout/fragment_component.xml
deleted file mode 100644
index cefb6c3b..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/fragment_component.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/fragment_instructions.xml b/MaterialThemeBuilder/app/src/main/res/layout/fragment_instructions.xml
deleted file mode 100644
index 154fc789..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/fragment_instructions.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/fragment_theme_summary.xml b/MaterialThemeBuilder/app/src/main/res/layout/fragment_theme_summary.xml
deleted file mode 100644
index cefb6c3b..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/fragment_theme_summary.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/label_view_layout.xml b/MaterialThemeBuilder/app/src/main/res/layout/label_view_layout.xml
deleted file mode 100644
index 6c1a4b42..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/label_view_layout.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/shape_attribute_view_layout.xml b/MaterialThemeBuilder/app/src/main/res/layout/shape_attribute_view_layout.xml
deleted file mode 100644
index 66c9c968..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/shape_attribute_view_layout.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/subsystem_color.xml b/MaterialThemeBuilder/app/src/main/res/layout/subsystem_color.xml
deleted file mode 100644
index d11bf2f3..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/subsystem_color.xml
+++ /dev/null
@@ -1,147 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/subsystem_shape.xml b/MaterialThemeBuilder/app/src/main/res/layout/subsystem_shape.xml
deleted file mode 100644
index 51ae04f9..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/subsystem_shape.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/subsystem_type.xml b/MaterialThemeBuilder/app/src/main/res/layout/subsystem_type.xml
deleted file mode 100644
index 17a71364..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/subsystem_type.xml
+++ /dev/null
@@ -1,161 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/layout/type_attribute_view_layout.xml b/MaterialThemeBuilder/app/src/main/res/layout/type_attribute_view_layout.xml
deleted file mode 100644
index 2670cb75..00000000
--- a/MaterialThemeBuilder/app/src/main/res/layout/type_attribute_view_layout.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/menu/bottom_app_bar_menu.xml b/MaterialThemeBuilder/app/src/main/res/menu/bottom_app_bar_menu.xml
deleted file mode 100644
index 8ee6bbed..00000000
--- a/MaterialThemeBuilder/app/src/main/res/menu/bottom_app_bar_menu.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/menu/bottom_navigation_menu.xml b/MaterialThemeBuilder/app/src/main/res/menu/bottom_navigation_menu.xml
deleted file mode 100644
index ff6f4b9b..00000000
--- a/MaterialThemeBuilder/app/src/main/res/menu/bottom_navigation_menu.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/menu/navigation_view_menu.xml b/MaterialThemeBuilder/app/src/main/res/menu/navigation_view_menu.xml
deleted file mode 100644
index c0407193..00000000
--- a/MaterialThemeBuilder/app/src/main/res/menu/navigation_view_menu.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/menu/top_app_bar_menu.xml b/MaterialThemeBuilder/app/src/main/res/menu/top_app_bar_menu.xml
deleted file mode 100644
index ee696778..00000000
--- a/MaterialThemeBuilder/app/src/main/res/menu/top_app_bar_menu.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/MaterialThemeBuilder/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted file mode 100644
index ee5823cd..00000000
--- a/MaterialThemeBuilder/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/MaterialThemeBuilder/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted file mode 100644
index ee5823cd..00000000
--- a/MaterialThemeBuilder/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/mipmap-hdpi/ic_launcher.png b/MaterialThemeBuilder/app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index 6be6efb1..00000000
Binary files a/MaterialThemeBuilder/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/MaterialThemeBuilder/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/MaterialThemeBuilder/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
deleted file mode 100644
index a2893dc4..00000000
Binary files a/MaterialThemeBuilder/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/MaterialThemeBuilder/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/MaterialThemeBuilder/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
deleted file mode 100644
index 6be6efb1..00000000
Binary files a/MaterialThemeBuilder/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ
diff --git a/MaterialThemeBuilder/app/src/main/res/mipmap-mdpi/ic_launcher.png b/MaterialThemeBuilder/app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index dde6cfda..00000000
Binary files a/MaterialThemeBuilder/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/MaterialThemeBuilder/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/MaterialThemeBuilder/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
deleted file mode 100644
index 9eca5eab..00000000
Binary files a/MaterialThemeBuilder/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/MaterialThemeBuilder/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/MaterialThemeBuilder/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
deleted file mode 100644
index dde6cfda..00000000
Binary files a/MaterialThemeBuilder/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ
diff --git a/MaterialThemeBuilder/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/MaterialThemeBuilder/app/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index 8047cd2c..00000000
Binary files a/MaterialThemeBuilder/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/MaterialThemeBuilder/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/MaterialThemeBuilder/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
deleted file mode 100644
index f75c1109..00000000
Binary files a/MaterialThemeBuilder/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/MaterialThemeBuilder/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/MaterialThemeBuilder/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
deleted file mode 100644
index 8047cd2c..00000000
Binary files a/MaterialThemeBuilder/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/MaterialThemeBuilder/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/MaterialThemeBuilder/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index 6046b70f..00000000
Binary files a/MaterialThemeBuilder/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/MaterialThemeBuilder/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/MaterialThemeBuilder/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
deleted file mode 100644
index 0143ddb3..00000000
Binary files a/MaterialThemeBuilder/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/MaterialThemeBuilder/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/MaterialThemeBuilder/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
deleted file mode 100644
index 6046b70f..00000000
Binary files a/MaterialThemeBuilder/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/MaterialThemeBuilder/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/MaterialThemeBuilder/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index 506456f6..00000000
Binary files a/MaterialThemeBuilder/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/MaterialThemeBuilder/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/MaterialThemeBuilder/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
deleted file mode 100644
index cae694b1..00000000
Binary files a/MaterialThemeBuilder/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/MaterialThemeBuilder/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/MaterialThemeBuilder/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
deleted file mode 100644
index 506456f6..00000000
Binary files a/MaterialThemeBuilder/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/MaterialThemeBuilder/app/src/main/res/values-night/themes.xml b/MaterialThemeBuilder/app/src/main/res/values-night/themes.xml
deleted file mode 100644
index fcdc453d..00000000
--- a/MaterialThemeBuilder/app/src/main/res/values-night/themes.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/values/attrs.xml b/MaterialThemeBuilder/app/src/main/res/values/attrs.xml
deleted file mode 100644
index 4b4e2112..00000000
--- a/MaterialThemeBuilder/app/src/main/res/values/attrs.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/values/color.xml b/MaterialThemeBuilder/app/src/main/res/values/color.xml
deleted file mode 100644
index 966d94d1..00000000
--- a/MaterialThemeBuilder/app/src/main/res/values/color.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #bb86fc
- #6200ee
- #4b01d0
- #3700b3
-
- #03dac6
- #018786
-
- #cf6679
- #b00020
-
-
-
- #ffffff
-
- #121212
-
-
- #000000
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/values/dimens.xml b/MaterialThemeBuilder/app/src/main/res/values/dimens.xml
deleted file mode 100644
index bbf05c7b..00000000
--- a/MaterialThemeBuilder/app/src/main/res/values/dimens.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
- 2dp
- 4dp
- 8dp
- 16dp
- 24dp
-
- @dimen/keyline_4
- 4dp
-
diff --git a/MaterialThemeBuilder/app/src/main/res/values/font_certs.xml b/MaterialThemeBuilder/app/src/main/res/values/font_certs.xml
deleted file mode 100644
index aabbebf0..00000000
--- a/MaterialThemeBuilder/app/src/main/res/values/font_certs.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
- - @array/com_google_android_gms_fonts_certs_dev
- - @array/com_google_android_gms_fonts_certs_prod
-
-
- -
- MIIEqDCCA5CgAwIBAgIJANWFuGx90071MA0GCSqGSIb3DQEBBAUAMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAeFw0wODA0MTUyMzM2NTZaFw0zNTA5MDEyMzM2NTZaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBANbOLggKv+IxTdGNs8/TGFy0PTP6DHThvbbR24kT9ixcOd9W+EaBPWW+wPPKQmsHxajtWjmQwWfna8mZuSeJS48LIgAZlKkpFeVyxW0qMBujb8X8ETrWy550NaFtI6t9+u7hZeTfHwqNvacKhp1RbE6dBRGWynwMVX8XW8N1+UjFaq6GCJukT4qmpN2afb8sCjUigq0GuMwYXrFVee74bQgLHWGJwPmvmLHC69EH6kWr22ijx4OKXlSIx2xT1AsSHee70w5iDBiK4aph27yH3TxkXy9V89TDdexAcKk/cVHYNnDBapcavl7y0RiQ4biu8ymM8Ga/nmzhRKya6G0cGw8CAQOjgfwwgfkwHQYDVR0OBBYEFI0cxb6VTEM8YYY6FbBMvAPyT+CyMIHJBgNVHSMEgcEwgb6AFI0cxb6VTEM8YYY6FbBMvAPyT+CyoYGapIGXMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbYIJANWFuGx90071MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADggEBABnTDPEF+3iSP0wNfdIjIz1AlnrPzgAIHVvXxunW7SBrDhEglQZBbKJEk5kT0mtKoOD1JMrSu1xuTKEBahWRbqHsXclaXjoBADb0kkjVEJu/Lh5hgYZnOjvlba8Ld7HCKePCVePoTJBdI4fvugnL8TsgK05aIskyY0hKI9L8KfqfGTl1lzOv2KoWD0KWwtAWPoGChZxmQ+nBli+gwYMzM1vAkP+aayLe0a1EQimlOalO762r0GXO0ks+UeXde2Z4e+8S/pf7pITEI/tP+MxJTALw9QUWEv9lKTk+jkbqxbsh8nfBUapfKqYn0eidpwq2AzVp3juYl7//fKnaPhJD9gs=
-
-
-
- -
- MIIEQzCCAyugAwIBAgIJAMLgh0ZkSjCNMA0GCSqGSIb3DQEBBAUAMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDAeFw0wODA4MjEyMzEzMzRaFw0zNjAxMDcyMzEzMzRaMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBAKtWLgDYO6IIrgqWbxJOKdoR8qtW0I9Y4sypEwPpt1TTcvZApxsdyxMJZ2JORland2qSGT2y5b+3JKkedxiLDmpHpDsz2WCbdxgxRczfey5YZnTJ4VZbH0xqWVW/8lGmPav5xVwnIiJS6HXk+BVKZF+JcWjAsb/GEuq/eFdpuzSqeYTcfi6idkyugwfYwXFU1+5fZKUaRKYCwkkFQVfcAs1fXA5V+++FGfvjJ/CxURaSxaBvGdGDhfXE28LWuT9ozCl5xw4Yq5OGazvV24mZVSoOO0yZ31j7kYvtwYK6NeADwbSxDdJEqO4k//0zOHKrUiGYXtqw/A0LFFtqoZKFjnkCAQOjgdkwgdYwHQYDVR0OBBYEFMd9jMIhF1Ylmn/Tgt9r45jk14alMIGmBgNVHSMEgZ4wgZuAFMd9jMIhF1Ylmn/Tgt9r45jk14aloXikdjB0MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLR29vZ2xlIEluYy4xEDAOBgNVBAsTB0FuZHJvaWQxEDAOBgNVBAMTB0FuZHJvaWSCCQDC4IdGZEowjTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4IBAQBt0lLO74UwLDYKqs6Tm8/yzKkEu116FmH4rkaymUIE0P9KaMftGlMexFlaYjzmB2OxZyl6euNXEsQH8gjwyxCUKRJNexBiGcCEyj6z+a1fuHHvkiaai+KL8W1EyNmgjmyy8AW7P+LLlkR+ho5zEHatRbM/YAnqGcFh5iZBqpknHf1SKMXFh4dd239FJ1jWYfbMDMy3NS5CTMQ2XFI1MvcyUTdZPErjQfTbQe3aDQsQcafEQPD+nqActifKZ0Np0IS9L9kR/wbNvyz6ENwPiTrjV2KRkEjH78ZMcUQXg0L3BYHJ3lc69Vs5Ddf9uUGGMYldX3WfMBEmh/9iFBDAaTCK
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/values/ic_launcher_background.xml b/MaterialThemeBuilder/app/src/main/res/values/ic_launcher_background.xml
deleted file mode 100644
index 62139b23..00000000
--- a/MaterialThemeBuilder/app/src/main/res/values/ic_launcher_background.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- #FFFFFF
-
diff --git a/MaterialThemeBuilder/app/src/main/res/values/motion.xml b/MaterialThemeBuilder/app/src/main/res/values/motion.xml
deleted file mode 100644
index cdf17389..00000000
--- a/MaterialThemeBuilder/app/src/main/res/values/motion.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/values/preloaded_fonts.xml b/MaterialThemeBuilder/app/src/main/res/values/preloaded_fonts.xml
deleted file mode 100644
index 8c6d1e48..00000000
--- a/MaterialThemeBuilder/app/src/main/res/values/preloaded_fonts.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
- - @font/roboto_black_italic
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/values/shape.xml b/MaterialThemeBuilder/app/src/main/res/values/shape.xml
deleted file mode 100644
index 5fdfa264..00000000
--- a/MaterialThemeBuilder/app/src/main/res/values/shape.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/values/strings.xml b/MaterialThemeBuilder/app/src/main/res/values/strings.xml
deleted file mode 100644
index 429c20b4..00000000
--- a/MaterialThemeBuilder/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-
-
-
- Build a Material Theme
- Theme name...
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-
-
- Instructions
- Components
- Theme summary
-
-
- Build your own custom Material Theme by remixing and styling these themeable components.\n\nModify the variables in your project\'s color.xml, type.xml and shape.xml files to see your custom styles cascade through Material Components for Android.
- How to use theme builder
- Theme builder options
- Enable dark theme
-
-
- Headline 6
- Body 2
- Button
- Overline
-
- Button
- Left
- Center
- Right
-
- FAB
-
- Card
-
- Chips
- Action
- Filter
- Choice
- Entry
-
- Top app bar
- Share
- Search
- Bookmark
-
- Drawer
-
- Text field
- Label
-
- Bottom navigation
- Favorites
- Music
- Places
- News
-
- Switch
-
- Radio button
-
- Checkbox
-
- Bottom app bar
-
- Tabs
-
- Snackbar
- Marked as favorite
- Action
-
- Dialog
- Show dialog
-
- Bottom sheet
- Show bottom sheet
-
-
-
- Color scheme
-
- Shape system
- S
- M
- L
-
- Typography scale
- H1
- H2
- H3
- H4
- H5
- H6
- Subtitle 1
- Subtitle 2
- Body 1
- Body 2
- Button
- Caption
- Overline
-
diff --git a/MaterialThemeBuilder/app/src/main/res/values/styles.xml b/MaterialThemeBuilder/app/src/main/res/values/styles.xml
deleted file mode 100644
index c28b893e..00000000
--- a/MaterialThemeBuilder/app/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/values/themes.xml b/MaterialThemeBuilder/app/src/main/res/values/themes.xml
deleted file mode 100644
index fa807b1a..00000000
--- a/MaterialThemeBuilder/app/src/main/res/values/themes.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/app/src/main/res/values/type.xml b/MaterialThemeBuilder/app/src/main/res/values/type.xml
deleted file mode 100644
index 1c7ed454..00000000
--- a/MaterialThemeBuilder/app/src/main/res/values/type.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MaterialThemeBuilder/build.gradle b/MaterialThemeBuilder/build.gradle
deleted file mode 100644
index 2a92ec48..00000000
--- a/MaterialThemeBuilder/build.gradle
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2019 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
- * in compliance with the License. You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- *
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-
-buildscript {
- ext {
- kotlin_version = '1.3.61'
- }
- repositories {
- google()
- jcenter()
- }
- dependencies{
- // Wait to move to 3.6 until ConstraintLayout related attribute bugs are resolved. See
- // https://issuetracker.google.com/issues/138601946 for more details.
- classpath 'com.android.tools.build:gradle:3.5.3'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-
- // 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
-}
diff --git a/MaterialThemeBuilder/gradle.properties b/MaterialThemeBuilder/gradle.properties
deleted file mode 100644
index dbf9c126..00000000
--- a/MaterialThemeBuilder/gradle.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-# 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.
-android.enableJetifier=true
-android.useAndroidX=true
-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
-
diff --git a/MaterialThemeBuilder/gradle/wrapper/gradle-wrapper.jar b/MaterialThemeBuilder/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index f6b961fd..00000000
Binary files a/MaterialThemeBuilder/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/MaterialThemeBuilder/gradle/wrapper/gradle-wrapper.properties b/MaterialThemeBuilder/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index a21d5fef..00000000
--- a/MaterialThemeBuilder/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Fri Jan 17 09:04:41 PST 2020
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
diff --git a/MaterialThemeBuilder/gradlew b/MaterialThemeBuilder/gradlew
deleted file mode 100644
index cccdd3d5..00000000
--- a/MaterialThemeBuilder/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/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" "$@"
diff --git a/MaterialThemeBuilder/gradlew.bat b/MaterialThemeBuilder/gradlew.bat
deleted file mode 100644
index e95643d6..00000000
--- a/MaterialThemeBuilder/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@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
diff --git a/MaterialThemeBuilder/settings.gradle b/MaterialThemeBuilder/settings.gradle
deleted file mode 100644
index e7b4def4..00000000
--- a/MaterialThemeBuilder/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-include ':app'
diff --git a/Owl/.google/packaging.yaml b/Owl/.google/packaging.yaml
index 19e04afc..08ccc281 100644
--- a/Owl/.google/packaging.yaml
+++ b/Owl/.google/packaging.yaml
@@ -21,5 +21,6 @@ categories: [Material Components]
languages: [Kotlin]
solutions: [Mobile]
github: material-components/material-components-android-examples
+branch: develop
level: ADVANCED
license: apache2
diff --git a/Owl/README.md b/Owl/README.md
index b494585f..edd560e0 100644
--- a/Owl/README.md
+++ b/Owl/README.md
@@ -14,17 +14,17 @@ Owl uses Material Theming to customize the app’s [color](https://material.io/d
### Color
-Owl has three primary colors which are used to create distinct visual themes for each section. See [color.xml](Owl/app/src/main/res/values/color.xml) for the full color scheme and how colors are applied across [default](Owl/app/src/main/res/values/theme.xml#L58-L86) and [dark](Owl/app/src/main/res/values-night/theme.xml) themes.
+Owl has three primary colors which are used to create distinct visual themes for each section. See [color.xml](Owl/app/src/main/res/values/color.xml) for the full color scheme and how colors are applied across [default](app/src/main/res/values/theme.xml#L58-L86) and [dark](app/src/main/res/values-night/theme.xml) themes.
### Shape
-Owl defines small, medium and large shape categories for different sized components. See [shape.xml](Owl/app/src/main/res/values/shape.xml) which defines the `ShapeAppearance`s, which are then [set in the theme](Owl/app/src/main/res/values/theme.xml#L20-L23) and picked up by all components or referred to directly.
+Owl defines small, medium and large shape categories for different sized components. See [shape.xml](app/src/main/res/values/shape.xml) which defines the `ShapeAppearance`s, which are then [set in the theme](app/src/main/res/values/theme.xml#L20-L23) and picked up by all components or referred to directly.
### Typography
-Owl’s type scale provides the typographic variety necessary for the app content. All items in the type scale use [Rubik](https://fonts.google.com/specimen/Rubik) as the typeface, and make use of the variety of weights available by using Rubik Regular, Medium, and Bold. See [type.xml](Owl/app/src/main/res/values/type.xml) which defines `TextAppearance`s which are then [set in the theme](Owl/app/src/main/res/values/theme.xml#L25-L38) and referred to using `?attr/textAppearance[...]` throughout.
+Owl’s type scale provides the typographic variety necessary for the app content. All items in the type scale use [Rubik](https://fonts.google.com/specimen/Rubik) as the typeface, and make use of the variety of weights available by using Rubik Regular, Medium, and Bold. See [type.xml](app/src/main/res/values/type.xml) which defines `TextAppearance`s which are then [set in the theme](app/src/main/res/values/theme.xml#L25-L38) and referred to using `?attr/textAppearance[...]` throughout.
## License
diff --git a/Owl/app/build.gradle b/Owl/app/build.gradle
index fb1c4496..3fde4e10 100644
--- a/Owl/app/build.gradle
+++ b/Owl/app/build.gradle
@@ -18,46 +18,50 @@ apply plugin: 'kotlin-kapt'
apply plugin: 'androidx.navigation.safeargs.kotlin'
android {
- compileSdkVersion 29
+ compileSdkVersion 30
defaultConfig {
applicationId 'com.materialstudies.owl'
minSdkVersion 23
- targetSdkVersion 29
+ targetSdkVersion 30
versionCode 1
versionName '1.0'
vectorDrawables.useSupportLibrary = true
}
+
dataBinding {
enabled true
}
+
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
+
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
+
kotlinOptions {
jvmTarget = "1.8"
}
}
dependencies {
- implementation 'androidx.appcompat:appcompat:1.1.0'
- implementation 'androidx.fragment:fragment:1.2.0-beta02'
- implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
- implementation 'androidx.core:core-ktx:1.1.0'
- implementation 'com.google.android.material:material:1.1.0-beta01'
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+ implementation 'androidx.appcompat:appcompat:1.2.0'
+ implementation 'androidx.fragment:fragment-ktx:1.2.5'
+ implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
+ implementation 'androidx.core:core-ktx:1.5.0-alpha04'
+ implementation 'com.google.android.material:material:1.4.0-alpha02'
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "androidx.navigation:navigation-runtime-ktx:$nav_version"
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
implementation 'androidx.dynamicanimation:dynamicanimation:1.0.0'
- implementation 'com.github.bumptech.glide:glide:4.9.0'
- annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
+ implementation 'com.github.bumptech.glide:glide:4.11.0'
+ annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
}
diff --git a/Owl/app/src/main/java/com/materialstudies/owl/ui/MainActivity.kt b/Owl/app/src/main/java/com/materialstudies/owl/ui/MainActivity.kt
index 3cb15cc3..8c457372 100644
--- a/Owl/app/src/main/java/com/materialstudies/owl/ui/MainActivity.kt
+++ b/Owl/app/src/main/java/com/materialstudies/owl/ui/MainActivity.kt
@@ -20,6 +20,7 @@ import android.os.Bundle
import android.view.View.GONE
import android.view.View.VISIBLE
import androidx.appcompat.app.AppCompatActivity
+import androidx.lifecycle.lifecycleScope
import androidx.navigation.Navigation
import androidx.navigation.ui.setupWithNavController
import com.materialstudies.owl.R
diff --git a/Owl/app/src/main/java/com/materialstudies/owl/ui/lessons/LessonsSheetFragment.kt b/Owl/app/src/main/java/com/materialstudies/owl/ui/lessons/LessonsSheetFragment.kt
index 4ee5f6e5..28945f12 100644
--- a/Owl/app/src/main/java/com/materialstudies/owl/ui/lessons/LessonsSheetFragment.kt
+++ b/Owl/app/src/main/java/com/materialstudies/owl/ui/lessons/LessonsSheetFragment.kt
@@ -27,6 +27,7 @@ import android.view.ViewGroup
import androidx.activity.addCallback
import androidx.annotation.ColorInt
import androidx.annotation.Px
+import androidx.core.view.WindowInsetsCompat.Type
import androidx.core.view.doOnLayout
import androidx.core.view.forEach
import androidx.core.view.postDelayed
@@ -148,7 +149,7 @@ class LessonsSheetFragment : Fragment() {
}
})
lessonsSheet.doOnApplyWindowInsets { _, insets, _, _ ->
- behavior.peekHeight = peek + insets.systemWindowInsetBottom
+ behavior.peekHeight = peek + insets.getInsets(Type.navigationBars()).bottom
}
}
collapsePlaylist.setOnClickListener {
diff --git a/Owl/app/src/main/java/com/materialstudies/owl/util/BindingAdapters.kt b/Owl/app/src/main/java/com/materialstudies/owl/util/BindingAdapters.kt
index 1af559bc..270e4fcf 100644
--- a/Owl/app/src/main/java/com/materialstudies/owl/util/BindingAdapters.kt
+++ b/Owl/app/src/main/java/com/materialstudies/owl/util/BindingAdapters.kt
@@ -19,8 +19,9 @@ package com.materialstudies.owl.util
import android.graphics.drawable.Drawable
import android.view.View
import android.view.ViewGroup
-import android.view.WindowInsets
import android.widget.ImageView
+import androidx.core.view.ViewCompat
+import androidx.core.view.WindowInsetsCompat
import androidx.core.view.updateLayoutParams
import androidx.databinding.BindingAdapter
import com.bumptech.glide.Glide
@@ -55,6 +56,9 @@ fun View.bindElevationOverlay(previousElevation: Float, elevation: Float) {
@BindingAdapter("layoutFullscreen")
fun View.bindLayoutFullscreen(previousFullscreen: Boolean, fullscreen: Boolean) {
if (previousFullscreen != fullscreen && fullscreen) {
+ @Suppress("DEPRECATION")
+ // The new alternative is WindowCompat.setDecorFitsSystemWindows, but we can't
+ // always get access to the window from a view.
systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_STABLE or
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
@@ -87,10 +91,11 @@ fun View.applySystemWindowInsetsPadding(
}
doOnApplyWindowInsets { view, insets, padding, _ ->
- val left = if (applyLeft) insets.systemWindowInsetLeft else 0
- val top = if (applyTop) insets.systemWindowInsetTop else 0
- val right = if (applyRight) insets.systemWindowInsetRight else 0
- val bottom = if (applyBottom) insets.systemWindowInsetBottom else 0
+ val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
+ val left = if (applyLeft) systemBars.left else 0
+ val top = if (applyTop) systemBars.top else 0
+ val right = if (applyRight) systemBars.right else 0
+ val bottom = if (applyBottom) systemBars.bottom else 0
view.setPadding(
padding.left + left,
@@ -127,10 +132,11 @@ fun View.applySystemWindowInsetsMargin(
}
doOnApplyWindowInsets { view, insets, _, margin ->
- val left = if (applyLeft) insets.systemWindowInsetLeft else 0
- val top = if (applyTop) insets.systemWindowInsetTop else 0
- val right = if (applyRight) insets.systemWindowInsetRight else 0
- val bottom = if (applyBottom) insets.systemWindowInsetBottom else 0
+ val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
+ val left = if (applyLeft) systemBars.left else 0
+ val top = if (applyTop) systemBars.top else 0
+ val right = if (applyRight) systemBars.right else 0
+ val bottom = if (applyBottom) systemBars.bottom else 0
view.updateLayoutParams {
leftMargin = margin.left + left
@@ -142,14 +148,14 @@ fun View.applySystemWindowInsetsMargin(
}
fun View.doOnApplyWindowInsets(
- block: (View, WindowInsets, InitialPadding, InitialMargin) -> Unit
+ block: (View, WindowInsetsCompat, InitialPadding, InitialMargin) -> Unit
) {
// Create a snapshot of the view's padding & margin states
val initialPadding = recordInitialPaddingForView(this)
val initialMargin = recordInitialMarginForView(this)
// Set an actual OnApplyWindowInsetsListener which proxies to the given
// lambda, also passing in the original padding & margin states
- setOnApplyWindowInsetsListener { v, insets ->
+ ViewCompat.setOnApplyWindowInsetsListener(this) { v, insets ->
block(v, insets, initialPadding, initialMargin)
// Always return the insets, so that children can also use them
insets
diff --git a/Owl/app/src/main/res/layout/activity_main.xml b/Owl/app/src/main/res/layout/activity_main.xml
index eacd808d..43c9d1f7 100644
--- a/Owl/app/src/main/res/layout/activity_main.xml
+++ b/Owl/app/src/main/res/layout/activity_main.xml
@@ -39,9 +39,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
- app:paddingLeftSystemWindowInsets="@{true}"
- app:paddingRightSystemWindowInsets="@{true}"
- app:paddingBottomSystemWindowInsets="@{true}"
app:menu="@menu/main"/>
diff --git a/Owl/build.gradle b/Owl/build.gradle
index 6d482e77..ca25b341 100644
--- a/Owl/build.gradle
+++ b/Owl/build.gradle
@@ -13,14 +13,14 @@
*/
buildscript {
- ext.kotlin_version = '1.3.50'
- ext.nav_version = '2.2.0-beta01'
+ ext.kotlin_version = '1.4.10'
+ ext.nav_version = '2.3.1'
repositories {
google()
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.5.0'
+ classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
}
diff --git a/Owl/gradle.properties b/Owl/gradle.properties
index 23339e0d..83df5e3a 100644
--- a/Owl/gradle.properties
+++ b/Owl/gradle.properties
@@ -15,7 +15,5 @@ org.gradle.jvmargs=-Xmx1536m
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
-# Automatically convert third-party libraries to use AndroidX
-android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
diff --git a/Owl/gradle/wrapper/gradle-wrapper.properties b/Owl/gradle/wrapper/gradle-wrapper.properties
index f04d6a20..c5f2522d 100644
--- a/Owl/gradle/wrapper/gradle-wrapper.properties
+++ b/Owl/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,6 @@
+#Mon Nov 02 08:45:57 GMT 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
diff --git a/Reply/.google/packaging.yaml b/Reply/.google/packaging.yaml
index 19e04afc..08ccc281 100644
--- a/Reply/.google/packaging.yaml
+++ b/Reply/.google/packaging.yaml
@@ -21,5 +21,6 @@ categories: [Material Components]
languages: [Kotlin]
solutions: [Mobile]
github: material-components/material-components-android-examples
+branch: develop
level: ADVANCED
license: apache2
diff --git a/Reply/app/build.gradle b/Reply/app/build.gradle
index 8d44f2e7..027515bd 100644
--- a/Reply/app/build.gradle
+++ b/Reply/app/build.gradle
@@ -18,11 +18,11 @@ apply plugin: 'kotlin-kapt'
apply plugin: "androidx.navigation.safeargs.kotlin"
android {
- compileSdkVersion 29
+ compileSdkVersion 30
defaultConfig {
applicationId "com.materialstudies.reply"
minSdkVersion 23
- targetSdkVersion 29
+ targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -46,29 +46,26 @@ android {
}
dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
-
// Kotlin
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
// AndroidX
- implementation 'androidx.appcompat:appcompat:1.1.0'
- implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
- implementation 'androidx.legacy:legacy-support-v4:1.0.0'
- implementation 'androidx.recyclerview:recyclerview:1.1.0-beta05'
- implementation 'androidx.core:core-ktx:1.1.0'
- implementation 'androidx.lifecycle:lifecycle-livedata-core-ktx:2.2.0-beta01'
+ implementation 'androidx.appcompat:appcompat:1.2.0'
+ implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
+ implementation 'androidx.recyclerview:recyclerview:1.1.0'
+ implementation 'androidx.core:core-ktx:1.3.2'
+ implementation 'androidx.lifecycle:lifecycle-livedata-core-ktx:2.2.0'
implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version"
implementation "androidx.navigation:navigation-ui-ktx:$navigation_version"
// Glide
- implementation "com.github.bumptech.glide:glide:4.9.0"
+ implementation "com.github.bumptech.glide:glide:4.11.0"
// Material Components
- implementation 'com.google.android.material:material:1.2.0-alpha05'
+ implementation 'com.google.android.material:material:1.2.1'
// Testing
- testImplementation 'junit:junit:4.12'
- androidTestImplementation 'androidx.test:runner:1.2.0'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
+ testImplementation 'junit:junit:4.13.1'
+ androidTestImplementation 'androidx.test:runner:1.3.0'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
diff --git a/Reply/app/src/main/java/com/materialstudies/reply/data/Account.kt b/Reply/app/src/main/java/com/materialstudies/reply/data/Account.kt
index f5d2def0..e7405f48 100644
--- a/Reply/app/src/main/java/com/materialstudies/reply/data/Account.kt
+++ b/Reply/app/src/main/java/com/materialstudies/reply/data/Account.kt
@@ -30,6 +30,7 @@ data class Account(
val firstName: String,
val lastName: String,
val email: String,
+ val altEmail: String,
@DrawableRes val avatar: Int,
var isCurrentAccount: Boolean = false
) {
diff --git a/Reply/app/src/main/java/com/materialstudies/reply/data/AccountStore.kt b/Reply/app/src/main/java/com/materialstudies/reply/data/AccountStore.kt
index a38fd194..8da74366 100644
--- a/Reply/app/src/main/java/com/materialstudies/reply/data/AccountStore.kt
+++ b/Reply/app/src/main/java/com/materialstudies/reply/data/AccountStore.kt
@@ -33,6 +33,7 @@ object AccountStore {
"Jeff",
"Hansen",
"hikingfan@gmail.com",
+ "hkngfan@outside.com",
R.drawable.avatar_10,
true
),
@@ -42,6 +43,7 @@ object AccountStore {
"Jeff",
"H",
"jeffersonloveshiking@gmail.com",
+ "jeffersonloveshiking@work.com",
R.drawable.avatar_2
),
Account(
@@ -50,6 +52,7 @@ object AccountStore {
"Jeff",
"Hansen",
"jeffersonc@google.com",
+ "jeffersonc@gmail.com",
R.drawable.avatar_9
)
)
@@ -61,6 +64,7 @@ object AccountStore {
"Tracy",
"Alvarez",
"tracealvie@gmail.com",
+ "tracealvie@gravity.com",
R.drawable.avatar_1
),
Account(
@@ -69,6 +73,7 @@ object AccountStore {
"Allison",
"Trabucco",
"atrabucco222@gmail.com",
+ "atrabucco222@work.com",
R.drawable.avatar_3
),
Account(
@@ -77,6 +82,7 @@ object AccountStore {
"Ali",
"Connors",
"aliconnors@gmail.com",
+ "aliconnors@android.com",
R.drawable.avatar_5
),
Account(
@@ -85,6 +91,7 @@ object AccountStore {
"Alberto",
"Williams",
"albertowilliams124@gmail.com",
+ "albertowilliams124@chromeos.com",
R.drawable.avatar_0
),
Account(
@@ -93,6 +100,7 @@ object AccountStore {
"Kim",
"Alen",
"alen13@gmail.com",
+ "alen13@mountainview.gov",
R.drawable.avatar_7
),
Account(
@@ -101,6 +109,7 @@ object AccountStore {
"Google",
"Express",
"express@google.com",
+ "express@gmail.com",
R.drawable.avatar_express
),
Account(
@@ -109,6 +118,7 @@ object AccountStore {
"Sandra",
"Adams",
"sandraadams@gmail.com",
+ "sandraadams@textera.com",
R.drawable.avatar_2
),
Account(
@@ -117,6 +127,7 @@ object AccountStore {
"Trevor",
"Hansen",
"trevorhandsen@gmail.com",
+ "trevorhandsen@express.com",
R.drawable.avatar_8
),
Account(
@@ -125,6 +136,7 @@ object AccountStore {
"Sean",
"Holt",
"sholt@gmail.com",
+ "sholt@art.com",
R.drawable.avatar_6
),
Account(
@@ -133,6 +145,7 @@ object AccountStore {
"Frank",
"Hawkins",
"fhawkank@gmail.com",
+ "fhawkank@thisisme.com",
R.drawable.avatar_4
)
)
diff --git a/Reply/app/src/main/java/com/materialstudies/reply/data/Email.kt b/Reply/app/src/main/java/com/materialstudies/reply/data/Email.kt
index 2b680fed..f5a8875d 100644
--- a/Reply/app/src/main/java/com/materialstudies/reply/data/Email.kt
+++ b/Reply/app/src/main/java/com/materialstudies/reply/data/Email.kt
@@ -17,6 +17,7 @@
package com.materialstudies.reply.data
import androidx.recyclerview.widget.DiffUtil
+import com.materialstudies.reply.ui.home.Mailbox
/**
* A simple data class to represent an Email.
@@ -29,7 +30,8 @@ data class Email(
val body: String = "",
val attachments: List = emptyList(),
var isImportant: Boolean = false,
- var isStarred: Boolean = false
+ var isStarred: Boolean = false,
+ var mailbox: Mailbox = Mailbox.INBOX
) {
val senderPreview: String = "${sender.fullName} - 4 hrs ago"
val hasBody: Boolean = body.isNotBlank()
diff --git a/Reply/app/src/main/java/com/materialstudies/reply/data/EmailStore.kt b/Reply/app/src/main/java/com/materialstudies/reply/data/EmailStore.kt
index 90cc9347..407e31d3 100644
--- a/Reply/app/src/main/java/com/materialstudies/reply/data/EmailStore.kt
+++ b/Reply/app/src/main/java/com/materialstudies/reply/data/EmailStore.kt
@@ -18,7 +18,9 @@ package com.materialstudies.reply.data
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
+import androidx.lifecycle.Transformations
import com.materialstudies.reply.R
+import com.materialstudies.reply.ui.home.Mailbox
/**
* A static data store of [Email]s.
@@ -80,7 +82,8 @@ object EmailStore {
I was at the grocery store on Sunday night.. when I ran into Genie Williams! I almost didn't recognize her afer 20 years!
Anyway, it turns out she is on the organizing committee for the high school reunion this fall. I don't know if you were planning on going or not, but she could definitely use our help in trying to track down lots of missing alums. If you can make it, we're doing a little phone-tree party at her place next Saturday, hoping that if we can find one person, thee more will...
- """.trimIndent()
+ """.trimIndent(),
+ mailbox = Mailbox.SENT
),
Email(
4L,
@@ -113,7 +116,8 @@ object EmailStore {
listOf(AccountStore.getDefaultUserAccount()),
"Recipe to try",
"Raspberry Pie: We should make this pie recipe tonight! The filling is " +
- "very quick to put together."
+ "very quick to put together.",
+ mailbox = Mailbox.SENT
),
Email(
7L,
@@ -121,17 +125,102 @@ object EmailStore {
listOf(AccountStore.getDefaultUserAccount()),
"Delivered",
"Your shoes should be waiting for you at home!"
+ ),
+ Email(
+ 8L,
+ AccountStore.getContactAccountById(13L),
+ listOf(AccountStore.getDefaultUserAccount()),
+ "Your update on Google Play Store is live!",
+ """
+ Your update, 0.1.1, is now live on the Play Store and available for your alpha users to start testing.
+
+ Your alpha testers will be automatically notified. If you'd rather send them a link directly, go to your Google Play Console and follow the instructions for obtaining an open alpha testing link.
+ """.trimIndent(),
+ mailbox = Mailbox.TRASH
+ ),
+ Email(
+ 9L,
+ AccountStore.getContactAccountById(10L),
+ listOf(AccountStore.getDefaultUserAccount()),
+ "(No subject)",
+ """
+ Hey,
+
+ Wanted to email and see what you thought of
+ """.trimIndent(),
+ mailbox = Mailbox.DRAFTS
+ ),
+ Email(
+ 10L,
+ AccountStore.getContactAccountById(5L),
+ listOf(AccountStore.getDefaultUserAccount()),
+ "Try a free TrailGo account",
+ """
+ Looking for the best hiking trails in your area? TrailGo gets you on the path to the outdoors faster than you can pack a sandwich.
+
+ Whether you're an experienced hiker or just looking to get outside for the afternoon, there's a segment that suits you.
+ """.trimIndent(),
+ mailbox = Mailbox.TRASH
+ ),
+ Email(
+ 10L,
+ AccountStore.getContactAccountById(5L),
+ listOf(AccountStore.getDefaultUserAccount()),
+ "Free money",
+ """
+ You've been selected as a winner in our latest raffle! To claim your prize, click on the link.
+ """.trimIndent(),
+ mailbox = Mailbox.SPAM
)
)
private val _emails: MutableLiveData> = MutableLiveData()
- val emails: LiveData>
- get() = _emails
+
+ private val inbox: LiveData>
+ get() = Transformations.map(_emails) { emails ->
+ emails.filter { it.mailbox == Mailbox.INBOX }
+ }
+
+ private val starred: LiveData>
+ get() = Transformations.map(_emails) { emails ->
+ emails.filter { it.isStarred }
+ }
+
+ private val sent: LiveData>
+ get() = Transformations.map(_emails) { emails ->
+ emails.filter { it.mailbox == Mailbox.SENT }
+ }
+
+ private val trash: LiveData>
+ get() = Transformations.map(_emails) { emails ->
+ emails.filter { it.mailbox == Mailbox.TRASH }
+ }
+
+ private val spam: LiveData>
+ get() = Transformations.map(_emails) { emails ->
+ emails.filter { it.mailbox == Mailbox.SPAM }
+ }
+
+ private val drafts: LiveData>
+ get() = Transformations.map(_emails) { emails ->
+ emails.filter { it.mailbox == Mailbox.DRAFTS }
+ }
init {
_emails.value = allEmails
}
+ fun getEmails(mailbox: Mailbox): LiveData> {
+ return when (mailbox) {
+ Mailbox.INBOX -> inbox
+ Mailbox.STARRED -> starred
+ Mailbox.SENT -> sent
+ Mailbox.TRASH -> trash
+ Mailbox.SPAM -> spam
+ Mailbox.DRAFTS -> drafts
+ }
+ }
+
/**
* Get an [Email] with the given [id].
*/
@@ -168,8 +257,7 @@ object EmailStore {
* Delete the [Email] with the given [id].
*/
fun delete(id: Long) {
- allEmails.removeAll { it.id == id }
- _emails.value = allEmails
+ update(id) { mailbox = Mailbox.TRASH }
}
/**
diff --git a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/themesummary/Subsystem.kt b/Reply/app/src/main/java/com/materialstudies/reply/data/SearchSuggestion.kt
similarity index 54%
rename from MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/themesummary/Subsystem.kt
rename to Reply/app/src/main/java/com/materialstudies/reply/data/SearchSuggestion.kt
index 79c783d6..ed447dd9 100644
--- a/MaterialThemeBuilder/app/src/main/java/io/material/materialthemebuilder/ui/themesummary/Subsystem.kt
+++ b/Reply/app/src/main/java/com/materialstudies/reply/data/SearchSuggestion.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2019 The Android Open Source Project
+ * Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,14 +14,15 @@
* limitations under the License.
*/
-package io.material.materialthemebuilder.ui.themesummary
+package com.materialstudies.reply.data
+
+import androidx.annotation.DrawableRes
/**
- * Enumeration of all subsystems to be displayed by [SubsystemAdapter].
- *
- * All components in this enum will be shown by [SubsystemAdapter]. The order or the components
- * here will be the order they are displayed in by [SubsystemAdapter].
+ * An object which represents a search suggestion.
*/
-enum class Subsystem {
- COLOR, SHAPE, TYPE
-}
+data class SearchSuggestion(
+ @DrawableRes val iconResId: Int,
+ val title: String,
+ val subtitle: String
+)
diff --git a/Reply/app/src/main/java/com/materialstudies/reply/data/SearchSuggestionStore.kt b/Reply/app/src/main/java/com/materialstudies/reply/data/SearchSuggestionStore.kt
new file mode 100644
index 00000000..b97ff1a8
--- /dev/null
+++ b/Reply/app/src/main/java/com/materialstudies/reply/data/SearchSuggestionStore.kt
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.materialstudies.reply.data
+
+import com.materialstudies.reply.R
+
+/**
+ * A static data store of [SearchSuggestion]s.
+ */
+object SearchSuggestionStore {
+
+ val YESTERDAY_SUGGESTIONS = listOf(
+ SearchSuggestion(
+ R.drawable.ic_schedule,
+ "481 Van Brunt Street",
+ "Brooklyn, NY"
+ ),
+ SearchSuggestion(
+ R.drawable.ic_home,
+ "Home",
+ "199 Pacific Street, Brooklyn, NY"
+ )
+ )
+
+ val THIS_WEEK_SUGGESTIONS = listOf(
+ SearchSuggestion(
+ R.drawable.ic_schedule,
+ "BEP GA",
+ "Forsyth Street, New York, NY"
+ ),
+ SearchSuggestion(
+ R.drawable.ic_schedule,
+ "Sushi Nakazawa",
+ "Commerce Street, New York, NY"
+ ),
+ SearchSuggestion(
+ R.drawable.ic_schedule,
+ "IFC Center",
+ "6th Avenue, New York, NY"
+ )
+ )
+}
diff --git a/Reply/app/src/main/java/com/materialstudies/reply/ui/MainActivity.kt b/Reply/app/src/main/java/com/materialstudies/reply/ui/MainActivity.kt
index d252dc00..e8b8df7b 100644
--- a/Reply/app/src/main/java/com/materialstudies/reply/ui/MainActivity.kt
+++ b/Reply/app/src/main/java/com/materialstudies/reply/ui/MainActivity.kt
@@ -22,28 +22,40 @@ import android.os.Bundle
import android.view.MenuItem
import android.view.View
import androidx.annotation.MenuRes
+import androidx.annotation.StringRes
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.app.AppCompatDelegate
import androidx.appcompat.widget.Toolbar
+import androidx.fragment.app.Fragment
import androidx.navigation.NavController
import androidx.navigation.NavDestination
import androidx.navigation.findNavController
+import com.google.android.material.transition.MaterialElevationScale
+import com.google.android.material.transition.MaterialFadeThrough
+import com.google.android.material.transition.MaterialSharedAxis
import com.materialstudies.reply.R
+import com.materialstudies.reply.data.EmailStore
import com.materialstudies.reply.databinding.ActivityMainBinding
import com.materialstudies.reply.ui.compose.ComposeFragmentDirections
import com.materialstudies.reply.ui.email.EmailFragmentArgs
+import com.materialstudies.reply.ui.home.HomeFragmentDirections
+import com.materialstudies.reply.ui.home.Mailbox
import com.materialstudies.reply.ui.nav.AlphaSlideAction
import com.materialstudies.reply.ui.nav.BottomNavDrawerFragment
import com.materialstudies.reply.ui.nav.ChangeSettingsMenuStateAction
import com.materialstudies.reply.ui.nav.HalfClockwiseRotateSlideAction
import com.materialstudies.reply.ui.nav.HalfCounterClockwiseRotateSlideAction
+import com.materialstudies.reply.ui.nav.NavigationAdapter
+import com.materialstudies.reply.ui.nav.NavigationModelItem
import com.materialstudies.reply.ui.nav.ShowHideFabStateAction
+import com.materialstudies.reply.ui.search.SearchFragmentDirections
import com.materialstudies.reply.util.contentView
import kotlin.LazyThreadSafetyMode.NONE
class MainActivity : AppCompatActivity(),
- Toolbar.OnMenuItemClickListener,
- NavController.OnDestinationChangedListener {
+ Toolbar.OnMenuItemClickListener,
+ NavController.OnDestinationChangedListener,
+ NavigationAdapter.NavigationAdapterListener {
private val binding: ActivityMainBinding by contentView(R.layout.activity_main)
private val bottomNavDrawer: BottomNavDrawerFragment by lazy(NONE) {
@@ -54,6 +66,12 @@ class MainActivity : AppCompatActivity(),
// to ComposeFragment when this Activity's FAB is clicked.
private var currentEmailId = -1L
+ val currentNavigationFragment: Fragment?
+ get() = supportFragmentManager.findFragmentById(R.id.nav_host_fragment)
+ ?.childFragmentManager
+ ?.fragments
+ ?.first()
+
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setUpBottomNavigationAndFab()
@@ -73,8 +91,7 @@ class MainActivity : AppCompatActivity(),
setShowMotionSpecResource(R.animator.fab_show)
setHideMotionSpecResource(R.animator.fab_hide)
setOnClickListener {
- findNavController(R.id.nav_host_fragment)
- .navigate(ComposeFragmentDirections.actionGlobalComposeFragment(currentEmailId))
+ navigateToCompose()
}
}
@@ -93,6 +110,7 @@ class MainActivity : AppCompatActivity(),
})
addOnSandwichSlideAction(HalfCounterClockwiseRotateSlideAction(binding.bottomAppBarChevron))
+ addNavigationListener(this@MainActivity)
}
// Set up the BottomAppBar menu
@@ -132,6 +150,10 @@ class MainActivity : AppCompatActivity(),
currentEmailId = -1
setBottomAppBarForCompose()
}
+ R.id.searchFragment -> {
+ currentEmailId = -1
+ setBottomAppBarForSearch()
+ }
}
}
@@ -178,6 +200,15 @@ class MainActivity : AppCompatActivity(),
}
private fun setBottomAppBarForCompose() {
+ hideBottomAppBar()
+ }
+
+ private fun setBottomAppBarForSearch() {
+ hideBottomAppBar()
+ binding.fab.hide()
+ }
+
+ private fun hideBottomAppBar() {
binding.run {
bottomAppBar.performHide()
// Get a handle on the animator that hides the bottom app bar so we can wait to hide
@@ -199,20 +230,74 @@ class MainActivity : AppCompatActivity(),
}
}
+ override fun onNavMenuItemClicked(item: NavigationModelItem.NavMenuItem) {
+ // Swap the list of emails for the given mailbox
+ navigateToHome(item.titleRes, item.mailbox)
+ }
+
+ override fun onNavEmailFolderClicked(folder: NavigationModelItem.NavEmailFolder) {
+ // Do nothing
+ }
+
override fun onMenuItemClick(item: MenuItem?): Boolean {
when (item?.itemId) {
R.id.menu_settings -> {
bottomNavDrawer.close()
showDarkThemeMenu()
}
+ R.id.menu_search -> navigateToSearch()
+ R.id.menu_email_star -> {
+ EmailStore.update(currentEmailId) { isStarred = !isStarred }
+ }
+ R.id.menu_email_delete -> {
+ EmailStore.delete(currentEmailId)
+ findNavController(R.id.nav_host_fragment).popBackStack()
+ }
}
return true
}
private fun showDarkThemeMenu() {
- MenuBottomSheetDialogFragment(R.menu.dark_theme_bottom_sheet_menu) {
- onDarkThemeMenuItemSelected(it.itemId)
- }.show(supportFragmentManager, null)
+ MenuBottomSheetDialogFragment
+ .newInstance(R.menu.dark_theme_bottom_sheet_menu)
+ .show(supportFragmentManager, null)
+ }
+
+ fun navigateToHome(@StringRes titleRes: Int, mailbox: Mailbox) {
+ binding.bottomAppBarTitle.text = getString(titleRes)
+ currentNavigationFragment?.apply {
+ exitTransition = MaterialFadeThrough().apply {
+ duration = resources.getInteger(R.integer.reply_motion_duration_large).toLong()
+ }
+ }
+ val directions = HomeFragmentDirections.actionGlobalHomeFragment(mailbox)
+ findNavController(R.id.nav_host_fragment).navigate(directions)
+ }
+
+ private fun navigateToCompose() {
+ currentNavigationFragment?.apply {
+ exitTransition = MaterialElevationScale(false).apply {
+ duration = resources.getInteger(R.integer.reply_motion_duration_large).toLong()
+ }
+ reenterTransition = MaterialElevationScale(true).apply {
+ duration = resources.getInteger(R.integer.reply_motion_duration_large).toLong()
+ }
+ }
+ val directions = ComposeFragmentDirections.actionGlobalComposeFragment(currentEmailId)
+ findNavController(R.id.nav_host_fragment).navigate(directions)
+ }
+
+ private fun navigateToSearch() {
+ currentNavigationFragment?.apply {
+ exitTransition = MaterialSharedAxis(MaterialSharedAxis.Z, true).apply {
+ duration = resources.getInteger(R.integer.reply_motion_duration_large).toLong()
+ }
+ reenterTransition = MaterialSharedAxis(MaterialSharedAxis.Z, false).apply {
+ duration = resources.getInteger(R.integer.reply_motion_duration_large).toLong()
+ }
+ }
+ val directions = SearchFragmentDirections.actionGlobalSearchFragment()
+ findNavController(R.id.nav_host_fragment).navigate(directions)
}
/**
@@ -230,4 +315,5 @@ class MainActivity : AppCompatActivity(),
delegate.localNightMode = nightMode
return true
}
+
}
diff --git a/Reply/app/src/main/java/com/materialstudies/reply/ui/MenuBottomSheetDialogFragment.kt b/Reply/app/src/main/java/com/materialstudies/reply/ui/MenuBottomSheetDialogFragment.kt
index eb475161..b3b63ec2 100644
--- a/Reply/app/src/main/java/com/materialstudies/reply/ui/MenuBottomSheetDialogFragment.kt
+++ b/Reply/app/src/main/java/com/materialstudies/reply/ui/MenuBottomSheetDialogFragment.kt
@@ -18,19 +18,25 @@ package com.materialstudies.reply.ui
import android.os.Bundle
import android.view.LayoutInflater
-import android.view.MenuItem
import android.view.View
import android.view.ViewGroup
+import androidx.annotation.MenuRes
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import com.google.android.material.navigation.NavigationView
import com.materialstudies.reply.R
-class MenuBottomSheetDialogFragment(
- private val menuRes: Int,
- private val onNavigationItemSelected: (MenuItem) -> Boolean
-) : BottomSheetDialogFragment() {
+/**
+ * A bottom sheet dialog for displaying a simple list of action items.
+ */
+class MenuBottomSheetDialogFragment : BottomSheetDialogFragment() {
private lateinit var navigationView: NavigationView
+ @MenuRes private var menuResId: Int = 0
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ menuResId = arguments?.getInt(KEY_MENU_RES_ID, 0) ?: 0
+ }
override fun onCreateView(
inflater: LayoutInflater,
@@ -47,11 +53,24 @@ class MenuBottomSheetDialogFragment(
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
navigationView = view.findViewById(R.id.navigation_view)
- navigationView.inflateMenu(menuRes)
+ navigationView.inflateMenu(menuResId)
navigationView.setNavigationItemSelectedListener {
- val consumed = onNavigationItemSelected(it)
- if (consumed) dismiss()
- consumed
+ dismiss()
+ true
+ }
+ }
+
+ companion object {
+
+ private const val KEY_MENU_RES_ID = "MenuBottomSheetDialogFragment_menuResId"
+
+ fun newInstance(@MenuRes menuResId: Int): MenuBottomSheetDialogFragment {
+ val fragment = MenuBottomSheetDialogFragment()
+ val bundle = Bundle().apply {
+ putInt(KEY_MENU_RES_ID, menuResId)
+ }
+ fragment.arguments = bundle
+ return fragment
}
}
}
diff --git a/Reply/app/src/main/java/com/materialstudies/reply/ui/compose/ComposeFragment.kt b/Reply/app/src/main/java/com/materialstudies/reply/ui/compose/ComposeFragment.kt
index 3f8cd4d2..1998335c 100644
--- a/Reply/app/src/main/java/com/materialstudies/reply/ui/compose/ComposeFragment.kt
+++ b/Reply/app/src/main/java/com/materialstudies/reply/ui/compose/ComposeFragment.kt
@@ -16,16 +16,18 @@
package com.materialstudies.reply.ui.compose
+import android.graphics.Color
import android.os.Bundle
-import android.transition.Slide
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ArrayAdapter
-import androidx.core.transition.addListener
+import androidx.activity.OnBackPressedCallback
import androidx.fragment.app.Fragment
import androidx.navigation.fragment.findNavController
import androidx.navigation.fragment.navArgs
+import androidx.transition.Slide
+import androidx.transition.TransitionManager
import com.google.android.material.transition.MaterialContainerTransform
import com.materialstudies.reply.R
import com.materialstudies.reply.data.Account
@@ -34,8 +36,7 @@ import com.materialstudies.reply.data.Email
import com.materialstudies.reply.data.EmailStore
import com.materialstudies.reply.databinding.ComposeRecipientChipBinding
import com.materialstudies.reply.databinding.FragmentComposeBinding
-import com.materialstudies.reply.ui.MainActivity
-import com.materialstudies.reply.util.themeInterpolator
+import com.materialstudies.reply.util.themeColor
import kotlin.LazyThreadSafetyMode.NONE
/**
@@ -55,9 +56,17 @@ class ComposeFragment : Fragment() {
if (id == -1L) EmailStore.create() else EmailStore.createReplyTo(id)
}
+ // Handle closing an expanded recipient card when on back is pressed.
+ private val closeRecipientCardOnBackPressed = object : OnBackPressedCallback(false) {
+ var expandedChip: View? = null
+ override fun handleOnBackPressed() {
+ expandedChip?.let { collapseChip(it) }
+ }
+ }
+
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
- prepareTransitions()
+ requireActivity().onBackPressedDispatcher.addCallback(this, closeRecipientCardOnBackPressed)
}
override fun onCreateView(
@@ -81,13 +90,31 @@ class ComposeFragment : Fragment() {
R.layout.spinner_item_layout,
AccountStore.getAllUserAccounts().map { it.email }
)
- }
- startTransitions()
+ // Set transitions here so we are able to access Fragment's binding views.
+ enterTransition = MaterialContainerTransform().apply {
+ // Manually add the Views to be shared since this is not a standard Fragment to
+ // Fragment shared element transition.
+ startView = requireActivity().findViewById(R.id.fab)
+ endView = emailCardView
+ duration = resources.getInteger(R.integer.reply_motion_duration_large).toLong()
+ scrimColor = Color.TRANSPARENT
+ containerColor = requireContext().themeColor(R.attr.colorSurface)
+ startContainerColor = requireContext().themeColor(R.attr.colorSecondary)
+ endContainerColor = requireContext().themeColor(R.attr.colorSurface)
+ }
+ returnTransition = Slide().apply {
+ duration = resources.getInteger(R.integer.reply_motion_duration_medium).toLong()
+ addTarget(R.id.email_card_view)
+ }
+ }
}
/**
* Add a chip for the given [Account] to the recipients chip group.
+ *
+ * This method also sets up the ability for expanding/collapsing the chip into a recipient
+ * address selection dialog.
*/
private fun addRecipientChip(acnt: Account) {
binding.recipientChipGroup.run {
@@ -97,31 +124,73 @@ class ComposeFragment : Fragment() {
false
).apply {
account = acnt
+ root.setOnClickListener {
+ // Bind the views in the expanded card view to this account's details when
+ // clicked and expand.
+ binding.focusedRecipient = acnt
+ expandChip(it)
+ }
}
addView(chipBinding.root)
}
}
- private fun prepareTransitions() {
- postponeEnterTransition()
- }
+ /**
+ * Expand the recipient [chip] into a popup with a list of contact addresses to choose from.
+ */
+ private fun expandChip(chip: View) {
+ // Configure the analogous collapse transform back to the recipient chip. This should
+ // happen when the card is clicked, any region outside of the card (the card's transparent
+ // scrim) is clicked, or when the back button is pressed.
+ binding.run {
+ recipientCardView.setOnClickListener { collapseChip(chip) }
+ recipientCardScrim.visibility = View.VISIBLE
+ recipientCardScrim.setOnClickListener { collapseChip(chip) }
+ }
+ closeRecipientCardOnBackPressed.expandedChip = chip
+ closeRecipientCardOnBackPressed.isEnabled = true
- private fun startTransitions() {
- binding.executePendingBindings()
- // Delay creating the enterTransition until after we have inflated this Fragment's binding
- // and are able to access the view to be transitioned to.
- enterTransition = MaterialContainerTransform(requireContext()).apply {
- // Manually add the Views to be shared since this is not a standard Fragment to Fragment
- // shared element transition.
- startView = requireActivity().findViewById(R.id.fab)
- endView = binding.emailCardView
- duration = resources.getInteger(R.integer.reply_motion_default_large).toLong()
- interpolator = requireContext().themeInterpolator(R.attr.motionInterpolatorPersistent)
+ val transform = MaterialContainerTransform().apply {
+ startView = chip
+ endView = binding.recipientCardView
+ scrimColor = Color.TRANSPARENT
+ // Have the transform match the endView card's native elevation as closely as possible.
+ endElevation = requireContext().resources.getDimension(
+ R.dimen.email_recipient_card_popup_elevation_compat
+ )
+ // Avoid having this transform from running on both the start and end views by setting
+ // its target to the endView.
+ addTarget(binding.recipientCardView)
}
- returnTransition = Slide().apply {
- duration = resources.getInteger(R.integer.reply_motion_duration_medium).toLong()
- interpolator = requireContext().themeInterpolator(R.attr.motionInterpolatorOutgoing)
+
+ TransitionManager.beginDelayedTransition(binding.composeConstraintLayout, transform)
+ binding.recipientCardView.visibility = View.VISIBLE
+ // Using INVISIBLE instead of GONE ensures the chip's parent layout won't shift during
+ // the transition due to chips being effectively removed.
+ chip.visibility = View.INVISIBLE
+ }
+
+ /**
+ * Collapse the recipient card back into its [chip] form.
+ */
+ private fun collapseChip(chip: View) {
+ // Remove the scrim view and on back pressed callbacks
+ binding.recipientCardScrim.visibility = View.GONE
+ closeRecipientCardOnBackPressed.expandedChip = null
+ closeRecipientCardOnBackPressed.isEnabled = false
+
+ val transform = MaterialContainerTransform().apply {
+ startView = binding.recipientCardView
+ endView = chip
+ scrimColor = Color.TRANSPARENT
+ startElevation = requireContext().resources.getDimension(
+ R.dimen.email_recipient_card_popup_elevation_compat
+ )
+ addTarget(chip)
}
- startPostponedEnterTransition()
+
+ TransitionManager.beginDelayedTransition(binding.composeConstraintLayout, transform)
+ chip.visibility = View.VISIBLE
+ binding.recipientCardView.visibility = View.INVISIBLE
}
}
\ No newline at end of file
diff --git a/Reply/app/src/main/java/com/materialstudies/reply/ui/email/EmailFragment.kt b/Reply/app/src/main/java/com/materialstudies/reply/ui/email/EmailFragment.kt
index 04a17340..0fdf60bd 100644
--- a/Reply/app/src/main/java/com/materialstudies/reply/ui/email/EmailFragment.kt
+++ b/Reply/app/src/main/java/com/materialstudies/reply/ui/email/EmailFragment.kt
@@ -16,6 +16,7 @@
package com.materialstudies.reply.ui.email
+import android.graphics.Color
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
@@ -28,7 +29,7 @@ import com.google.android.material.transition.MaterialContainerTransform
import com.materialstudies.reply.R
import com.materialstudies.reply.data.EmailStore
import com.materialstudies.reply.databinding.FragmentEmailBinding
-import com.materialstudies.reply.util.themeInterpolator
+import com.materialstudies.reply.util.themeColor
import kotlin.LazyThreadSafetyMode.NONE
private const val MAX_GRID_SPANS = 3
@@ -46,7 +47,15 @@ class EmailFragment : Fragment() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
- prepareTransitions()
+
+ sharedElementEnterTransition = MaterialContainerTransform().apply {
+ // Scope the transition to a view in the hierarchy so we know it will be added under
+ // the bottom app bar but over the elevation scale of the exiting HomeFragment.
+ drawingViewId = R.id.nav_host_fragment
+ duration = resources.getInteger(R.integer.reply_motion_duration_large).toLong()
+ scrimColor = Color.TRANSPARENT
+ setAllContainerColors(requireContext().themeColor(R.attr.colorSurface))
+ }
}
override fun onCreateView(
@@ -84,31 +93,6 @@ class EmailFragment : Fragment() {
attachmentRecyclerView.adapter = attachmentAdapter
attachmentAdapter.submitList(email.attachments)
}
-
- startTransitions()
- }
-
- private fun prepareTransitions() {
- postponeEnterTransition()
-
- sharedElementEnterTransition = MaterialContainerTransform(requireContext()).apply {
- // Scope the transition to a view in the hierarchy so we know it will be added under
- // the bottom app bar but over the Hold transition from the exiting HomeFragment.
- drawingViewId = R.id.nav_host_fragment
- duration = resources.getInteger(R.integer.reply_motion_default_large).toLong()
- interpolator = requireContext().themeInterpolator(R.attr.motionInterpolatorPersistent)
- }
- sharedElementReturnTransition = MaterialContainerTransform(requireContext()).apply {
- // Again, scope the return transition so it is added below the bottom app bar.
- drawingViewId = R.id.recycler_view
- duration = resources.getInteger(R.integer.reply_motion_default_large).toLong()
- interpolator = requireContext().themeInterpolator(R.attr.motionInterpolatorPersistent)
- }
- }
-
- private fun startTransitions() {
- binding.executePendingBindings()
- startPostponedEnterTransition()
}
private fun showError() {
diff --git a/Reply/app/src/main/java/com/materialstudies/reply/ui/home/EmailViewHolder.kt b/Reply/app/src/main/java/com/materialstudies/reply/ui/home/EmailViewHolder.kt
index 0d4324c3..b51e1d2f 100644
--- a/Reply/app/src/main/java/com/materialstudies/reply/ui/home/EmailViewHolder.kt
+++ b/Reply/app/src/main/java/com/materialstudies/reply/ui/home/EmailViewHolder.kt
@@ -36,6 +36,9 @@ class EmailViewHolder(
= R.layout.email_attachment_preview_item_layout
}
+ private val starredCornerSize =
+ itemView.resources.getDimension(R.dimen.reply_small_component_corner_radius)
+
override val reboundableView: View = binding.cardView
init {
@@ -69,7 +72,7 @@ class EmailViewHolder(
// rounded or squared. Since all other corners are set to 0dp rounded, they are
// not affected.
val interpolation = if (email.isStarred) 1F else 0F
- binding.cardView.progress = interpolation
+ updateCardViewTopLeftCornerSize(interpolation)
binding.executePendingBindings()
}
@@ -89,7 +92,7 @@ class EmailViewHolder(
// Animate the top left corner radius of the email card as swipe happens.
val interpolation = (currentSwipePercentage / swipeThreshold).coerceIn(0F, 1F)
val adjustedInterpolation = abs((if (isStarred) 1F else 0F) - interpolation)
- binding.cardView.progress = adjustedInterpolation
+ updateCardViewTopLeftCornerSize(adjustedInterpolation)
// Start the background animation once the threshold is met.
val thresholdMet = currentSwipePercentage >= swipeThreshold
@@ -105,4 +108,16 @@ class EmailViewHolder(
val email = binding.email ?: return
binding.listener?.onEmailStarChanged(email, !email.isStarred)
}
+
+ // We have to update the shape appearance itself to have the MaterialContainerTransform pick up
+ // the correct shape appearance, since it doesn't have access to the MaterialShapeDrawable
+ // interpolation. If you don't need this work around, prefer using MaterialShapeDrawable's
+ // interpolation property, or in the case of MaterialCardView, the progress property.
+ private fun updateCardViewTopLeftCornerSize(interpolation: Float) {
+ binding.cardView.apply {
+ shapeAppearanceModel = shapeAppearanceModel.toBuilder()
+ .setTopLeftCornerSize(interpolation * starredCornerSize)
+ .build()
+ }
+ }
}
\ No newline at end of file
diff --git a/Reply/app/src/main/java/com/materialstudies/reply/ui/home/HomeFragment.kt b/Reply/app/src/main/java/com/materialstudies/reply/ui/home/HomeFragment.kt
index bed81a8a..a564f9b7 100644
--- a/Reply/app/src/main/java/com/materialstudies/reply/ui/home/HomeFragment.kt
+++ b/Reply/app/src/main/java/com/materialstudies/reply/ui/home/HomeFragment.kt
@@ -20,32 +20,49 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
+import androidx.activity.OnBackPressedCallback
import androidx.core.view.doOnPreDraw
import androidx.fragment.app.Fragment
import androidx.lifecycle.observe
import androidx.navigation.fragment.FragmentNavigatorExtras
import androidx.navigation.fragment.findNavController
+import androidx.navigation.fragment.navArgs
import androidx.recyclerview.widget.ItemTouchHelper
-import com.google.android.material.transition.Hold
+import com.google.android.material.transition.MaterialElevationScale
+import com.google.android.material.transition.MaterialFadeThrough
import com.materialstudies.reply.R
import com.materialstudies.reply.data.Email
import com.materialstudies.reply.data.EmailStore
import com.materialstudies.reply.databinding.FragmentHomeBinding
+import com.materialstudies.reply.ui.MainActivity
import com.materialstudies.reply.ui.MenuBottomSheetDialogFragment
+import com.materialstudies.reply.ui.nav.NavigationModel
/**
* A [Fragment] that displays a list of emails.
*/
class HomeFragment : Fragment(), EmailAdapter.EmailAdapterListener {
+ private val args: HomeFragmentArgs by navArgs()
+
private lateinit var binding: FragmentHomeBinding
private val emailAdapter = EmailAdapter(this)
+ // An on back pressed callback that handles replacing any non-Inbox HomeFragment with inbox
+ // on back pressed.
+ private val nonInboxOnBackCallback = object : OnBackPressedCallback(false) {
+ override fun handleOnBackPressed() {
+ NavigationModel.setNavigationMenuItemChecked(NavigationModel.INBOX_ID)
+ (requireActivity() as MainActivity)
+ .navigateToHome(R.string.navigation_inbox, Mailbox.INBOX);
+ }
+ }
+
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
- exitTransition = Hold().apply {
- duration = resources.getInteger(R.integer.reply_motion_default_large).toLong()
+ enterTransition = MaterialFadeThrough().apply {
+ duration = resources.getInteger(R.integer.reply_motion_duration_large).toLong()
}
}
@@ -65,6 +82,14 @@ class HomeFragment : Fragment(), EmailAdapter.EmailAdapterListener {
postponeEnterTransition()
view.doOnPreDraw { startPostponedEnterTransition() }
+ // Only enable the on back callback if this home fragment is a mailbox other than Inbox.
+ // This is to make sure we always navigate back to Inbox before exiting the app.
+ nonInboxOnBackCallback.isEnabled = args.mailbox != Mailbox.INBOX
+ requireActivity().onBackPressedDispatcher.addCallback(
+ viewLifecycleOwner,
+ nonInboxOnBackCallback
+ )
+
binding.recyclerView.apply {
val itemTouchHelper = ItemTouchHelper(ReboundingSwipeActionCallback())
itemTouchHelper.attachToRecyclerView(this)
@@ -72,23 +97,30 @@ class HomeFragment : Fragment(), EmailAdapter.EmailAdapterListener {
}
binding.recyclerView.adapter = emailAdapter
- EmailStore.emails.observe(this) {
+ EmailStore.getEmails(args.mailbox).observe(viewLifecycleOwner) {
emailAdapter.submitList(it)
}
}
override fun onEmailClicked(cardView: View, email: Email) {
- val extras = FragmentNavigatorExtras(cardView to cardView.transitionName)
+ // Set exit and reenter transitions here as opposed to in onCreate because these transitions
+ // will be set and overwritten on HomeFragment for other navigation actions.
+ exitTransition = MaterialElevationScale(false).apply {
+ duration = resources.getInteger(R.integer.reply_motion_duration_large).toLong()
+ }
+ reenterTransition = MaterialElevationScale(true).apply {
+ duration = resources.getInteger(R.integer.reply_motion_duration_large).toLong()
+ }
+ val emailCardDetailTransitionName = getString(R.string.email_card_detail_transition_name)
+ val extras = FragmentNavigatorExtras(cardView to emailCardDetailTransitionName)
val directions = HomeFragmentDirections.actionHomeFragmentToEmailFragment(email.id)
findNavController().navigate(directions, extras)
}
override fun onEmailLongPressed(email: Email): Boolean {
- MenuBottomSheetDialogFragment(R.menu.email_bottom_sheet_menu) {
- // Do nothing.
- true
- }.show(requireFragmentManager(), null)
-
+ MenuBottomSheetDialogFragment
+ .newInstance(R.menu.email_bottom_sheet_menu)
+ .show(parentFragmentManager, null)
return true
}
@@ -99,4 +131,4 @@ class HomeFragment : Fragment(), EmailAdapter.EmailAdapterListener {
override fun onEmailArchived(email: Email) {
EmailStore.delete(email.id)
}
-}
\ No newline at end of file
+}
diff --git a/Reply/app/src/main/java/com/materialstudies/reply/ui/home/Mailbox.kt b/Reply/app/src/main/java/com/materialstudies/reply/ui/home/Mailbox.kt
new file mode 100644
index 00000000..b1dbec7c
--- /dev/null
+++ b/Reply/app/src/main/java/com/materialstudies/reply/ui/home/Mailbox.kt
@@ -0,0 +1,8 @@
+package com.materialstudies.reply.ui.home
+
+/**
+ * An enumeration of mailboxes into which emails can be placed.
+ */
+enum class Mailbox {
+ INBOX, STARRED, SENT, TRASH, SPAM, DRAFTS
+}
\ No newline at end of file
diff --git a/Reply/app/src/main/java/com/materialstudies/reply/ui/nav/BottomNavDrawerFragment.kt b/Reply/app/src/main/java/com/materialstudies/reply/ui/nav/BottomNavDrawerFragment.kt
index 354c5c91..7c1dfc0a 100644
--- a/Reply/app/src/main/java/com/materialstudies/reply/ui/nav/BottomNavDrawerFragment.kt
+++ b/Reply/app/src/main/java/com/materialstudies/reply/ui/nav/BottomNavDrawerFragment.kt
@@ -83,6 +83,9 @@ class BottomNavDrawerFragment :
private val sandwichSlideActions = mutableListOf()
+ private val navigationListeners: MutableList =
+ mutableListOf()
+
private val backgroundShapeDrawable: MaterialShapeDrawable by lazy(NONE) {
val backgroundContext = binding.backgroundContainer.context
MaterialShapeDrawable(
@@ -220,14 +223,14 @@ class BottomNavDrawerFragment :
val adapter = NavigationAdapter(this@BottomNavDrawerFragment)
navRecyclerView.adapter = adapter
- NavigationModel.navigationList.observe(this@BottomNavDrawerFragment) {
+ NavigationModel.navigationList.observe(viewLifecycleOwner) {
adapter.submitList(it)
}
NavigationModel.setNavigationMenuItemChecked(0)
val accountAdapter = AccountAdapter(this@BottomNavDrawerFragment)
accountRecyclerView.adapter = accountAdapter
- AccountStore.userAccounts.observe(this@BottomNavDrawerFragment) {
+ AccountStore.userAccounts.observe(viewLifecycleOwner) {
accountAdapter.submitList(it)
currentUserAccount = it.first { acc -> acc.isCurrentAccount }
}
@@ -261,6 +264,10 @@ class BottomNavDrawerFragment :
bottomSheetCallback.addOnStateChangedAction(action)
}
+ fun addNavigationListener(listener: NavigationAdapter.NavigationAdapterListener) {
+ navigationListeners.add(listener)
+ }
+
/**
* Add actions to be run when the slide offset (animation progress) or the sandwiching account
* picker has changed.
@@ -270,11 +277,13 @@ class BottomNavDrawerFragment :
}
override fun onNavMenuItemClicked(item: NavigationModelItem.NavMenuItem) {
- if (NavigationModel.setNavigationMenuItemChecked(item.id)) close()
+ NavigationModel.setNavigationMenuItemChecked(item.id)
+ close()
+ navigationListeners.forEach { it.onNavMenuItemClicked(item) }
}
override fun onNavEmailFolderClicked(folder: NavigationModelItem.NavEmailFolder) {
- // Do nothing
+ navigationListeners.forEach { it.onNavEmailFolderClicked(folder) }
}
override fun onAccountClicked(account: Account) {
diff --git a/Reply/app/src/main/java/com/materialstudies/reply/ui/nav/NavigationModel.kt b/Reply/app/src/main/java/com/materialstudies/reply/ui/nav/NavigationModel.kt
index 95da22f1..16764ad2 100644
--- a/Reply/app/src/main/java/com/materialstudies/reply/ui/nav/NavigationModel.kt
+++ b/Reply/app/src/main/java/com/materialstudies/reply/ui/nav/NavigationModel.kt
@@ -20,48 +20,62 @@ import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import com.materialstudies.reply.R
import com.materialstudies.reply.data.EmailStore
+import com.materialstudies.reply.ui.home.Mailbox
/**
* A class which maintains and generates a navigation list to be displayed by [NavigationAdapter].
*/
object NavigationModel {
+ const val INBOX_ID = 0
+ const val STARRED_ID = 1
+ const val SENT_ID = 2
+ const val TRASH_ID = 3
+ const val SPAM_ID = 4
+ const val DRAFTS_ID = 5
+
private var navigationMenuItems = mutableListOf(
NavigationModelItem.NavMenuItem(
- id = 0,
+ id = INBOX_ID,
icon = R.drawable.ic_twotone_inbox,
titleRes = R.string.navigation_inbox,
- checked = false
+ checked = false,
+ mailbox = Mailbox.INBOX
),
NavigationModelItem.NavMenuItem(
- id = 1,
+ id = STARRED_ID,
icon = R.drawable.ic_twotone_stars,
titleRes = R.string.navigation_starred,
- checked = false
+ checked = false,
+ mailbox = Mailbox.STARRED
),
NavigationModelItem.NavMenuItem(
- id = 2,
+ id = SENT_ID,
icon = R.drawable.ic_twotone_send,
titleRes = R.string.navigation_sent,
- checked = false
+ checked = false,
+ mailbox = Mailbox.SENT
),
NavigationModelItem.NavMenuItem(
- id = 3,
+ id = TRASH_ID,
icon = R.drawable.ic_twotone_delete,
titleRes = R.string.navigation_trash,
- checked = false
+ checked = false,
+ mailbox = Mailbox.TRASH
),
NavigationModelItem.NavMenuItem(
- id = 4,
+ id = SPAM_ID,
icon = R.drawable.ic_twotone_error,
titleRes = R.string.navigation_spam,
- checked = false
+ checked = false,
+ mailbox = Mailbox.SPAM
),
NavigationModelItem.NavMenuItem(
- id = 5,
+ id = DRAFTS_ID,
icon = R.drawable.ic_twotone_drafts,
titleRes = R.string.navigation_drafts,
- checked = false
+ checked = false,
+ mailbox = Mailbox.DRAFTS
)
)
diff --git a/Reply/app/src/main/java/com/materialstudies/reply/ui/nav/NavigationModelItem.kt b/Reply/app/src/main/java/com/materialstudies/reply/ui/nav/NavigationModelItem.kt
index 13aa0e51..245e8809 100644
--- a/Reply/app/src/main/java/com/materialstudies/reply/ui/nav/NavigationModelItem.kt
+++ b/Reply/app/src/main/java/com/materialstudies/reply/ui/nav/NavigationModelItem.kt
@@ -21,6 +21,7 @@ import androidx.annotation.StringRes
import androidx.recyclerview.widget.DiffUtil
import com.materialstudies.reply.data.EmailFolder
import com.materialstudies.reply.data.EmailFolderDiff
+import com.materialstudies.reply.ui.home.Mailbox
/**
* A sealed class which encapsulates all objects [NavigationAdapter] is able to display.
@@ -34,12 +35,13 @@ sealed class NavigationModelItem {
val id: Int,
@DrawableRes val icon: Int,
@StringRes val titleRes: Int,
+ val mailbox: Mailbox,
var checked: Boolean
) : NavigationModelItem()
/**
* A class which is used to show a section divider (a subtitle and underline) between
- * sections of differen NavigationModelItem types.
+ * sections of different NavigationModelItem types.
*/
data class NavDivider(val title: String) : NavigationModelItem()
diff --git a/Reply/app/src/main/java/com/materialstudies/reply/ui/search/SearchFragment.kt b/Reply/app/src/main/java/com/materialstudies/reply/ui/search/SearchFragment.kt
new file mode 100644
index 00000000..e06d9ace
--- /dev/null
+++ b/Reply/app/src/main/java/com/materialstudies/reply/ui/search/SearchFragment.kt
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.materialstudies.reply.ui.search
+
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.annotation.StringRes
+import androidx.fragment.app.Fragment
+import androidx.navigation.fragment.findNavController
+import com.google.android.material.transition.MaterialSharedAxis
+import com.materialstudies.reply.R
+import com.materialstudies.reply.data.SearchSuggestion
+import com.materialstudies.reply.data.SearchSuggestionStore
+import com.materialstudies.reply.databinding.FragmentSearchBinding
+import com.materialstudies.reply.databinding.SearchSuggestionItemBinding
+import com.materialstudies.reply.databinding.SearchSuggestionTitleBinding
+
+/**
+ * A [Fragment] that displays search.
+ */
+class SearchFragment : Fragment() {
+
+ private lateinit var binding: FragmentSearchBinding
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+
+ enterTransition = MaterialSharedAxis(MaterialSharedAxis.Z, true).apply {
+ duration = resources.getInteger(R.integer.reply_motion_duration_large).toLong()
+ }
+ returnTransition = MaterialSharedAxis(MaterialSharedAxis.Z, false).apply {
+ duration = resources.getInteger(R.integer.reply_motion_duration_large).toLong()
+ }
+ }
+
+ override fun onCreateView(
+ inflater: LayoutInflater,
+ container: ViewGroup?,
+ savedInstanceState: Bundle?
+ ): View? {
+ binding = FragmentSearchBinding.inflate(inflater, container, false)
+ return binding.root
+ }
+
+ override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
+ binding.searchToolbar.setNavigationOnClickListener { findNavController().navigateUp() }
+ setUpSuggestions(binding.searchSuggestionContainer)
+ }
+
+ private fun setUpSuggestions(suggestionContainer: ViewGroup) {
+ addSuggestionTitleView(suggestionContainer, R.string.search_suggestion_title_yesterday)
+ addSuggestionItemViews(suggestionContainer, SearchSuggestionStore.YESTERDAY_SUGGESTIONS)
+ addSuggestionTitleView(suggestionContainer, R.string.search_suggestion_title_this_week)
+ addSuggestionItemViews(suggestionContainer, SearchSuggestionStore.THIS_WEEK_SUGGESTIONS)
+ }
+
+ private fun addSuggestionTitleView(parent: ViewGroup, @StringRes titleResId: Int) {
+ val inflater = LayoutInflater.from(parent.context)
+ val titleBinding = SearchSuggestionTitleBinding.inflate(inflater, parent, false)
+ titleBinding.title = titleResId
+ parent.addView(titleBinding.root)
+ }
+
+ private fun addSuggestionItemViews(parent: ViewGroup, suggestions: List) {
+ suggestions.forEach {
+ val inflater = LayoutInflater.from(parent.context)
+ val suggestionBinding = SearchSuggestionItemBinding.inflate(inflater, parent, false)
+ suggestionBinding.suggestion = it
+ parent.addView(suggestionBinding.root)
+ }
+ }
+}
diff --git a/Reply/app/src/main/res/drawable/ic_arrow_back.xml b/Reply/app/src/main/res/drawable/ic_arrow_back.xml
new file mode 100644
index 00000000..9010d5a8
--- /dev/null
+++ b/Reply/app/src/main/res/drawable/ic_arrow_back.xml
@@ -0,0 +1,23 @@
+
+
+
+
diff --git a/Reply/app/src/main/res/drawable/ic_circle.xml b/Reply/app/src/main/res/drawable/ic_circle.xml
new file mode 100644
index 00000000..034efc39
--- /dev/null
+++ b/Reply/app/src/main/res/drawable/ic_circle.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/Reply/app/src/main/res/drawable/ic_close.xml b/Reply/app/src/main/res/drawable/ic_close.xml
index 6f3ecca2..a5a582fc 100644
--- a/Reply/app/src/main/res/drawable/ic_close.xml
+++ b/Reply/app/src/main/res/drawable/ic_close.xml
@@ -1,6 +1,6 @@
+
+
+
diff --git a/Reply/app/src/main/res/drawable/ic_home.xml b/Reply/app/src/main/res/drawable/ic_home.xml
new file mode 100644
index 00000000..b67a592d
--- /dev/null
+++ b/Reply/app/src/main/res/drawable/ic_home.xml
@@ -0,0 +1,23 @@
+
+
+
+
diff --git a/Reply/app/src/main/res/drawable/ic_mic.xml b/Reply/app/src/main/res/drawable/ic_mic.xml
new file mode 100644
index 00000000..af66ae73
--- /dev/null
+++ b/Reply/app/src/main/res/drawable/ic_mic.xml
@@ -0,0 +1,23 @@
+
+
+
+
diff --git a/Reply/app/src/main/res/drawable/ic_schedule.xml b/Reply/app/src/main/res/drawable/ic_schedule.xml
new file mode 100644
index 00000000..072727fc
--- /dev/null
+++ b/Reply/app/src/main/res/drawable/ic_schedule.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
diff --git a/Reply/app/src/main/res/layout/email_item_layout.xml b/Reply/app/src/main/res/layout/email_item_layout.xml
index 5d77e90a..b9d97f87 100644
--- a/Reply/app/src/main/res/layout/email_item_layout.xml
+++ b/Reply/app/src/main/res/layout/email_item_layout.xml
@@ -45,7 +45,6 @@
android:onClick="@{(view) -> listener.onEmailClicked(view, email)}"
android:onLongClick="@{(view) -> listener.onEmailLongPressed(email)}"
app:cardPreventCornerOverlap="false"
- app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.Reply.MediumComponent.Marked"
android:transitionName="@{@string/email_card_transition_name(email.id)}">
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools">
+
@@ -196,6 +201,123 @@
android:textAppearance="?attr/textAppearanceBody1"
app:lineHeight="24sp" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Reply/app/src/main/res/layout/fragment_email.xml b/Reply/app/src/main/res/layout/fragment_email.xml
index 99685fb0..05be8841 100644
--- a/Reply/app/src/main/res/layout/fragment_email.xml
+++ b/Reply/app/src/main/res/layout/fragment_email.xml
@@ -37,7 +37,7 @@
android:id="@+id/email_card_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:transitionName="@{@string/email_card_transition_name(email.id)}">
+ android:transitionName="@string/email_card_detail_transition_name">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Reply/app/src/main/res/layout/search_suggestion_item.xml b/Reply/app/src/main/res/layout/search_suggestion_item.xml
new file mode 100644
index 00000000..cb27fc89
--- /dev/null
+++ b/Reply/app/src/main/res/layout/search_suggestion_item.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Reply/app/src/main/res/layout/search_suggestion_title.xml b/Reply/app/src/main/res/layout/search_suggestion_title.xml
new file mode 100644
index 00000000..58710ecb
--- /dev/null
+++ b/Reply/app/src/main/res/layout/search_suggestion_title.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/Reply/app/src/main/res/navigation/navigation_graph.xml b/Reply/app/src/main/res/navigation/navigation_graph.xml
index 2e23a438..099a4db3 100644
--- a/Reply/app/src/main/res/navigation/navigation_graph.xml
+++ b/Reply/app/src/main/res/navigation/navigation_graph.xml
@@ -13,13 +13,18 @@
the License.
-->
+ android:label="HomeFragment">
+
@@ -41,7 +46,20 @@
app:argType="long"
android:defaultValue="-1L"/>
+
+
-
\ No newline at end of file
+
+
diff --git a/Reply/app/src/main/res/values/attrs.xml b/Reply/app/src/main/res/values/attrs.xml
index e040652e..417ec515 100644
--- a/Reply/app/src/main/res/values/attrs.xml
+++ b/Reply/app/src/main/res/values/attrs.xml
@@ -31,6 +31,4 @@
-
-
\ No newline at end of file
diff --git a/Reply/app/src/main/res/values/dimens.xml b/Reply/app/src/main/res/values/dimens.xml
index 457450bd..28727fe5 100644
--- a/Reply/app/src/main/res/values/dimens.xml
+++ b/Reply/app/src/main/res/values/dimens.xml
@@ -30,6 +30,8 @@
42dp
+ 6dp
+ 3dp
32dp
diff --git a/Reply/app/src/main/res/values/motion.xml b/Reply/app/src/main/res/values/motion.xml
index cf24acb0..81e5b031 100644
--- a/Reply/app/src/main/res/values/motion.xml
+++ b/Reply/app/src/main/res/values/motion.xml
@@ -16,7 +16,7 @@
- 300
+ 300
225
175
diff --git a/Reply/app/src/main/res/values/shape.xml b/Reply/app/src/main/res/values/shape.xml
index 1da8de85..7403dd95 100644
--- a/Reply/app/src/main/res/values/shape.xml
+++ b/Reply/app/src/main/res/values/shape.xml
@@ -31,12 +31,6 @@
- @dimen/reply_large_component_corner_radius
-
-
-
-
24dp
0dp
12dp
diff --git a/Reply/app/src/main/res/values/strings.xml b/Reply/app/src/main/res/values/strings.xml
index 6b5934bf..abf47617 100644
--- a/Reply/app/src/main/res/values/strings.xml
+++ b/Reply/app/src/main/res/values/strings.xml
@@ -41,7 +41,7 @@
Inbox
Starred
- Send
+ Sent
Trash
Spam
Drafts
@@ -53,6 +53,7 @@
To %1$s
email_card_%1$s
+ email_card_detail
Close editing email
@@ -61,4 +62,9 @@
Subject
New message…
Recipients
+
+
+ Search email
+ YESTERDAY
+ THIS WEEK
diff --git a/Reply/build.gradle b/Reply/build.gradle
index 9a441109..1ef24fc2 100644
--- a/Reply/build.gradle
+++ b/Reply/build.gradle
@@ -14,17 +14,15 @@
buildscript {
ext {
- kotlin_version = '1.3.50'
- navigation_version = '2.2.0-beta01'
+ kotlin_version = '1.4.21'
+ navigation_version = '2.3.2'
}
repositories {
google()
jcenter()
}
dependencies{
- // Wait to move to 3.6 until ConstraintLayout related attribute bugs are resolved. See
- // https://issuetracker.google.com/issues/138601946 for more details.
- classpath 'com.android.tools.build:gradle:3.5.0'
+ classpath 'com.android.tools.build:gradle:4.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigation_version"
@@ -39,7 +37,3 @@ allprojects {
jcenter()
}
}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
diff --git a/Reply/gradle.properties b/Reply/gradle.properties
index dbf9c126..df995589 100644
--- a/Reply/gradle.properties
+++ b/Reply/gradle.properties
@@ -6,7 +6,6 @@
# 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.
-android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
diff --git a/Reply/gradle/wrapper/gradle-wrapper.properties b/Reply/gradle/wrapper/gradle-wrapper.properties
index 1bd6748e..58947f54 100644
--- a/Reply/gradle/wrapper/gradle-wrapper.properties
+++ b/Reply/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Mon Oct 21 09:40:35 PDT 2019
+#Mon Nov 02 15:31:58 GMT 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip