Android Question B4XPages.. What is it?

techknight

Well-Known Member
Licensed User
Longtime User
So I noticed this new B4X Pages thing. I am having a difficult time comprehending what it actually is. I read the Debut/tutorial thread that Erel has posted, but its just not clicking inside my head, feeling like a solution to a problem that I cant see. Maybe I am not interpreting it properly.

Is this like AHViewPager or something (I used this library)? I am seeing it heavily promoted here so I'm a bit confused.

Sorry, I would just like to know more is all.

Thanks.
 

techknight

Well-Known Member
Licensed User
Longtime User
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
Yea, I figured as much.

So I tried it, and it simply reminds me of AHViewPager, Just without the swiping back and forth.

I suppose it could be useful depending on the types of apps that you make, in my case it wouldnt serve any purpose.

But it is neat nevertheless.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
So I tried it, and it simply reminds me of AHViewPager, Just without the swiping back and forth.
Repeating the same incorrect statement won't make it right :)
It has nothing to do with AHViewPager.
I guess that in a year or so you will use it as it makes many complicated things really trivial. Anyway, you are of course not forced to use it.
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
Repeating the same incorrect statement won't make it right :)
It has nothing to do with AHViewPager.
I guess that in a year or so you will use it as it makes many complicated things really trivial. Anyway, you are of course not forced to use it.

It reminds me of AHViewPager. It reminds me of AHViewPager. It reminds me of AHViewPager. It reminds me of AHViewPager. It reminds me of AHViewPager........
You know, you state that its incorrect. But everyone including myself are entitled to their "opinions" Whether they are correct or not isnt relevant. Thanks for the gas-lighting, I do appreciate that. (not).

From a user experience standpoint, my "opinion" is simply that it acts/feels very similar to the AHViewPager other than there isnt swiping. Doesn't mean it isn't different under the hood.

All I wanted was a good explanation of the point of this library, as even yet, I still dont get it.... I dont get the point. There. I said it.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Perhaps the misunderstanding is due to the fact that the example scrolls some pages and that you are only looking at an example.
B4XPages is not primarily a way to scroll through some pages (also you are not forced to scroll them); its potential are those described at the beginning of that thread:

1. Make it simple to develop B4A apps by solving almost all of the challenges involved with Android complex activities life cycle.
B4XPages makes B4A behave more similar to B4J and B4i where the new "B4XPage" element is a regular object that is never paused, never destroyed, can be accessed from anywhere and easy to work with.

2. Provide a cross platform layer above the navigation related APIs.
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
Well I dont recall having lifecycle issues, or context/access issues which I guess is where my questions arose.

The fact that its cross-platform means the native UI issue is no longer an issue? THAT is something that can be useful I suppose.
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
I haven't seen the examples yet, but what I've understood, and maybe a "simple point of view" of what I think it is, let's clarify you something.

When you develope an android app, you have to deal with Activity_Start, layouts changing on rotate, Activity_Pause, Activity_Resume on start and then everytime you change from one Activity to another.
Sometimes you don't know if develope your app in a single activity, loading differents layouts, or create several activities and go and return from one to another.

B4XPages is a way of create an app in a single activity, making easier to load diferents layout, and not having to deal with pauses, resumes, etc...

Maybe I'm wrong and when someone corrects me, make it clearer to you.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
The fact that its cross-platform means the native UI issue is no longer an issue? THAT is something that can be useful I suppose.
I don't have B4i (I am poor and all of you should donate at least 1€ so that I can buy a new notebook, with Windows 10 - my PC is 10 years old! Please, donate to the link you will find in my signature 😁), so I don't know about iOS "activities" - screens. I think that with B4XPages and XUI-B4XViews I could develop an app for Android and then ask someone to build an iOS version, and this nice gentleman 😁 should work very little to make the necessary changes, all not related to the GUI part (and "pages" handling).
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
I haven't seen the examples yet, but what I've understood, and maybe a "simple point of view" of what I think it is, let's clarify you something.

When you develope an android app, you have to deal with Activity_Start, layouts changing on rotate, Activity_Pause, Activity_Resume on start and then everytime you change from one Activity to another.
Sometimes you don't know if develope your app in a single activity, loading differents layouts, or create several activities and go and return from one to another.

B4XPages is a way of create an app in a single activity, making easier to load diferents layout, and not having to deal with pauses, resumes, etc...

Maybe I'm wrong and when someone corrects me, make it clearer to you.

Ok, see that makes more sense to me. Now I understand. I think. haha.

Luckily for me, all of my apps are fixed orientation so I never had to deal with that. So I am unfamiliar with those pains. All my stuff runs in landscape view.

and Activity start is how I launch everything, and I put layouts into different panels/classes if I need a different page or window/layout. At least thats how I always did it. I have never had more than 1 activity. Never needed to. Not sure which scenarios that would be necessary, maybe games?
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
If you only develope in B4A then you won't notice how exhausting it can be to program cross-platform.
I'm glad that I've been so lazy the last weeks, because that's exactly what I had to deal with, how can I develop my app as uncomplicated as possible, cross platform.

i put as much code as possible into classes, but still i needed 5 activities in B4A for 5 pages, 5 activities, for the B4I version i would have needed 5 code modules, to address this classes, just because i needed 5 activities in B4A.

This weekend I migrated my app to B4XPages, now I have 1 Activity, all my classes are now B4XPages and I don't have to take care in B4I that I have to manage the pages there differently than in B4A.
That means I have 5 B4XPages and 1 Activity/CodeModule. Without B4XPages I would have 5 Activities in B4A + 5 Code Modules in B4I + 5 classes to make all cross platform.

The advantages I have now are, I have much less modules and code, it's all clearer now that I only have to take care of the layouts, but even there it's just copy paste between the 2 designers. This also makes it easier to maintain and extend the app.

For me it is the best thing that could happen this month, simply because I save a lot of time and effort.
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
What would be a scenario where you would need more than one activity? So far I havent needed to use more than one so im not sure what the expectations are on a situation like that.

And, no, I havent programmed cross platform. I have used the other products, but for very different applications. Not the same application across all three so I have not run into it yet.
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
What would be a scenario where you would need more than one activity? So far I havent needed to use more than one so im not sure what the expectations are on a situation like that.
The settings of the app, this should be a separate activity.
Everything that is not linked to the Main Layout should be a separate activity. Otherwise you have 1 million lines of code in one module.
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
What would be a scenario where you would need more than one activity? So far I havent needed to use more than one so im not sure what the expectations are on a situation like that.
This is where you will see the difference.

Before B4XPages you will have to worry about each activity life cycle, which controlled by the Android os.
With B4XPages you do not have to worry about it, as for os it is one activity only.

You may compare it with two or more panels in one activity but better.

Regards,

Anand
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
Ahh ok. Yea none of my apps are using more than one activity.

My apps do have settings, but they are in their own pop-ups, panels, etc that are accessed by entries on the B4XDrawer.

so I am beginning to see the picture now. Reason why I didnt see it as I havent programmed in a manner which I would run into these limitations and have a need for something like this.

But, I do get it now.
 
Upvote 0
Top