I've been developing an application similar to the Google Keep, and was wondering how actually they allocate the text size to a note (algo)?
- Do they just allocate size depending upon the Note length?
- Or they also check for Card Dimensions i-e card width etc?
Its a bit confusing, because sometimes notes have equal card size dimensions with font-difference, and sometimes notes have both different size dimensions and text size?
So basically, the Question is, What is the algorithm/method to calculate the text size for a note?
you have to use
auto-fit TextView
for this & add it inRecycleView
orListView
(whatever you want) item layout. here is one of stack answer of AutoFit-TextView and source code from github android-autofittextviewapply max text size in
TextView
then it automatically adjust if there is more textNo,
No
just make you TexView size wrapcontent its allow you to add all text in textview like
whatsup chat thread
.Edited
you have to manage like below way
*in Google keep text size depend of words. text length is 10 then maximum text size. text length is 30 then medium textsize and more then 50 then small text*
they are using two typeface one is for title and another is for text message