我在webView中显示一个html代码。任何人都可以告诉我如何将HTMl中的文本左右对齐吗?如何在Android Webview中对齐文本?
<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout
android:id="@+id/al1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ffffff"
xmlns:android="http://schemas.android.com/apk/res/android">
<TextView
android:id="@+id/tv1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="About Us : Work Under Progress.."
android:textSize="20sp"
android:textStyle="bold"
android:background="#ffffff"
android:textColor="#ff000000"
android:gravity="right"
android:layout_x="0px"
android:layout_y="0px">
</TextView>
</AbsoluteLayout>
您是否尝试过重力左右? – NotACleverMan
你是什么意思与左和右?左右同时? – Janusz
对不起,我的意思是左或右。不是在同一时间。我甚至不确定那会做什么。 android:gravity =“left”应该左对齐 – NotACleverMan