textview的不正确对齐方式(Improper alignment of a textview)
您好,请看这个:
我使用以下代码设计了这个
<TextView android:id="@+id/about_info_tv" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:maxLines="20" android:paddingBottom="@dimen/activity_layout_bottom_margin" android:scrollbars="vertical" android:fadeScrollbars="true" android:paddingTop="@dimen/activity_top_margin" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/about_us_text" android:textSize="@dimen/activity_top_margin" />
如何解决上述问题? 请帮帮我。
Hello please look at this:
I have designed this using following code
<TextView android:id="@+id/about_info_tv" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:maxLines="20" android:paddingBottom="@dimen/activity_layout_bottom_margin" android:scrollbars="vertical" android:fadeScrollbars="true" android:paddingTop="@dimen/activity_top_margin" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/about_us_text" android:textSize="@dimen/activity_top_margin" />
how to solve above problem? please help me.
原文:https://stackoverflow.com/questions/34328024
更新时间:2020-11-03 12:11
最满意答案
Android Does not provide Justified aligntment of TextView By default.
You can use following library and achieve proper aligntment.
2015-12-17
相关问答
更多从右到左设备上的Android TextView右对齐(Android TextView right alignment on a right-to-left device)
回答我自己的问题。 看了一遍后,我找不到答案。 因为ROM是为居住在以色列并讲希伯来语的人定制的,所以似乎翻转了宽度MATCH_PARENT TextView内的对齐方式。 意思是,左对齐意味着右和右意味着左。 改变它的唯一方法是将TextView与WRAP_CONTENT一起使用,并将TextView本身对齐在其父级内部的右侧。 因为我已经编写了应用程序和所有屏幕布局,所以我不想改变一切。 所以我所做的是实现了一个自定义控件,它将TextView包装在LinearLayout中并公开它以便从外面
...
textView错误对齐。(Wrong alignment of textView. I want to make there alignment of all right textView on the redline)
最好的方法是使用我认为的体重。 一个工作代码 <?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:layout_width="match_parent"
android:layout_height="wrap_conte
...
如何在单个textview中逐行设置文本对齐方式(how do i set text alignment line by line in single textview)
最好的办法是在每一行上使用带有两个textview的布局。 据我所知,没有什么好方法可以在单个textview中做你想做的事情。 Your best bet is to use a layout with two textviews on each line. As far as I know there's no good way to do what you want in a single textview.
Textview不对齐(Textview's out of alignment)
使用RelativeLayout包装日期和网站视图 设置RelativeLayout android:layout_alignParentBottom="true"和android:gravity="center_vertical" 喜欢: <RelativeLayout
android:id="@id/bottom_row_container"
android:layout_width="match_parent"
android:layout_height="@dime
...
Bootstrap模态加载不正确的对齐和截止页面(Bootstrap Modal Loading Improper Alignment and Cut Off Page)
添加left: 0; 到你的css第69行的.modal.fade .modal-dialog 。 Add left: 0; to .modal.fade .modal-dialog in your css at line 69.
TableRow中的TextView对齐方式(TextView alignment in the TableRow)
您应该为布局和行赋予权重。 我改编了你的代码。 这是应该的。 <TableRow
android:id="@+id/tableRow1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_weigh
...
textview和scrollview对齐未正确调整(textview and scrollview alignment is not properly adjusted)
RelativeLayout有一个属性,允许您对齐两个孩子 。 你需要做这样的事情: <ScrollView
android:id = "@+id/scrollview1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
>
<RelativeLayout
...
用于以编程方式添加TextView的TextView对齐方式(TextView alignment for programmatically added TextViews)
而不是这个: p.addRule(RelativeLayout.ALIGN_BOTTOM, above.getId());
我想你想要这个: p.addRule(RelativeLayout.BELOW, above.getId());
Turns out that I wasn't setting an id on the view I was creating, and android doesn't automatically do it in that case. I
...
textview的不正确对齐方式(Improper alignment of a textview)
Android默认情况下不提供TextView的合理结果。 您可以使用以下库并实现适当的aligntment。 https://github.com/navabi/JustifiedTextView Android Does not provide Justified aligntment of TextView By default. You can use following library and achieve proper aligntment. https://github.com/n
...
Android:关于RadioGroup的TextView对齐方式(Android: TextView alignment with respect to RadioGroup)
我希望这可能对你有所帮助 <LinearLayout
android:id="@+id/rl_group_create_group_privacy"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/rl_group_create_group_icon"
android:
...