0

I want to achieve the below effect (ignore the buttons, only see the gray and blue texts): 2 TextViews

First textView is multilined, I don't know in advance the possible text length.

Second TextView is "edit", I want it to be able to react to taps (also ripple background etc).

I know I can align baselines of TextViews in constraint layout, but this will align to the first textView's top line.

Any suggestion would be welcome. Preferred: a way to do this in XML.

Thanks a lot!

Re'em
  • 1,869
  • 1
  • 22
  • 28
  • Why don't you add the "edit" text to the end of the string and make it clickable? You can do that by using spannable. I don't think you can achieve that effect by using XML logic only, at least not in a hacky way, the constraint attaches to the end of the textview and that will be always the larger width. – João Alvares Neto Jan 13 '21 at 16:47
  • See [this](https://stackoverflow.com/questions/57610578/multi-line-text-views-alignment-to-their-baseline-constraintlayout-android-stud). – Cheticamp Jan 13 '21 at 23:05
  • thanks for the replies! I would like the "edit" to be clickable and also have a ripple BG effect. I can use your link for the clickable part, and I will play around with it to see if I can add some ripple BG. if youo can point for a usefull way for the ripple that would be awesome! – Re'em Jan 14 '21 at 07:15

0 Answers0