Android Tutorial ScrollView example with a Panel higher than the screen

fdx12345

Active Member
Licensed User
Longtime User
Were is the code?

I am looking at the simulator and see a keyboard with multifuncitons but no code to support the keyboard view, custom characters on the keyboard, and the different modes the keyboard uses. It runs, thus the code has to be somewhere. I did not see it in the designer though I did find the textboxes and items numbers.

Bill
 

mvos

New Member
Licensed User
Longtime User
Change layout

Can I change the layout to another one. I want to use multiple layouts in my project.
if possible, how?
 

klaus

Expert
Licensed User
Longtime User
Yes you can.
When you want to change the layout you should use the code below:
B4X:
scvTest.Panel.RemoveAllViews
scvTest.Panel.LoadLayout("NewLayout")
But I would suggest you to use different Activities instead of different layouts in the same Activity.
That's the 'standard' Android mode of working.

Best regards.
 

adalexander

Member
Licensed User
Longtime User
Ciao klaus now a question I asked in the forum so far only half dark, I state that I am in this program is not the good I consider it somewhat absurd, I'm a beginner, I have a screen with some pictures I would like to put 30 but do not go there and I would like to make a simple vertical scrollview and be able to put more pictures, how can I do? how do I put pictures from other designers if they do not go there physically?, someone told me to put multiple layouts within the same as you do?, at least give me help you maybe with an example? thank you ...
 

PABLO2013

Well-Known Member
Licensed User
Longtime User
regards
I need to know how I could apply the scroll property to a panel using this simple method, which is described in your example testScroll1.zip, is basically the same but:

scvTest.Initialize (1000dip)
scvTest.Panel.AddView (Panel1, 0,0,500,1000)
scvTest.Panel.Height = Panel1.Height

but it shows me an error:



how to do it?

thanks.
 

PABLO2013

Well-Known Member
Licensed User
Longtime User
THANKS FOR YOUR PROMPT RESPONSE
BASICALLY NEED TO MAKE A SCROLL PANEL THAT OPENS AND OFF BY A BUTTON, THE PANEL MAY HAVE ANY VIEW ... I SEND A ZIP WHICH IS JUST AN ATTEMPT BY THE TIME DOES NOT WORK ...
THANKS
 

Attachments

  • SAMPLE.zip
    7.3 KB · Views: 424

klaus

Expert
Licensed User
Longtime User
Soryy for answering only today, but I was three days on travel.
BASICALLY NEED TO MAKE A SCROLL PANEL THAT OPENS AND OFF BY A BUTTON ...
What do you mean with this ?
There is no such button in your code.
Attached your modified code.
 

Attachments

  • SAMPLE_1.zip
    7.6 KB · Views: 497

PABLO2013

Well-Known Member
Licensed User
Longtime User
thank you you are very kind
sorry for my English
your example is fine for me, but I see no such express very well.

basically it is an activity that has a botton that opens and closes a panel with scrolling features.
thank you very much beforehand.

thank you you are very kind
sorry for my English
your example is fine for me, but I see no such express very well.

basically it is an activity that has a botton that opens and closes a panel with scrollingfeatures.
thank you very much beforehand.
 

Attachments

  • sample.png
    6.5 KB · Views: 472

klaus

Expert
Licensed User
Longtime User
You need to be more precise on what you want !
If you show the ScrollView full screen your Butons will be hidden and you cannot come back !
One button could do both, showing and hiding the Scrollview.
Do you want to have the button allways visible and show or hide the ScrollView on the same Activity or show the ScrollView in another Activity and go back with the Back button.
 

luciano deri

Active Member
Licensed User
Longtime User
Hy, can i create a layout to set a line of listview? How can sum object in designer list? Thanks. Thomas
 

klaus

Expert
Licensed User
Longtime User
Sorry, but I don't understand what exactly you want to do.
can i create a layout to set a line of listview?
What do you mean with 'set a line of listview' ?
How can sum object in designer list?
What do you mean with 'sum object in designer list' ?
 

luciano deri

Active Member
Licensed User
Longtime User
Sorry, but I don't understand what exactly you want to do.
What do you mean with 'set a line of listview' ?
What do you mean with 'sum object in designer list' ?

I need show row and colum of a table SQLite, in eclipse i had use a listview and i define the lyout of a row with a number of edit texts such as the colums. Can i do the same operation in B4A?
I have install a library for GridView but ther is'nt the objet in designer / addview. What have i forgot to do?
Thanks.
 

klaus

Expert
Licensed User
Longtime User
I'm sure that trying to do it in the Designer is not the best way.
Is the row number always the same ?
If no, you need anyway to add the views in the code.

I need show row and colum of a table SQLite, in eclipse i had use a listview and i define the lyout of a row with a number of edit texts such as the colums. Can i do the same operation in B4A?
You can do something similar with a ScrollView, you could have a look at the SQLExample in User's Guide.
The Table class uses a ScrollView too.

You could also have a look at this example, it uses a ScrollView and a panel with views for each row.

You can also use a WebView to display a table. This is used in the SQLiteLight examples.
 

luciano deri

Active Member
Licensed User
Longtime User

Ok, i do by the ScrollView and panel, there isn't a limit of row because is a app for add element in a table.
I don't understand why i must do Activity.AddView(scvMain, 0, 0, 100%x, 100%y), if scvMain is the ScrollView insert in Designer.
Now my App is almost ok, only problem is that the table scroll but is not requayred because there are few rows that layout can contain. I would like that the scroll si active only if there are there are more rows those displayed. How can i solve this problem? Thanks
 

klaus

Expert
Licensed User
Longtime User
I don't understand why i must do Activity.AddView(scvMain, 0, 0, 100%x, 100%y), if scvMain is the ScrollView insert in Designer.
If the ScrollView is added in the Designer you must not use Activity.AddView(scvMain, 0, 0, 100%x, 100%y) !
I would like that the scroll si active only if there are there are more rows those displayed. How can i solve this problem?
You must adjust the ScrollView.Panel.Height according to the row height and number.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…