File tree Expand file tree Collapse file tree 14 files changed +69
-19
lines changed
Expand file tree Collapse file tree 14 files changed +69
-19
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import androidx.fragment.app.FragmentManager
1515import androidx.recyclerview.widget.LinearLayoutManager
1616import androidx.recyclerview.widget.RecyclerView
1717import app.opass.ccip.R
18+ import app.opass.ccip.extension.updateMargin
1819import com.google.android.material.dialog.MaterialAlertDialogBuilder
1920
2021class LanguagePreferenceFragment : DialogFragment () {
@@ -140,6 +141,14 @@ class LanguagePreferenceAdapter(
140141 holder.localName.text = item.localName
141142 holder.translatedName.text = item.translatedName
142143
144+ if (position == 0 ) {
145+ holder.optionItem.updateMargin(top = 36 )
146+ }
147+
148+ if (position == items.size - 1 ) {
149+ holder.optionItem.updateMargin(bottom = 36 )
150+ }
151+
143152 if (! isSelected) {
144153 holder.selectedIcon.setImageDrawable(null )
145154 } else {
Original file line number Diff line number Diff line change @@ -3,10 +3,13 @@ package app.opass.ccip.ui.wifi
33import android.view.LayoutInflater
44import android.view.View
55import android.view.ViewGroup
6+ import android.widget.LinearLayout
67import android.widget.TextView
78import androidx.core.view.isGone
9+ import androidx.core.view.marginTop
810import androidx.recyclerview.widget.RecyclerView
911import app.opass.ccip.R
12+ import app.opass.ccip.extension.updateMargin
1013import app.opass.ccip.model.WifiNetworkInfo
1114
1215class WifiNetworkAdapter (
@@ -38,10 +41,19 @@ class WifiNetworkAdapter(
3841
3942 holder.password.text = item.password
4043 holder.password.isGone = false
44+
45+ if (position == 0 ) {
46+ holder.networkItem.updateMargin(top = 36 )
47+ }
48+
49+ if (position == items.size - 1 ) {
50+ holder.networkItem.updateMargin(bottom = 36 )
51+ }
4152 }
4253}
4354
4455class WifiNetworkViewHolder (view : View ) : RecyclerView.ViewHolder(view) {
56+ val networkItem: LinearLayout = view.findViewById(R .id.network_item)
4557 val name: TextView = view.findViewById(R .id.network_name)
4658 val password: TextView = view.findViewById(R .id.network_password)
4759}
Original file line number Diff line number Diff line change 22<selector xmlns : android =" http://schemas.android.com/apk/res/android" >
33 <item >
44 <shape android : shape =" oval" >
5- <solid android : color =" @color/colorPrimary " />
5+ <solid android : color =" @color/backgroundColorAccent " />
66 </shape >
77 </item >
88</selector >
Original file line number Diff line number Diff line change 22<shape xmlns : android =" http://schemas.android.com/apk/res/android"
33 android : shape =" rectangle" >
44
5- <solid android : color =" ?attr/colorAccent " />
5+ <solid android : color =" @color/colorAccentDark " />
66
77 <corners android : radius =" 16dp" />
88</shape >
Original file line number Diff line number Diff line change 6565 android : layout_height =" wrap_content"
6666 android : layout_margin =" @dimen/fab_margin"
6767 android : src =" @drawable/ic_star_border_white_48dp"
68+ app : backgroundTint =" @color/colorPrimary"
6869 app : layout_anchor =" @id/app_bar"
6970 app : layout_anchorGravity =" bottom|end" />
7071
Original file line number Diff line number Diff line change 2626 android : layout_gravity =" bottom|end"
2727 android : layout_margin =" 16dp"
2828 android : contentDescription =" @string/filter"
29- android : tint =" ?attr/colorOnSecondary"
29+ app : backgroundTint =" @color/colorPrimary"
30+ android : tint =" ?attr/colorOnPrimary"
3031 android : visibility =" invisible"
3132 app : srcCompat =" @drawable/ic_baseline_filter_list_24" />
3233
Original file line number Diff line number Diff line change 1818
1919 <Button
2020 android : id =" @+id/not_this_event"
21- style =" @style/Widget.MaterialComponents.Button. TextButton"
21+ style =" @style/TextButton"
2222 android : layout_width =" wrap_content"
2323 android : layout_height =" wrap_content"
2424 android : layout_gravity =" center_horizontal"
Original file line number Diff line number Diff line change 2323 <RelativeLayout
2424 android : layout_width =" match_parent"
2525 android : layout_height =" 150dp"
26- android : background =" ?attr/colorSecondary " >
26+ android : background =" @color/backgroundColorAccent " >
2727
2828 <ImageView
2929 android : id =" @+id/event_logo"
3030 android : layout_width =" wrap_content"
3131 android : layout_height =" wrap_content"
3232 android : layout_centerInParent =" true"
3333 android : padding =" 10dp"
34- card_view : srcCompat =" ?attr/colorSecondary " />
34+ card_view : srcCompat =" @color/backgroundColorAccent " />
3535 </RelativeLayout >
3636
3737 <TextView
Original file line number Diff line number Diff line change 99 android : background =" ?attr/selectableItemBackground"
1010 android : focusable =" true"
1111 android : orientation =" horizontal"
12- android : paddingStart = " 32dp "
13- android : paddingTop = " 16dp "
14- android : paddingEnd = " 16dp "
15- android : paddingBottom = " 16dp " >
12+ android : paddingTop = " 8dp "
13+ android : paddingBottom = " 8dp "
14+ android : paddingStart = " 24dp "
15+ android : paddingEnd = " 24dp " >
1616
1717 <LinearLayout
1818 android : layout_weight =" 1"
1919 android : layout_width =" 0dp"
2020 android : layout_height =" wrap_content"
21- android : background =" ?attr/selectableItemBackground"
22- android : focusable =" true"
2321 android : orientation =" vertical" >
2422 <TextView
2523 android : id =" @+id/option_local_name"
Original file line number Diff line number Diff line change 2929 android : layout_marginStart =" 12dp"
3030 android : layout_marginTop =" 8dp"
3131 android : autoSizeTextType =" uniform"
32+ android : autoSizeMinTextSize =" 8dp"
3233 android : maxLines =" 1"
3334 android : padding =" 2dp"
34- android : text =" New Text "
35+ android : text =" TR412-1 "
3536 app : layout_constraintBottom_toTopOf =" @id/tagsBarrier"
3637 app : layout_constraintStart_toStartOf =" parent"
3738 app : layout_constraintTop_toTopOf =" parent" />
You can’t perform that action at this time.
0 commit comments