mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-05 21:20:45 +00:00
Adds dialog style for Firefox Accounts
This commit is contained in:
parent
04a759f0b0
commit
40a3246c32
@ -12,11 +12,18 @@ import android.widget.Button
|
||||
import android.widget.TextView
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.text.HtmlCompat
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.navigation.fragment.NavHostFragment.findNavController
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
|
||||
import org.mozilla.fenix.R
|
||||
|
||||
class PairInstructionsFragment : BottomSheetDialogFragment() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setStyle(DialogFragment.STYLE_NO_TITLE, R.style.FirefoxAccountsDialogStyle)
|
||||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
return inflater.inflate(R.layout.fragment_pair_instructions, container, false)
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?foundation"
|
||||
android:orientation="vertical">
|
||||
android:padding="8dp">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline"
|
||||
@ -29,10 +29,7 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/pair_cancel"
|
||||
style="@style/SitePermissionButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
style="@style/SitePermissionCancelButton"
|
||||
android:text="@string/pair_cancel"
|
||||
app:layout_constraintEnd_toStartOf="@+id/pair_open_camera"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
@ -41,12 +38,8 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/pair_open_camera"
|
||||
style="@style/SitePermissionButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:backgroundTint="?accent"
|
||||
style="@style/SitePermissionPrimaryButton"
|
||||
android:text="@string/pair_open_camera"
|
||||
android:textColor="?contrastText"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toEndOf="@+id/pair_cancel"
|
||||
|
@ -152,11 +152,26 @@
|
||||
<item name="android:background">@drawable/search_pill_drawable_button_background</item>
|
||||
</style>
|
||||
|
||||
<style name="SitePermissionButton" parent="Widget.AppCompat.Button">
|
||||
<style name="SitePermissionButton" parent="Widget.AppCompat.Button.Borderless">
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:foreground">?android:attr/selectableItemBackground</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
<item name="android:textColor">?primaryText</item>
|
||||
<item name="android:paddingStart">24dp</item>
|
||||
<item name="android:paddingEnd">24dp</item>
|
||||
<item name="android:elevation">0dp</item>
|
||||
</style>
|
||||
|
||||
<style name="SitePermissionCancelButton" parent="SitePermissionButton">
|
||||
<item name="android:textColor">?accent</item>
|
||||
<item name="android:backgroundTint">?foundation</item>
|
||||
</style>
|
||||
|
||||
<style name="SitePermissionPrimaryButton" parent="SitePermissionButton">
|
||||
<item name="android:background">@drawable/button_background</item>
|
||||
<item name="android:textColor">?contrastText</item>
|
||||
<item name="android:backgroundTint">?accent</item>
|
||||
</style>
|
||||
|
||||
<style name="DialogStyleBase" parent="NormalTheme">
|
||||
@ -271,6 +286,9 @@
|
||||
</style>
|
||||
|
||||
<style name="CreateCollectionDialogStyle" parent="DialogStyleBase"/>
|
||||
<style name="FirefoxAccountsDialogStyle" parent="DialogStyleBase">
|
||||
<item name="android:windowBackground">@drawable/scrim_background</item>
|
||||
</style>
|
||||
|
||||
<style name="ShareDialogStyle" parent="DialogStyleBase"/>
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user