BijoySingh / Scarlet-Notes

[Discontinued and Unsupported Project] Simple yet powerful rich note taking android application, with a lot of flexibilty of usage
https://play.google.com/store/apps/details?id=com.bijoysingh.quicknote
GNU General Public License v3.0
354 stars 94 forks source link

Fix minimum text holder height being based on hint text instead of actual text (#120) #141

Closed Fs00 closed 4 years ago

Fs00 commented 4 years ago

I've fixed #120 by removing useless hint texts for TextViews used in FormatTextViewHolder (since they're never displayed when their content is empty) and by removing the hint for the EditTexts programmatically when they are not empty anymore (obviously the hint is restored when the EditText becomes empty again).

Fs00 commented 4 years ago

Ok. The call to the method is already made in onTextChange method. If I've understood correctly, I should now remove all references to hints included in XML layout files. Do you prefer the method that retrieves the hint string being located in FormatType enum or in FormatTextViewHolder class? I did the second one because I needed a context to retrieve string resources. I'll upload a screen capture of the working fix when I'll have made the adjustments you asked for.

Fs00 commented 4 years ago

I've updated my commit as you asked and I've also improved the class to use a lateinit property for the format in order to avoid the use of !! operator (bad practice!). Here are the screen captures I promised:

Fs00 commented 4 years ago

@BijoySingh I don't think this needs any other changes before merging, check my comment on your review.