2

Is it possible to specify the number of lines displayed by a web view and to disable its scrolling and to have a read more label like websites like the picture attached? enter image description here

eshteghel company
  • 471
  • 1
  • 7
  • 22

1 Answers1

1

You just need a combination of CSS and/or Javascript to achieve this and it better done in the website itself than in the Android app.

One way of Achieving in Android though, is to set height such that it shows only few lines along with disabling scrolling (refer Disable scrolling in webview?) and having a read more link below the webview, when clicked increase the height of the webview to MATCH_PARENT and also add the scrolling back and hide the read more item.

Community
  • 1
  • 1
SanthoshN
  • 619
  • 3
  • 15
  • thanks, but how to regain the scrolling ability when i press Read Less, i.e. how to disable the motion event – eshteghel company Nov 01 '16 at 10:22
  • Reverse the steps, reduce the height back to the fixed one and reverse the logic on the touch event in the link, may be have a boolean to see if its in read less or read more – SanthoshN Nov 01 '16 at 15:44