-
Notifications
You must be signed in to change notification settings - Fork 3
[Android-3721] Copy design module from publish to samples app #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hackertronix
wants to merge
1
commit into
main
Choose a base branch
from
task/copy-design-module-to-samples
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
apply plugin: 'com.android.library' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'kotlin-android-extensions' | ||
|
||
android { | ||
compileSdkVersion 29 | ||
defaultConfig { | ||
minSdkVersion 21 | ||
targetSdkVersion 29 | ||
} | ||
} | ||
dependencies { | ||
api project(':app') | ||
implementation 'com.google.android.material:material:1.1.0' | ||
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72" | ||
} |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="org.buffer.android.components.design" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<set xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:duration="250" | ||
android:interpolator="@android:anim/accelerate_decelerate_interpolator"> | ||
|
||
<translate | ||
android:fromYDelta="20%p" | ||
android:toYDelta="0"/> | ||
|
||
<alpha | ||
android:fromAlpha="0.0" | ||
android:toAlpha="1.0"/> | ||
|
||
</set> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<set xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:duration="200" | ||
android:interpolator="@android:anim/accelerate_interpolator"> | ||
|
||
<translate | ||
android:fromYDelta="0" | ||
android:toYDelta="20%p"/> | ||
|
||
<alpha | ||
android:fromAlpha="1.0" | ||
android:toAlpha="0.0"/> | ||
|
||
</set> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions
13
design/src/main/res/drawable/grey_bordered_background_ripple.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<ripple xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:color="?android:colorControlHighlight"> | ||
<item> | ||
<shape android:shape="rectangle"> | ||
<solid android:color="?colorOnSurface" /> | ||
<corners android:radius="4dp" /> | ||
<stroke | ||
android:width="0.5dp" | ||
android:color="@color/color_on_surface_border" /> | ||
</shape> | ||
</item> | ||
</ripple> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="12dp" | ||
android:height="12dp" | ||
android:viewportWidth="12" | ||
android:viewportHeight="12"> | ||
<path | ||
android:pathData="M6,6m-6,0a6,6 0,1 1,12 0a6,6 0,1 1,-12 0" | ||
android:fillColor="#9C2BFF"/> | ||
</vector> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="24" | ||
android:viewportHeight="24"> | ||
<path | ||
android:pathData="M21.2135,1.2557C20.6277,0.67 19.6779,0.67 19.0922,1.2557L18.0315,2.3164L21.2135,5.4984L22.2741,4.4377C22.8599,3.8519 22.8599,2.9022 22.2741,2.3164L21.2135,1.2557Z" | ||
android:fillColor="#ffffff"/> | ||
<path | ||
android:pathData="M16.9709,3.377L20.1529,6.559L7.425,19.2869L3.8531,21.0728C3.4525,21.2731 2.9687,21.1946 2.652,20.8779C2.3353,20.5612 2.2567,20.0774 2.4571,19.6768L4.243,16.1049L16.9709,3.377Z" | ||
android:fillColor="#ffffff"/> | ||
</vector> |
5 changes: 5 additions & 0 deletions
5
design/src/main/res/drawable/white_background_gray_ripple.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<ripple xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:color="?colorOnSurface"> | ||
<item android:drawable="@color/white" /> | ||
</ripple> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<style name="Base.PublishThemeBuilder" parent="Theme.MaterialComponents.DayNight.NoActionBar"> | ||
<item name="android:statusBarColor">?colorSurface</item> | ||
<item name="android:windowLightStatusBar">true</item> | ||
<item name="android:navigationBarColor">@color/black</item> | ||
<item name="android:navigationBarDividerColor" tools:ignore="NewApi">?colorControlHighlight</item> | ||
|
||
<item name="colorPrimaryDark">?colorPrimaryVariant</item> | ||
<item name="colorAccent">?colorSecondary</item> | ||
</style> | ||
</resources> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<color name="color_primary">@color/white</color> | ||
<color name="color_primary_variant">@color/gray_darker</color> | ||
<color name="color_secondary">@color/curious_blue</color> | ||
<color name="color_secondary_variant">@color/curious_blue_dark</color> | ||
|
||
<!--colorBackground appears behind scrollable content and is used for the default window--> | ||
<!--background. colorSurface is mapped to the surface of components such as cards, sheets--> | ||
<!--and menus. colorError is used to indicate an error state for components such as--> | ||
<!--text fields.--> | ||
<color name="color_background">@color/gray_lighter</color> | ||
<color name="color_surface">@color/white</color> | ||
<color name="color_error">@color/red_dark</color> | ||
|
||
<!--"On" colors define how text, icons and strokes are colored in relation to the surface--> | ||
<!--on which they appear.--> | ||
<color name="color_on_primary">@color/text_primary</color> | ||
<color name="color_on_primary_inverse">@color/white</color> | ||
<color name="color_on_primary_70">#E63D3D3D</color> | ||
<color name="color_on_primary_20">#333D3D3D</color> | ||
<color name="color_primary_as_surface">#F5F5F5</color> | ||
<color name="color_secondary_as_surface">#1A2C4BFF</color> | ||
<color name="color_on_secondary">@color/white</color> | ||
<color name="color_on_background">@color/text_secondary</color> | ||
<color name="color_on_surface">@color/gray_lighter</color> | ||
<color name="color_on_surface_border">@color/gray_light</color> | ||
<color name="color_on_error">@color/white</color> | ||
|
||
<color name="message_background">#f4f7f9</color> | ||
<color name="unselected_item">#B8B8B8</color> | ||
<color name="text_on_colored_surface">@color/black</color> | ||
<color name="text_on_surface">@color/gray_dark</color> | ||
<color name="search_background">@color/gray_lighter</color> | ||
|
||
<color name="text_primary">@color/gray_darker</color> | ||
<color name="text_secondary">@color/gray_dark</color> | ||
</resources> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<dimen name="material_card_stroke_width">0.5dp</dimen> | ||
<dimen name="button_radius">4dp</dimen> | ||
<dimen name="content_action_padding">6dp</dimen> | ||
|
||
<dimen name="one_space">8dp</dimen> | ||
<dimen name="two_space">16dp</dimen> | ||
|
||
<dimen name="item_content_vertical_padding">0dp</dimen> | ||
<dimen name="item_content_horizontal_padding">0dp</dimen> | ||
|
||
<dimen name="buffer_card_width">340dp</dimen> | ||
<dimen name="tabbed_content_top_margin_to_center">180dp</dimen> | ||
<dimen name="error_view_top_offset">-120dp</dimen> | ||
</resources> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!-- | ||
~ Copyright (C) 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. | ||
--> | ||
|
||
<resources> | ||
|
||
<!--Motion--> | ||
|
||
<style name="Animation.MyTheme.BottomSheet.Modal" parent="Animation.AppCompat.Dialog"> | ||
<item name="android:windowEnterAnimation">@anim/bottom_sheet_slide_in</item> | ||
<item name="android:windowExitAnimation">@anim/bottom_sheet_slide_out</item> | ||
</style> | ||
|
||
</resources> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<resources xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<style name="ThemeOverlay.PublishTheme.BottomSheetDialog" parent="ThemeOverlay.MaterialComponents.Dialog"> | ||
<item name="android:windowIsFloating">false</item> | ||
<item name="android:windowBackground">@android:color/transparent</item> | ||
<item name="android:windowAnimationStyle">@style/Animation.MyTheme.BottomSheet.Modal</item> | ||
<item name="android:statusBarColor">@android:color/transparent</item> | ||
<item name="bottomSheetStyle">@style/Widget.PublishTheme.BottomSheet.Modal</item> | ||
<item name="android:navigationBarColor">?colorSurface</item> | ||
<item name="android:navigationBarDividerColor" tools:ignore="NewApi">@android:color/transparent</item> | ||
</style> | ||
|
||
<style name="Widget.PublishTheme.BottomSheet.Modal" parent="Widget.MaterialComponents.BottomSheet.Modal"> | ||
<item name="shapeAppearanceOverlay">?shapeAppearanceLargeComponent</item> | ||
</style> | ||
|
||
<style name="Widget.PublishTheme.NavigationView" parent="Widget.MaterialComponents.NavigationView"> | ||
<item name="itemTextAppearance">?textAppearanceBody2</item> | ||
</style> | ||
|
||
<style name="ThemeOverlay.PublishTheme.TextButton" parent="Widget.MaterialComponents.Button.TextButton"> | ||
<item name="rippleColor">@color/color_on_primary_20</item> | ||
</style> | ||
</resources> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<style name="PublishTheme.DayNight" parent="Base.PublishTheme"/> | ||
|
||
<style name="Base.PublishTheme" parent="Base.PublishThemeBuilder"> | ||
<item name="colorPrimary">@color/color_primary</item> | ||
<item name="colorPrimaryVariant">@color/color_primary_variant</item> | ||
<item name="colorPrimaryDark">@color/color_on_primary</item> | ||
<item name="colorSecondary">@color/color_secondary</item> | ||
<item name="colorSecondaryVariant">@color/color_secondary_variant</item> | ||
|
||
<item name="android:colorBackground">@color/color_background</item> | ||
<item name="colorSurface">@color/color_surface</item> | ||
<item name="colorError">@color/color_error</item> | ||
|
||
<item name="colorOnPrimary">@color/color_on_primary</item> | ||
<item name="colorOnSecondary">@color/color_on_secondary</item> | ||
<item name="colorOnBackground">@color/color_on_background</item> | ||
<item name="colorOnSurface">@color/color_on_surface</item> | ||
<item name="colorOnError">@color/color_on_error</item> | ||
<item name="android:windowBackground">@color/color_background</item> | ||
|
||
<item name="materialAlertDialogTheme">@style/MaterialDialogTheme</item> | ||
<item name="bottomSheetDialogTheme">@style/ThemeOverlay.PublishTheme.BottomSheetDialog</item> | ||
<item name="navigationViewStyle">@style/Widget.PublishTheme.NavigationView</item> | ||
<item name="toolbarStyle">@style/ToolbarTheme</item> | ||
<item name="snackbarStyle">@style/SnackbarTheme</item> | ||
<item name="textInputStyle">@style/TextInputLayoutTheme</item> | ||
<item name="colorControlNormal">?android:textColorPrimary</item> | ||
<item name="android:textColorPrimary">@color/text_primary</item> | ||
<item name="android:textColorSecondary">@color/text_secondary</item> | ||
</style> | ||
|
||
<style name="TextInputLayoutTheme" parent="Widget.MaterialComponents.TextInputLayout.FilledBox"> | ||
<item name="boxBackgroundColor">@color/gray_lighter</item> | ||
<item name="android:textColorHint">?android:textColorSecondary</item> | ||
<item name="hintTextColor">?colorSecondary</item> | ||
<item name="materialThemeOverlay">@style/TextInputLayoutAppearance</item> | ||
</style> | ||
|
||
<style name="TextInputLayoutAppearance" parent="ThemeOverlay.MaterialComponents.TextInputEditText.FilledBox"> | ||
<item name="colorControlNormal">?colorSecondary</item> | ||
<item name="colorControlActivated">?colorSecondary</item> | ||
<item name="colorControlHighlight">?colorSecondary</item> | ||
</style> | ||
|
||
<style name="MaterialDialogTheme" parent="ThemeOverlay.MaterialComponents.MaterialAlertDialog"> | ||
<item name="buttonBarPositiveButtonStyle">@style/AlertButtonStyle</item> | ||
<item name="buttonBarNegativeButtonStyle">@style/AlertButtonStyle</item> | ||
<item name="buttonBarNeutralButtonStyle">@style/AlertButtonStyle</item> | ||
<item name="materialAlertDialogTitleTextStyle">@style/TitleTextStyle</item> | ||
<item name="materialAlertDialogBodyTextStyle">@style/BodyTextStyle</item> | ||
</style> | ||
|
||
<style name="TitleTextStyle" parent="MaterialAlertDialog.MaterialComponents.Title.Text"> | ||
<item name="android:textColor">?android:textColorPrimary</item> | ||
<item name="android:textStyle">bold</item> | ||
<item name="android:textSize">@dimen/text_title</item> | ||
</style> | ||
|
||
<style name="BodyTextStyle" parent="MaterialAlertDialog.MaterialComponents.Body.Text"> | ||
<item name="android:textColor">?android:textColorPrimary</item> | ||
<item name="android:textSize">@dimen/text_body</item> | ||
</style> | ||
|
||
<style name="AlertButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog"> | ||
<item name="android:textColor">@color/colorAccent</item> | ||
</style> | ||
|
||
<style name="SnackbarTheme" parent="@style/Widget.MaterialComponents.Snackbar"> | ||
<item name="android:background">@color/gray_darker</item> | ||
</style> | ||
|
||
<style name="ToolbarTheme" parent="@style/Widget.MaterialComponents.Toolbar.Surface"> | ||
<item name="titleTextColor">?android:textColorPrimary</item> | ||
<item name="colorControlNormal">?android:textColorPrimary</item> | ||
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item> | ||
</style> | ||
|
||
<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle"> | ||
<item name="color">?android:textColorPrimary</item> | ||
</style> | ||
|
||
<style name="Base.PublishThemeBuilder" parent="Theme.MaterialComponents.DayNight.NoActionBar"> | ||
<item name="android:statusBarColor">?colorOnBackground</item> | ||
<item name="android:navigationBarColor">?colorPrimaryVariant</item> | ||
<item name="android:navigationBarDividerColor" tools:ignore="NewApi">?colorControlHighlight</item> | ||
|
||
<item name="colorPrimaryDark">?colorPrimaryVariant</item> | ||
<item name="colorAccent">?colorSecondary</item> | ||
</style> | ||
|
||
<style name="Publish.NoActionBar" parent="PublishTheme.DayNight"> | ||
<item name="windowActionBar">false</item> | ||
<item name="windowNoTitle">true</item> | ||
</style> | ||
|
||
</resources> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how come design needs to know about app?