2

I have created a new android application and want to support encryption for important data. I show those encrypted text in textview like '*****' and onClick event of the text (I'm using clickable span for click event as only some part of the text is encrypted in large data) I will show decrypted data by replacing '*****'. I'm using a API to get the decrypted data from our server, as network call may take some time, it is better to show loading for network fetch. So, is there any option to show loader for some part of the text for better user experience?

Initially textview will show some content like,

one ***** data

On click of text(*****) it should show loader instead of the text like in image

enter image description here

Thanks.

sathish
  • 91
  • 6
  • Are you talking about a progress bar dependent on the fetching progress? – bautista May 29 '19 at 13:30
  • @bautista No, I need to show loader instead of some text (like applying span for some part of text) – sathish May 29 '19 at 13:34
  • @bautista Yes. In same textview – sathish May 29 '19 at 13:43
  • My approach would be to add both the textview and the progressbar to the layout. Make the progressbar invisible by calling `progressBar.setVisibility(View.INVISIBLE);`. Once you detect the click, set the textview invisible and set the progressbar to visible. – bautista May 29 '19 at 13:45
  • Ya, it is definitely first option. But, text may be multiline and huge. To hide some of the text it should be done by same textview. – sathish May 29 '19 at 13:59

0 Answers0