Skip to content

Commit

Permalink
fix search result layout width (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
odaridavid authored May 1, 2020
1 parent a3bf5de commit 04922e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class SearchResultAdapter(val onClick: (StarWarsCharacterUiModel) -> Unit) :
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): SearchedCharacterViewHolder {
val context = parent.context
val inflater = LayoutInflater.from(context)
return SearchedCharacterViewHolder(SearchResultLayoutItemBinding.inflate(inflater))
return SearchedCharacterViewHolder(SearchResultLayoutItemBinding.inflate(inflater,parent,false))
}

override fun onBindViewHolder(holder: SearchedCharacterViewHolder, position: Int): Unit =
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/search_result_layout_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<TextView
android:id="@+id/character_birth_year_text_view"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto_light"
android:text='@{searchedCharacter.birthYear}'
Expand All @@ -43,7 +43,6 @@
android:layout_height="wrap_content"
android:backgroundTint="@android:color/background_light"
android:contentDescription="@string/content_description_more_info_arrow"
app:layout_constraintStart_toEndOf="@id/character_name_text_view"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
Expand Down

0 comments on commit 04922e7

Please sign in to comment.