Commit a42ad760 authored by Jeff Boek's avatar Jeff Boek
Browse files

For #5073 - Fixes visual alignment when certificate authority breaks into a new line

parent 7a16192f
......@@ -14,7 +14,6 @@ import androidx.appcompat.content.res.AppCompatResources
import androidx.core.content.ContextCompat
import kotlinx.android.extensions.LayoutContainer
import kotlinx.android.synthetic.main.quicksettings_website_info.view.*
import mozilla.components.support.ktx.android.view.putCompoundDrawablesRelativeWithIntrinsicBounds
import org.mozilla.fenix.R
/**
......@@ -63,6 +62,6 @@ class WebsiteInfoView(
val icon = AppCompatResources.getDrawable(view.context, iconRes)
icon?.setTint(ContextCompat.getColor(view.context, iconTintRes))
view.securityInfo.setText(securityInfoRes)
view.securityInfo.putCompoundDrawablesRelativeWithIntrinsicBounds(start = icon)
view.securityInfoIcon.setImageResource(iconRes)
}
}
......@@ -29,27 +29,44 @@
android:paddingTop="8dp"
tools:text="https://wikipedia.org" />
<TextView
android:id="@+id/securityInfo"
style="@style/QuickSettingsText.Icon"
android:layout_width="match_parent"
android:layout_height="@dimen/quicksettings_item_height"
android:paddingTop="8dp"
tools:drawableStart="@drawable/mozac_ic_lock"
tools:drawableTint="@color/photonGreen50"
tools:text="Secure connection" />
<TextView
android:id="@+id/certificateInfo"
style="@style/QuickSettingsSmallText"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:paddingTop="0dp"
android:paddingBottom="2dp"
tools:text="Verified By:" />
android:orientation="horizontal"
style="@style/QuickSettingsText"
android:paddingTop="8dp"
android:paddingBottom="8dp">
<ImageView
android:id="@+id/securityInfoIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:importantForAccessibility="no"
android:src="@drawable/mozac_ic_lock"
android:tint="@color/photonGreen50"
android:paddingEnd="8dp"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/securityInfo"
style="@style/QuickSettingsText"
android:layout_width="match_parent"
android:paddingStart="0dp"
android:layout_height="wrap_content"
tools:text="Secure connection" />
<TextView
android:id="@+id/certificateInfo"
style="@style/QuickSettingsSmallText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:paddingTop="0dp"
android:paddingBottom="2dp"
tools:text="Verified By: E-Corp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
......@@ -297,7 +297,6 @@
<style name="QuickSettingsSmallText">
<item name="android:textColor">@color/photonGrey60</item>
<item name="android:textSize">12sp</item>
<item name="android:paddingStart">48dp</item>
<item name="android:paddingEnd">16dp</item>
<item name="android:gravity">top</item>
<item name="android:layout_alignParentStart">true</item>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment