Skip to content

Conversation

@miguelbcr
Copy link
Contributor

No description provided.

@AndroidDeveloperLB
Copy link
Owner

Can you please show a screenshot of the issue or something?

@miguelbcr
Copy link
Contributor Author

Hi !,

I think I've just realised when it fails.
This is when you define the setMinTextSize() by XML, this is so because I
have a CustomTextView class that extends of your AutoFitTextView, and I
define custom attrs, such as 'customMinTextSize', then I call to
setMinTextSize() within my CustomTextView class. If I remove
'customMinTextSize' attr from XML it works fine.

In the screeshots, the wrong one has the 'customMinTextSize' attr set in
XML for the first textview. The second textview has no 'customMinTextSize'
attr in neither of the screenshots

good
.[image: Imágenes integradas 2]

wrong
[image: Imágenes integradas 1]

Regards!

2015-02-26 17:55 GMT+01:00 AndroidDeveloperLB notifications@github.com:

Can you please show a screenshot of the issue or something?


Reply to this email directly or view it on GitHub
#14 (comment)
.

@AndroidDeveloperLB
Copy link
Owner

I don't see the images.

@miguelbcr
Copy link
Contributor Author

Here are images, sorry ;)

wrong
wrong

good
good

@AndroidDeveloperLB
Copy link
Owner

can you please make a (minimized, tiny) sample project to show this? I never noticed a truncated text before.

@miguelbcr
Copy link
Contributor Author

Sorry, I've tried to make a sample but it works perfectly (unfortunately ;)).

In my project, where this fails, the above images are a header (injected with include tag) within an item layout of a ListView, and when the app starts the headers are ok, but when scrolling the listview they are become wrong, and the others layouts where I use the same header are displayed wrong.

Maybe this is a ghost bug, but it solved my issue.
Anyway my solution is use post() to wait the view is drawed.

Regards!

@AndroidDeveloperLB
Copy link
Owner

I'm not sure if I should merge this pull request.
Is this the only way to solve it?
Is it the best way?
Would it still work on normal scenarios?

@miguelbcr
Copy link
Contributor Author

Ok, if I find out anything, I'll keep you informed.

@AndroidDeveloperLB
Copy link
Owner

ok.

On Thu, Feb 26, 2015 at 11:38 PM, miguelbcr notifications@github.com
wrote:

Ok, if I find out anything, I'll keep you informed.


Reply to this email directly or view it on GitHub
#14 (comment)
.

@miguelbcr
Copy link
Contributor Author

I was able to reproduce the bug.
You can see the sample app here :

https://github.com/miguelbcr/AutoFitTextView/tree/master/sampleTruncated

search for 'FIXME' in files and comment/uncomment the blocks or lines of code and observe the textview's on the listview how they are truncated

@AndroidDeveloperLB
Copy link
Owner

I've got the sample, but I don't see truncated text when running "sampleTruncated" :
device-2015-02-28-143311

I see you didn't change the code there, as there is the original code un-commented, and your new code being commented:
untitled20150228143244

@miguelbcr
Copy link
Contributor Author

Yes I left the original code to see the bug, and then you can alternate between one code and the other one to see the behaviour.
Here is my bug, but it is when you do scroll, and not of all fails, only some list items

ss 2015-02-28 at 01 37 45

@AndroidDeveloperLB
Copy link
Owner

Ohhh.... It's so subtle and tiny that I didn't notice.
So you think I should merge it?
Is this the only way to solve it?
Is it the best way?
Would it still work on normal scenarios?

@miguelbcr
Copy link
Contributor Author

I dont know if it is the best way to solve it or if you should merge it, but I spent a lot of time with this behaviour and at the end I found that workaround, and also I don't know if this is a good code or simply a shit, because Im aN average programmer, but this did that avoid to use another library, because I like yours.

AndroidDeveloperLB added a commit that referenced this pull request Feb 28, 2015
Bugfixing: The text appears clipped when using setMinTextSize method
@AndroidDeveloperLB AndroidDeveloperLB merged commit 2f8851a into AndroidDeveloperLB:master Feb 28, 2015
@AndroidDeveloperLB
Copy link
Owner

ok, you've convinced me. I will now merge it.
Thank you for your contribution for the library.

@miguelbcr
Copy link
Contributor Author

Thank you for your library ;)

@AndroidDeveloperLB
Copy link
Owner

ummmm... I think I've merged the new sample too somehow.

@miguelbcr
Copy link
Contributor Author

This is the first time I collaborate on github and I'm not an expertise with Git, so I committed the sample code because I didn't know how upload it for you could see it, but you have freedom to delete or change whatever you want, I don't mind, because the bug fixing comment , maybe, is not appropriate either.

@AndroidDeveloperLB
Copy link
Owner

That's what I did.
I've never done what you did, but I have written the code in the post
instead. How do you do it?

On Sat, Feb 28, 2015 at 4:21 PM, miguelbcr notifications@github.com wrote:

This is the first time I collaborate on github and I'm not an expertise
with Git, so I committed the sample code because I didn't know how upload
it for you could see it, but you have freedom to delete or change whatever
you want, I don't mind, because the bug fixing comment , maybe, is not
appropriate either.


Reply to this email directly or view it on GitHub
#14 (comment)
.

@miguelbcr miguelbcr changed the title Bugfixing: The text appears clipped when using setMinTextSize method Workaround for truncated text issue on ListView Feb 28, 2015
@miguelbcr
Copy link
Contributor Author

I don't know what are you referring with 'How do you do it?', but I've changed the title of my pull request. All this is new for me, forks, pull request, ... so don't ask me complex things,... by the moment... ;)

@AndroidDeveloperLB
Copy link
Owner

But this is it. I never done such a thing as pull-request.
What are the steps till you've shown me to merge the code? Did you fork it perhaps?

@miguelbcr
Copy link
Contributor Author

Yes, I click on Fork (top right icon), and then I clone the repository (my fork) and modified the AutoResizeTextView.java, and then I commited my changes into my fork and pushed it. Now on github I cliked on 'pull request' link (top right menu) and 'create a pull request' link (inside the box). Then you can see my pull request, with the change to merge.
But when you ask me for a sample code, I did it on my fork, so when I pushed it, seems that it was added automatically on the previous pull request. Maybe I should have done another fork to avoid mix the workaround and the sample in the same pull request.

@AndroidDeveloperLB
Copy link
Owner

Nice. Thank you. Maybe I will try it next time.

@AndroidDeveloperLB
Copy link
Owner

@miguelbcr The code of "post(...)" seems to cause issues on Android 5.x . I will now remove this code till there is a better way to solve this.

@miguelbcr
Copy link
Contributor Author

ok
El 03/06/2015 23:05, "AndroidDeveloperLB" notifications@github.com
escribió:

@miguelbcr https://github.com/miguelbcr The code of "post(...)" seems
to cause issues on Android 5.x . I will now remove this code till there is
a better way to solve this.


Reply to this email directly or view it on GitHub
#14 (comment)
.

@AndroidDeveloperLB
Copy link
Owner

@miguelbcr If you find a way to fix it for all to use (original post here: #19 ) , please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants