我正在使用Autocompletetextview和Google地方服务。 我正在尝试将文本方向从默认(ltr)更改为rtl,因为语言问题。
这就是它现在的样子:
我已经搜索了这个问题一段时间但没有找到任何东西。
这是xml代码,遵循this教程:
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:textSize="15dp"
android:gravity="right"
/>
当我尝试将此TextView放入布局(线性/相对)时,应用程序在我开始输入内部时崩溃了。
答案 0 :(得分:0)
得到答案,xml应如下所示:
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="35dp"
android:textSize="15dp"
android:gravity="right"
/>
区别在于
android:layout_width="match_parent"