Android Alert Dialog Text Align

戏子无情 提交于 2019-12-25 01:49:18

问题


How To Align Right Order Total Values Like Below Images.

Thanks.


回答1:


Please try below links

link1

link2




回答2:


You should use Custom Dialog for this pupose.

Check this url




回答3:


For each row use the following style in xml.

<LinearLayout
    android:id="@+id/linearLayout1"
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"
    android:orientation="horizontal">
    <TextView
        android:text="Label"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"/>
    <TextView 
        android:text="Value"
        android:gravity="right"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"/>
</LinearLayout>

You can use the height width of the linear layout as your wish



来源:https://stackoverflow.com/questions/6450699/android-alert-dialog-text-align

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!