Comments (17)
我也出现了这样的情况
from android-justifiedtextview.
好歹也给个文字复制下啊
from android-justifiedtextview.
和什么字没关系, 就是最后一行会被拉伸(有些情况),有的情况又不会;如图,最后一行剩下 某个文字和句号的情况,有的情况会被拉伸 有的情况有不会;
from android-justifiedtextview.
from android-justifiedtextview.
@Ifuqiang 给textview设定一个固定宽度,然后重现bug
然后再把文字内容和宽度发给我
from android-justifiedtextview.
text = "松岛枫松岛枫松岛枫松岛枫松岛枫松岛枫松岛枫松岛枫松岛枫,Genymotion for person use松岛枫";
@ufo22940268
from android-justifiedtextview.
@laizony 宽度是多少px也给一下
from android-justifiedtextview.
@ufo22940268 我现在改不了源码.明天改测试下; 我用的是真机. 这个宽度是android:layout_width="match_parent" 设置的;
from android-justifiedtextview.
layout是这个:activity_text.xml
java文件是在这里的62行把text换了:TextActivity.java
@ufo22940268
from android-justifiedtextview.
使用文件读取进来是没有这个问题的,在layout里直接设置和在代码里设置才会出现这个问题。
@ufo22940268
from android-justifiedtextview.
TextView two = (TextView)findViewById(R.id.two);
String text="明月几时有?把酒问青天。不知天上宫阙,今夕是何年。\n"
+"我欲乘风归去,又恐琼楼玉宇,高处不胜寒。\n"
+"起舞弄清影,何似在人间。\n"
+"转朱阁,低绮户,照无眠。不应有恨,何事长向别时圆?\n"
+"人有悲欢离合,月有阴晴圆缺,此事古难全。\n"
+"但愿人长久,千里共婵娟。";
two.setText(text);
布局的代码:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="20dp" >
<com.example.processdemo.JustifyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="松岛枫松岛枫松岛枫松岛枫松岛枫松岛枫松岛枫松岛枫松岛枫,Genymotion for person use松岛枫"
android:textColor="@android:color/holo_blue_light"
android:textSize="16sp" />
<com.example.processdemo.JustifyTextView
android:id="@+id/two"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text=""
android:textColor="@android:color/holo_blue_light"
android:textSize="16sp" />
<com.example.processdemo.JustifyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="1yc2EAAAADAQABAAABAQCmQbnMDF0WCAEwKjGxrXD3oHZpmyWfsm1FHrvZqbJZh210zE/IpmGhBUUxsbkce5JCa+plat1y9saFLSpphaGIfOUJdPbnfgfqfnO3IFT8rLVf+FVetwbCbzEw7t6FStITyLEZSgs7TBRdoLWgPYXMd7GhfyEX+4n8HULufFJ2a/UJLzzUl1jo3PgOvqG18ujNtByixEwCt2Z3zFlQcd5CoXaYUbeDi94aSvnXntA+/E+aPwwaX8nB/ar3LlGy13cm9hutyoTWJ/mgfotw8a+9OBW0ChZPdETDhpgQMuW+W+nwapO6GxUMX+C3xbQgQNn1oWhf9uuSIaarg3Q"
android:textColor="@android:color/holo_blue_light"
android:textSize="16sp" />
</LinearLayout>
from android-justifiedtextview.
我努力了,但是暂时没找到好的方法修复。因为很难找到和英文字母等宽的并且能够被换行的字符。
from android-justifiedtextview.
@ufo22940268 能否问一下,为什么从文件读取没有问题呢?
from android-justifiedtextview.
from android-justifiedtextview.
字会被拉伸到填满整行
from android-justifiedtextview.
这个问题没法解决吗
from android-justifiedtextview.
估计是可以的,不过我电脑上没有android开发环境,靠各位大牛了
from android-justifiedtextview.
Related Issues (20)
- Mysterious Padding on the Right Side HOT 3
- 顶部和右边有间距
- scrollbarStyle dose not work
- Arabic text is not displayed properly HOT 4
- Link Color Is Not Change When Linkify Add Links
- w文字拉伸 HOT 1
- Last line is stretched out HOT 5
- Load custom font
- Null object reference
- The extra space on the right side of each lines HOT 2
- ClickableSpan in confusion
- android:textIsSelectable="true"
- not support for hindi, marathi language
- emoji is not show right
- Cannot set gravity
- android:ellipsize="end" does not work
- Distorts the last line of the passage
- Lost content when set font from asset HOT 1
- android 9.0 底部出现大片空白 HOT 1
- HightLighting Any specific Text Programatically is not Supporting.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-justifiedtextview.