mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-04-01 22:34:28 +02:00
73 lines
2.9 KiB
XML
73 lines
2.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
~ Copyright (c) Kuba Szczodrzyński 2020-9-3.
|
|
-->
|
|
|
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:tools="http://schemas.android.com/tools">
|
|
|
|
<data>
|
|
<import type="android.view.View" />
|
|
<import type="android.text.Html" />
|
|
<variable
|
|
name="message"
|
|
type="pl.szczodrzynski.edziennik.data.api.szkolny.response.RegisterAvailabilityStatus.Message" />
|
|
</data>
|
|
|
|
<ScrollView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
|
|
<ImageView
|
|
android:id="@+id/image"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:adjustViewBounds="true"
|
|
android:scaleType="fitXY"
|
|
android:visibility="@{message.image != null ? View.VISIBLE : View.GONE}"
|
|
tools:src="@tools:sample/backgrounds/scenic" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:paddingLeft="24dp"
|
|
android:paddingTop="16dp"
|
|
android:paddingRight="24dp"
|
|
android:paddingBottom="16dp">
|
|
|
|
<TextView
|
|
android:id="@+id/title"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="@{message.title}"
|
|
android:textAppearance="@style/NavView.TextView.Title"
|
|
tools:text="Dziennik nie działa" />
|
|
|
|
<TextView
|
|
android:id="@+id/text"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="8dp"
|
|
android:text="@{Html.fromHtml(message.contentLong)}"
|
|
tools:text="Dziennik się zepsuł i nie działa, szkoda\n\n\nwiele linijek ma ten tekst" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/readMore"
|
|
style="@style/Widget.MaterialComponents.Button"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_horizontal"
|
|
android:layout_marginTop="16dp"
|
|
android:text="@string/register_unavailable_read_more"
|
|
android:visibility="@{message.url != null ? View.VISIBLE : View.GONE}" />
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
</ScrollView>
|
|
</layout>
|