JustifiedTextView icon indicating copy to clipboard operation
JustifiedTextView copied to clipboard

Not Justified all the way

Open FriedrichM opened this issue 7 years ago • 9 comments

Im having the problem that its not justified all the way to the end . screenshot my XML : <com.codesgood.views.JustifiedTextView android:id="@+id/standarddetail_content_text" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="20dp" android:layout_marginRight="20dp" android:fontFamily="@font/martelsans_light" android:lineSpacingMultiplier="0.8" android:layout_marginTop="5dp" android:textColor="@color/text" android:textSize="@dimen/textsize" /> code setting the Textview content ( textview is inflated programatically ) View inflatedLayout = inflater.inflate(R.layout.standard_details, null, false); sv.addView(inflatedLayout); JustifiedTextView content = inflatedLayout.findViewById(R.id.standarddetail_content_text); content.setText(1998 wurde das Gesetz zur Kontrolle und Transparenz (KonTraG) beschlossen, das zu Veränderungen im Aktiengesetz und Handelsgesetzbuch geführt hat. Die wichtigsten Änderungen das Risikomanagement betreffend waren die Einrichtung eines Überwachungssystems, um den Fortbestand der Gesellschaft zu sichern (AktG), die Überprüfung dieses Systems durch den Wirtschaftsprüfer (HGB) und die Erweiterung des Lagerberichts um einen Risikobericht (HGB). Diese Regelungen gelten vor allem für Aktiengesellschaften, es gibt jedoch auch Ausstrahlungswirkungenauf GmbHs. Den Risikobericht müssen zudem mittelgroße und große Kapitalgesellschaften sowie Konzerne erstellen. ); //one long line no linebreaks in my app i get this string form a resource file

screenshot_1545231342

FriedrichM avatar Dec 19 '18 15:12 FriedrichM

😐thanks for notifying the problem and sharing the text you're using, I'll investigate what's going on as soon as I can.

amilcar-sr avatar Dec 19 '18 15:12 amilcar-sr

Thank you for developing this library and sharing it with us!If you need any more help recreating the bug feel free to message me.In case you cannot recreate it I will make a project only containing this bug and share it to you. 

FriedrichM avatar Dec 19 '18 19:12 FriedrichM

Hello @FriedrichM , sorry for the delay... the holidays and a few life events prevented me from working on this sooner, but I'm back now! 😃 I've been testing the paragraph you shared with most of the details of the layout you shared, but it works just fine 😐 the only things I'm not using are your fontFamily and your textSize, can you share these details so I can give it a try and find a solution for the problem?

amilcar-sr avatar Jan 07 '19 16:01 amilcar-sr

No Problem it was the same with my holidays :) textSize is 16sp . I'd rather not give you the font file directly because it was provided by my client but I found this on google and it seems to be the same fontdownload .

FriedrichM avatar Jan 07 '19 17:01 FriedrichM

Also it is placed inside a LinearLayout (vertical) which is inflated in a ScrollView with 1 dp padding. The device resolution is 1440x2560 (standard emulator Pixel XL 560dpi)

FriedrichM avatar Jan 07 '19 17:01 FriedrichM

is there any news about this issue?

mohamedagamy avatar May 20 '19 22:05 mohamedagamy

Hi @mohamedagamy , I haven't been able to dedicate time to this issue because of the specific case... but I'll have vacations on September, I'll focus on improving this library with a refactor and I'll make sure to address this problem. Sorry for the troubles 🙏🏻

amilcar-sr avatar Jul 22 '19 21:07 amilcar-sr

Thanks alot.

mohamedagamy avatar Jul 22 '19 21:07 mohamedagamy

Hi, I also encountered similar issue to this one. For my case, I add "\n\n" on my string resource and it messed the text orientation. I used source sans pro for my font family.I hope this might help you identify the issue

ndptra avatar Oct 08 '19 04:10 ndptra