-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#804] Display OdsHorizontalCard XML version in the demo app
- Loading branch information
Showing
2 changed files
with
136 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<!-- | ||
~ Software Name: Orange Design System | ||
~ SPDX-FileCopyrightText: Copyright (c) Orange SA | ||
~ SPDX-License-Identifier: MIT | ||
~ | ||
~ This software is distributed under the MIT licence, | ||
~ the text of which is available at https://opensource.org/license/MIT/ | ||
~ or see the "LICENSE" file for more details. | ||
~ | ||
~ Software description: Android library of reusable graphical components | ||
--> | ||
|
||
<layout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
|
||
<data> | ||
|
||
<variable | ||
name="title" | ||
type="String" /> | ||
|
||
<variable | ||
name="subtitle" | ||
type="String" /> | ||
|
||
<variable | ||
name="text" | ||
type="String" /> | ||
|
||
<variable | ||
name="firstButtonText" | ||
type="String" /> | ||
|
||
<variable | ||
name="secondButtonText" | ||
type="String" /> | ||
|
||
<variable | ||
name="imagePosition" | ||
type="com.orange.ods.compose.component.card.OdsCard.Image.Position" /> | ||
</data> | ||
|
||
<FrameLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"> | ||
|
||
<com.orange.ods.xml.component.card.OdsHorizontalCard | ||
android:id="@+id/ods_horizontal_card" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:title="@{title}" | ||
app:subtitle="@{subtitle}" | ||
app:text="@{text}" | ||
app:firstButtonText="@{firstButtonText}" | ||
app:secondButtonText="@{secondButtonText}" | ||
app:odsHorizontalCardImagePosition="@{imagePosition}" /> | ||
|
||
<!-- Invisible OdsHorizontalCard used for tests --> | ||
<com.orange.ods.xml.component.card.OdsHorizontalCard | ||
android:id="@+id/ods_horizontal_card_test" | ||
android:visibility="gone" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:title="Card title" | ||
app:subtitle="Card subtitle" | ||
app:text="Text displayed in the card." | ||
app:firstButtonText="First button" | ||
app:secondButtonText="Second button" | ||
app:imageContentDescription="Content description of the image" | ||
app:odsHorizontalCardImagePosition="end" /> | ||
|
||
</FrameLayout> | ||
|
||
</layout> |