-
Notifications
You must be signed in to change notification settings - Fork 52
Material 3 #136
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
base: master
Are you sure you want to change the base?
Material 3 #136
Changes from 2 commits
f6d7bb6
cbcf1aa
f7d0301
43ac305
697b347
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,7 +30,7 @@ fun Context.toastUpToDate() = toastShortly("You are up to date") | |
|
|
||
| fun Context.getVersionName(): String { | ||
| val packageInfo = packageManager.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES) | ||
| return packageInfo.versionName | ||
| return packageInfo.versionName!! | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If versionName is ever null this will cause a crash. Could you update it to avoid it?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed now :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
| } | ||
|
|
||
| fun Context.dpToPixel(dp: Float): Float = | ||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| <item android:color="@color/colorPrimary" android:state_enabled="true"/> | ||
| <item android:color="@color/colorDarkGray" android:state_enabled="false"/> | ||
| <item android:color="?attr/colorPrimary" android:state_enabled="true"/> | ||
| <item android:color="?attr/colorOnSurfaceVariant" android:state_enabled="false"/> | ||
| </selector> |
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <shape xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
|
||
| <solid android:color="@color/colorItemBackground"/> | ||
| <solid android:color="?attr/colorSurfaceContainerLow"/> | ||
|
|
||
| <corners | ||
| android:topLeftRadius="10dp" | ||
| android:topRightRadius="10dp" /> | ||
| android:topLeftRadius="16dp" | ||
| android:topRightRadius="16dp" /> | ||
|
|
||
| </shape> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <shape xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
|
||
| <solid android:color="@color/colorItemBackground"/> | ||
| <solid android:color="?attr/colorSurfaceContainerLow"/> | ||
|
|
||
| <corners | ||
| android:topLeftRadius="10dp" | ||
| android:topRightRadius="10dp" /> | ||
| android:topLeftRadius="16dp" | ||
| android:topRightRadius="16dp" /> | ||
|
|
||
| </shape> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:shape="rectangle"> | ||
| <corners android:radius="5dp"/> | ||
| <corners android:radius="8dp"/> | ||
| </shape> |
This file was deleted.
This file was deleted.
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.
If prefixEditText is ever null this will cause a crash. Could you update it to avoid it?
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.
Sorry I have no idea why I made those changes in the first place. 😄
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.
Hey, you added it because otherwise, it would cause a compilation error. Right now, reverting it makes the code fail to compile. The ideal approach would be to write it in a more null-safe way. For example, you could add a .orEmpty().
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.
Done.