I have a WebView in my application. I want to align the text in it to from right to left . I tried adding:
<WebView
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:layout_margin="@dimen/spacing_xsmall" />
this is my code
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical"
android:padding="@dimen/spacing_middle"
android:visibility="visible">
<TextView
android:id="@+id/category"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:background="@color/colorAccentLight"
android:paddingBottom="@dimen/spacing_xsmall"
android:paddingLeft="@dimen/spacing_medium"
android:paddingRight="@dimen/spacing_medium"
android:paddingTop="@dimen/spacing_xsmall"
android:text="Category"
android:textAllCaps="true"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textColor="@android:color/white" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/grey_soft"
android:paddingBottom="@dimen/spacing_large"
android:paddingTop="@dimen/spacing_middle">
<WebView
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/spacing_xsmall" />
</RelativeLayout>
But this doesn't work for me. the textview work fine but the WebView not working ?? How can i resolve the issues
thank you.