Coder Social home page Coder Social logo

android-justifiedtextview's People

Contributors

benoitduffez avatar gc-xi avatar ufo22940268 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-justifiedtextview's Issues

RTL Text disintegerates

When using with RTL languages like Persian, the text disintegrates and becomes unreadable.

good lib though

Distorts the last line of the passage

On using this plugin, i found that if the last line of the passage contains very few letters, then the words itself gets spaced out giving a very poor UI experience. Justify should not apply on last line of any passage. This is basic feature.

The extra space on the right side of each lines

In the source code of the JustfiyTextView.java, method drawScaledText() has an obvious mistake which causes the extra space on the right side while using justifiedTextview.
float scaleWidth = (mViewWidth - lineWidth) / line.length() -1;
this line calculates the default space of the textview on the right side and redistribute it among the chars.
so I think this line should be:
float scaleWidth = (mViewWidth - lineWidth) / (line.length() -1);
And there will not have any extra space on the right side anymore.

顶部和右边有间距

换成TextView之后是没有间距的,而切换成JustifiedTextView后,其顶部和右边有间距,怎么去除

HightLighting Any specific Text Programatically is not Supporting.

SpannableString spannableString = new SpannableString(textView.getText().toString()); spannableString.setSpan(CharacterStyle.wrap(new BackgroundColorSpan(Color.YELLOW)), i, i + searchedText.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); textView.setText(spannableString);

This is the code Which i've used to highlight yellow to any textview,
But this Library doesn't support Highlighting any Color over Specific TextView.
Any Help Would be Appreciated.

最后一行会被拉伸

直接用了你的demo,直接在代码里设置的文本。
编译环境:eclipse adt,java 1.7
运行环境:Android 4.4.2



layout是这个:activity_text.xml

java文件是在这里的62行把text换了:TextActivity.java
text = "松岛枫松岛枫松岛枫松岛枫松岛枫松岛枫松岛枫松岛枫松岛枫,Genymotion for person use松岛枫";

Cannot set gravity

Hi, i am using a linear layout, i am trying to set gravity bottom. But it isn't working. Can you help?

Last line is stretched out

    <me.biubiubiu.justifytext.library.JustifyTextView
        android:text="@string/main_description"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/textView"
        android:textSize="18sp"
        android:textColor="@color/background_floating_material_light"
        />

The second line end of sentence is handled nicely but the last line is stretched out.

screenshot_2017-02-22-14-26-16

last line problem

one:
when i use it to show chinese text,if last line only have several chinese it will insert some space untill the line is full,i set my font and textsize is 30
two:
if the text is english and chinese together in one line (i test is the third line)also will have the first problem
can you have a test ,thanks

Load custom font

Please Guru in the house, how can i load custom font with this library?
please pardon my question, am pretty new to programming

android.text.SpannedString cannot be cast to java.lang.String

Process: com.zhongduomei.rrmj.society, PID: 23335
java.lang.ClassCastException: android.text.SpannedString cannot be cast to java.lang.String
at me.biubiubiu.justifytext.library.JustifyTextView.onDraw(JustifyTextView.java:34)
at android.view.View.draw(View.java:14493)
at android.view.View.getDisplayList(View.java:13390)

Release a jar

I would be grateful if you also would release a jar packaged artifact. Using apklibs is not comfortoble in eclipse. Actually i do not see the reason to package this as an AAR or APKLIB, since the library only contains classes, no Android resources.

Link Color Is Not Change When Linkify Add Links

When i add a Attribute in TextView Tag in xml

android:autoLink="web"
android:lickClickable="true"

android:linkColor="#0000ff"

this is not working and link color not be changed.

I want to change Link Color Change.

Null object reference

java.lang.NullPointerException: Attempt to invoke virtual method 'int android.text.Layout.getLineCount()' on a null object reference..

ClickableSpan in confusion

It may not support ClickableSpan well, when the text has be justified, the ClickableSpan of each set may in confusion

w文字拉伸

如果可以检测文字只有一行不进行拉伸,还有就是最后一行不拉伸,可以搞吗?

第一行显示有问题

我输入以下文字时出现第一行文字间距过大的问题:
YSL名字破会,广州,aldjadlaaadaadaslfalskfaldfaldfakdfaldfkaldfk面对就发了就阿瑟立刻就爱上
这个该怎么解决呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.