forked from mozilla-mobile/fenix
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For mozilla-mobile#6607 Allow adding button to no content view holder
- Loading branch information
mcarare
committed
Feb 25, 2020
1 parent
0f609b1
commit 11b5c80
Showing
7 changed files
with
118 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,77 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- This Source Code Form is subject to the terms of the Mozilla Public | ||
<?xml version="1.0" encoding="utf-8"?><!-- This Source Code Form is subject to the terms of the Mozilla Public | ||
- License, v. 2.0. If a copy of the MPL was not distributed with this | ||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> | ||
<LinearLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:id="@+id/no_content_wrapper" | ||
android:background="@drawable/empty_session_control_background" | ||
android:layout_marginBottom="12dp" | ||
android:padding="16dp" | ||
android:orientation="vertical" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:id="@+id/no_content_wrapper" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginBottom="12dp" | ||
android:background="@drawable/empty_session_control_background" | ||
android:orientation="vertical" | ||
android:padding="8dp"> | ||
|
||
<TextView | ||
android:id="@+id/no_content_header" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="8dp" | ||
android:layout_marginTop="4dp" | ||
android:drawablePadding="8dp" | ||
android:textAppearance="@style/HeaderTextStyle" | ||
android:textSize="16sp" | ||
app:drawableTint="?primaryText" | ||
tools:drawableEnd="@drawable/ic_tab_collection" | ||
tools:text="@tools:sample/lorem" /> | ||
|
||
<TextView | ||
android:id="@+id/no_content_header" | ||
android:id="@+id/no_content_description" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="8dp" | ||
android:textAlignment="viewStart" | ||
android:textColor="?primaryText" | ||
android:textSize="14sp" | ||
android:textStyle="normal" | ||
tools:text="@tools:sample/lorem" /> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:id="@+id/button_layout" | ||
android:layout_width="match_parent" | ||
android:layout_height="36dp" | ||
android:layout_marginTop="6dp" | ||
android:layout_marginBottom="4dp" | ||
android:background="@drawable/button_background_grey" | ||
android:clickable="true" | ||
android:focusable="true" | ||
android:visibility="gone" | ||
tools:visibility="visible"> | ||
|
||
<ImageView | ||
android:id="@+id/button_icon" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
app:drawableTint="?primaryText" | ||
android:drawablePadding="8dp" | ||
tools:text="@tools:sample/lorem" | ||
tools:drawableEnd="@drawable/ic_tab_collection" | ||
android:textAppearance="@style/HeaderTextStyle" | ||
android:textSize="16sp" /> | ||
android:layout_margin="5dp" | ||
android:importantForAccessibility="no" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toStartOf="@id/button_text" | ||
app:layout_constraintTop_toTopOf="parent" | ||
tools:srcCompat="@drawable/ic_new" /> | ||
|
||
<TextView | ||
android:id="@+id/no_content_description" | ||
<TextView | ||
android:id="@+id/button_text" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="4dp" | ||
tools:text="@tools:sample/lorem" | ||
android:importantForAccessibility="no" | ||
android:textColor="?primaryText" | ||
android:textSize="14sp" | ||
android:textStyle="normal" | ||
android:textAlignment="viewStart"/> | ||
android:textStyle="bold" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
tools:text="@string/home_screen_shortcut_open_new_tab_2" /> | ||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
|
||
</LinearLayout> |