From existing scrolling text in Label, displaying text occupying all of screen

johnaaronrose

Active Member
Licensed User
Longtime User
I have a layout containing (amongst other views) a Label view (i.e which is currently vertically scrollable as per your LongTextSimple example) and an Image View (containing a photo). I would like to have the facility of viewing the text in a Label view on a full screen. I have some questions on this:

1. I could use a button for selecting this facility but I thought that it would better to associate an event with this: if so which one would not interfere with the scrolling of the text in the existing Label view?

2. Would you recommend using a panel in the existing layout file or creating a new activity & associated new layout file for this?

3. As stated above, I also have an ImageView on the existing layout file: this Image View will contain one of a number of photos (of varying resolutions). Which example of yours would you recommend to include both vertical & horizontal scrolling for this?

4. Same questions as for numbers 1 & 2 for the photo?
 

klaus

Expert
Licensed User
Longtime User
1) You could use the Label_Click or Label_LongClick events.

2) I would use an activity for each display.

3) In the main screen a small picture and for the big picture a separate activity. With the Activity_Touch event move the ImageViews Left and Top properties.

4) A separate activity for the different displays.

Best regards.
 
Upvote 0

johnaaronrose

Active Member
Licensed User
Longtime User
Image scroll in main screen for small picture

1) You could use the Label_Click or Label_LongClick events.

2) I would use an activity for each display.

3) In the main screen a small picture and for the big picture a separate activity. With the Activity_Touch event move the ImageViews Left and Top properties.

4) A separate activity for the different displays.

Best regards.


Klaus,
Thank you for your helpful reply. Re 3 above:
Is it correct to use ScrollImage.zip as the example for the big picture (in its own activity?
For the small picture, I currently have it displayed in an ImageView - should I put that ImageView in a ScrollView of the same size (as per the text field for which I do vertical scrolling)? If so, how do I then allow both horizontal & vertical scrolling on it?
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
As I understood you have a main display where you have a label with the text none scrollable and a small image showing the photo.
Then when you click on the label you show a new activity with a scrollview and a label on it allowing to show the whole text.
And clicking on the small image you show a new activity with the big image that can be scrolled or moved like in ScrollImage.zip.

Best regards.
 
Upvote 0

johnaaronrose

Active Member
Licensed User
Longtime User
As I understood you have a main display where you have a label with the text none scrollable and a small image showing the photo.
Then when you click on the label you show a new activity with a scrollview and a label on it allowing to show the whole text.
And clicking on the small image you show a new activity with the big image that can be scrolled or moved like in ScrollImage.zip.

Best regards.

Yes. However, in the main display I also want to be able to scroll the text in the small label vertically (that's OK as I'm currently able to do that using code from your LongTextSimple example) and to be able to scroll the photo in the (small) image - currently in an ImageView view - both horizontally & vertically. It's the latter facility that I asked you about previously i.e. is there an example in another thread for this?. This is because the photos being placed in the (small) image vary widely in resolution, so that sometimes it's good to scroll the small image & sometimes it's good to scroll the big image in a new activity's layout.

Also, what method would you recommend for vertical scrolling only of text in the full screen mode? Specifically, would you recommend:
scrolling as per LongTextSimple (i.e. having a label inside a ScrollView) or the method as per the photo but only using the vertical scrolling part of it.
 
Last edited:
Upvote 0

johnaaronrose

Active Member
Licensed User
Longtime User
Scrolling small image & scrolling of big text

I have never tried to have a scrollable image in a Scrollview, I'm not sure if it works. In this case the image should be in a Panel to have the Touch event.
But then you couldn't scroll verticaly in the Panel.

Best regards.


So I should have the small image in a Panel (rather than the existing ImageView)? But how do I scroll it both horizontally & vertically (as you say that it can't be scrolled vertically)?

Also, what method would you recommend for vertical scrolling only of the big text (i.e. in the full screen mode)? Specifically, would you recommend:
scrolling as per LongTextSimple (i.e. having a label inside a ScrollView) or the method as per the photo but only using the vertical scrolling part of it?
 
Upvote 0
Top