-
Notifications
You must be signed in to change notification settings - Fork 3
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
Use view binding instead of findViewById #475
base: master
Are you sure you want to change the base?
Conversation
@@ -20,17 +20,16 @@ | |||
<ScrollView | |||
xmlns:android="http://schemas.android.com/apk/res/android" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" |
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.
It seems to be a bug in the Android library because this layout was working with the previous implementation but with view binding the margins were not recognized anymore.
The year picker makes the title invisible
cc3cf97
to
349b367
Compare
app/src/main/java/com/yacgroup/yacguide/BaseNavigationActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/yacgroup/yacguide/activity_properties/AscentFilterable.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/yacgroup/yacguide/activity_properties/RockSearchable.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/yacgroup/yacguide/activity_properties/RockSearchable.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/yacgroup/yacguide/activity_properties/RockSearchable.kt
Outdated
Show resolved
Hide resolved
@@ -152,7 +152,6 @@ | |||
<string name="ascend_edit_date">Datum:</string> | |||
<string name="ascend_edit_style">Stil:</string> | |||
<string name="ascend_edit_title">Begehung bearbeiten</string> | |||
<string name="select_year">Jahr auswählen</string> |
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.
Don't we display this anymore?
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.
Inflating the year picker layout into the dialog somehow overrides the complete dialog, including the title. Look good for me.
67515aa
to
4cc6c5c
Compare
069b19a
to
f5cd638
Compare
@@ -66,7 +67,7 @@ abstract class TableActivity : BaseNavigationActivity() { | |||
Comment( | |||
text = it.text.orEmpty(), | |||
properties = listOf( | |||
CommentProperty(R.id.qualityLayout, R.string.relevance, RegionComment.QUALITY_MAP, it.qualityId) | |||
CommentProperty(R.string.relevance, RegionComment.QUALITY_MAP, it.qualityId) |
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.
- Please check e.g. in Zittauer Gebirge - Weißbachtal - Kleiner Grenzkogel - Alter Weg. When showing the comments dialog, the comment's text is placed above the drying info, which is a regression. Another example is Zittauer Gebirge - Weißbachtal - Kleiner Grenzkogel - Alter Weg. In the first comment, the comment's text is placed above protection, too.
Seems to be a flakiness since most comments look ok as far as I could see.
View binding is has some technical advantages. See https://developer.android.com/topic/libraries/view-binding. I think also it is much clearer which element is accessed where. Search through the layout is not so easy to understand. However, there are still some code that uses
findViewById
which cannot easily changed.