Skip to content

Commit

Permalink
Fixed bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
am3n committed Mar 15, 2021
1 parent 669c9a2 commit fde3323
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions needtool/src/main/java/ir/am3n/needtool/views/A3Toolbar.kt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class A3Toolbar : RelativeLayout {
imgbBack = AppCompatImageButton(context)
addView(imgbBack)

txtTitle = AppCompatTextView(context, attrs, defStyleAttr)
txtTitle = AppCompatTextView(context)
addView(txtTitle)

if (optionsMenu != null) {
Expand Down Expand Up @@ -145,7 +145,10 @@ class A3Toolbar : RelativeLayout {
addRule(if (isRtl) ALIGN_PARENT_LEFT else ALIGN_PARENT_RIGHT, 0)
}
addRule(if (isRtl) ALIGN_PARENT_RIGHT else ALIGN_PARENT_LEFT, 1)
updateMargins(left = 4.iDp2Px, right = 4.iDp2Px)
if (isRtl)
updateMargins(right = 4.iDp2Px)
else
updateMargins(left = 4.iDp2Px)
}
if (imgbBackPadding != null && imgbBackPadding!! > 0)
imgbBack?.setPadding(imgbBackPadding!!)
Expand Down

0 comments on commit fde3323

Please sign in to comment.