首页 > 解决方案 > android:textAlignment 在 xamarin 4.7,.10.38 的设计器中不受尊重

问题描述

当我在 Xamarin 中更改 android:textAlignment 时不起作用,但值属性为 0

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@android:color/background_light"
    tools:gridSpec="1|16|#0093eeff|K:#008080ff:16,l:72,l:16,r|S:#83ee00ff:16,0,l:16,56,l:16,0,r">

    <TextView
        android:text="Hallo World"
        android:layout_width="394.0dp"
        android:layout_height="68.5dp"
        android:id="@+id/textView1"
        android:textColor="@android:color/background_dark"
        android:textSize="36dp"
        android:layout_marginBottom="58.0dp"
        android:textAlignment="center" />
</LinearLayout>

标签: c#xamarinxamarin.android

解决方案


推荐阅读