<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <data>
        <import type="android.view.View" />
        <variable
            name="viewModel"
            type="com.lukouguoji.gjj.viewModel.IntArrTelegramDetailsViewModel" />
    </data>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/color_f2"
        android:orientation="vertical">

        <!-- 标题栏 -->
        <include layout="@layout/title_tool_bar" />

        <!-- 电报内容区域 -->
        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:layout_margin="20dp"
            android:background="@color/white"
            android:padding="20dp">

            <TextView
                android:id="@+id/tvContent"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@{viewModel.telegramContent}"
                android:textColor="@color/black"
                android:textSize="16sp"
                android:lineSpacingExtra="4dp" />

        </ScrollView>

        <!-- 底部按钮 -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="20dp"
            android:gravity="center">

            <TextView
                android:layout_width="200dp"
                android:layout_height="50dp"
                android:background="@drawable/bg_blue_radius_8"
                android:gravity="center"
                android:onClick="@{()-> viewModel.onModifyClick()}"
                android:text="修改报文"
                android:textColor="@color/white"
                android:textSize="18sp" />

        </LinearLayout>

    </LinearLayout>

</layout>
