Wish Android Studio like Activity Chooser

Discussion in 'Bugs & wishlist' started by Multiverse app, Oct 4, 2018.

  1. Multiverse app

    Multiverse app Active Member Licensed User

    Suggestion to add some default templates like Android Studio, in which developers can choose the desired Activities.
    [​IMG]

    Users can customize the designs from there on from the manifest. After choosing a template, appropriate libraries will automatically be added and an entry in the Manifest will be made.

    It will solve the confusion of finding and setting up each an every material library, and the process of creating a new project will be faster an a lot more intuitive.
     
  2. Peter Simpson

    Peter Simpson Expert Licensed User

    Hello @Multiverse app,
    Strange that you should mention the above templates.
    I've basically created my own templates. I've just finished updating 2 of my templates with Erels new sliding drawer class. I was going to mention templates a few years ago, but then I just decided to create by own.

    My Templates are as follows:
    • Android wear - Round - Color wheel
    • Android wear - Square + Color wheel
    • Phone/Tablet - AppCompat
    • Phone/Tablet - AppCompat + Sliding drawer + Animated icon
    • Phone/Tablet - AppCompat + TabStrip
    • Phone/Tablet - AppCompat + TabStrip + Sliding drawer + Animated icon
    • Phone/Tablet - Default user login (Based on MySQL but can easily be changed to SQLite)
    I created the above templates as I needed them for client projects. What I do when I need to start a new project which needs a template above. First I decide what I need the look and feel to be, then I just copy and paste the correct template project and rename the folder and project name. Having pre-made templates saves me a lot time. For example for me to add items to the sliding drawer only takes me 4 lines of code. That's it, I now have a sliding menu with icons and text, as everything else is setup for me including the ListView Click_Event. Please note, the actual ListView code is located in a code module, thus making each activity less cluttered.

    Some of my templates have activities templates within the project for entire copying and pasting directly into new blank activities and also for ease of use (add a new activity, copy and past and all of a sudden i have a fully setup screen in less than 10 seconds).

    Once I copy and past my template into a new folder, I only need to open it and add the 4 lines above and that's all.
    How it looks like right HERE.
    Code:
    'This is all I need to create my menu items
        Dim IconArray() As Int = Array As Int (0xF0020xF00E0xF0F60xF0140xF030)
        
    Dim IconTitle() As String = Array As String ("Filter""All""Create""Delete""Photo")
        
    Dim IconDetail() As String = Array As String ("Manually search for items""Load all items (Slower)""Create a new item""Delete item""Update item photo")
        LstVMenu = SharedCode.PopulateDrawer(LstVMenu, IconArray, IconTitle, IconDetail)
     
    Last edited: Oct 4, 2018
  3. LucaMs

    LucaMs Expert Licensed User

  4. Filippo

    Filippo Expert Licensed User

    Why? It is a normal wish, you can also wish the stars from the sky. :rolleyes:

    I do not need any templates, but I think any newcomer would be happy about such templates. ;)
     
    mindful and Multiverse app like this.
  5. Peter Simpson

    Peter Simpson Expert Licensed User

    You need to learn to read, the answer is after the dot ('full stop'). Anyway, what the - I better stop this right now :mad:

    Well goody for you Pal. Setting up AppCompat + TabStrip + Sliding drawer + Animated icon + Online MySQL can take up to hour (well about 30-40 minutes) from scratch with the database connectivity, color scheme etc etc etc. Why the hell would I want to waste that precious time when I can get it all working together within a minute with my template.

    Why the hell am I even replying to your post, I'm outta here :mad:
     
    Last edited: Oct 5, 2018
    BillMeyer likes this.
  6. LucaMs

    LucaMs Expert Licensed User

    I am sure that Filippo did not want to criticize or tease.
    (Filippo, Peter intendeva dire che per coincidenza lui aveva appena compleatato due suoi template e poi ha trovato questo "wish").

    I agree (if this is still allowed).


    ?
     
  7. moster67

    moster67 Expert Licensed User

    I think that the idea of templates is great. I have been an active user for a long time but still if I want to write an app using a DB, I would still need to search through the forum to get information, perhaps getting an outdated info, then continue searching until I find what I need. Of course, instead of a DB, it could be Material Design or other subjects.

    If we had templates, we could get a good code-base for starting. This would probably make things easier for beginners too.

    Another advantage would be, considering how often things and approaches to certain development aspects are changing (due to new features added by Erel), that the template would always show the most updated form of programming for a certain area of programming. For instance, take the "wait for" and "Resumable Subs" and how this changed the suggested way of programming certain tasks. The templates could then be updated with changes and show the "best way of programming" (like in Erels' videos).
     
  8. Peter Simpson

    Peter Simpson Expert Licensed User

    Translated to "(Filippo, Peter he meant that by coincidence he had just completed two of his templates and then he found this "wish")"

    No @LucaMs.
    As I said previously and I quote:
    "I was going to mention templates a few years ago, but then I just decided to create by own."
    So that's why I didn't add templates to the wish list.

    Anyway, @Filippo answer annoyed me as he was talking to me like I'm a dam fool, my templates are all about saving time as far as I'm concerned. I'm going to stop now as it's the best thing to do, plus I'm busy working on a warehouse management app for a client.

    Now back to the subject at hand.
    I was going to make a wish for templates a few years ago, but I didn't because I decided to create my own templates instead, thus I can copy and paste my selected template folder and within a minute I have the basics for a new project without all the hassle of creating one from scratch. Adding libraries, putting everything together, adding code, sorting out color schemes (I have a file with lots of color schemes to choose from) etc etc etc. Everything is there ready for me to start using in less than a minute. My templates also includes my standard build configurations.

    Maybe Erel could add an options for a template folder like the 'additional libraries' folder and the 'shares modules' folder. All you would have to do is place your templates (projects) into that folder and the project appear in B4A as a template that you could then use straight away but without actually over writing the selected template.

    @moster67, that's the exact reason why I have my own templates. Templates didn't take long to create and update if need be. Now that I have them to hand, I can setup new apps in just a minute, no messing about with putting everything together from scratch.

    I do agree that basic templates is a good idea though, especially for beginners to see how to put code together. But then again, different developers do things differently. For example I use 'Private' in Process_Globals where other use 'Dim', it doesn't really matter what but I'm sure some developers would say something about it.

    Anyway, it's time for me to get back to doing some programming to pay the bills ;)
     
    Last edited: Oct 5, 2018
    Multiverse app and Johan Hormaza like this.
  9. LucaMs

    LucaMs Expert Licensed User

    If anything, Filippo has evaluated "crazy" the "wish" - but I think that all development tools provide some project templates.
     
    Last edited: Oct 5, 2018
  10. Filippo

    Filippo Expert Licensed User

    What a theater, :(
    I just wanted to say that everyone can wish what he wants, and nothing else.
    And I certainly do not want to criticize anyone, because who am I?
     
  11. Douglas Farias

    Douglas Farias Expert Licensed User

    very nice, it will be very good to beginner users, already open the b4a and select what screen he want to make.

    the most important i think is navigation drawer already implemented to b4a, this will save a lot of works

    +1
     
  12. klaus

    klaus Expert Licensed User

    Well, from my experience, templates might seem to be interesting, but they never fit the requirements of the users, even for beginners.
    I have never used templates, I have always prefered to learn how a 'new' language works and build my own layouts.
    Just as an example, I saw this with the SQLiteLight examples. These are, at least in my opinion, templates or simple projects to learn SQLite.
    And, then came the questions.
    Who has used templates for Word, Excel or PowerPont, I didn't.
    I am afraid that, today, many users want to have almost everyting done, and just select on a shelf what they need, and with a few lines of code do what they want or expect, but unfortunately without understanding what's behind the sceen.

    Sorry, but this is just the opinion of an old programmer who began in the late 70s, a so called dinosor.
     
  13. Peter Simpson

    Peter Simpson Expert Licensed User

    I know where you are coming from @klaus,
    When I go to see a new client about designing a new business app for them, I always ask them if they have any thoughts about the basic look and feel of their bespoke app. Somebody in the meeting inevitably pulls out a phone or tablet and shows me an google designed app, usually Gmail or Google news, but never ever FB for some reason, what are they hiding lol. Sometimes they show me other apps but the general design principal is basically always the same, some variant of Material Design.

    So my thought is a simple one. I've basically pre-made all the most common variants that I've made for my clients, that saves me time when starting a new project. As I only make business apps, usually warehouse management systems, invoicing/epos solutions, stock control, taxi fees, mobile courier solution etc etc etc. With a few simple changes for functionally and obviously screen design and layout, I find that business clients usually want one of four basic designs and that's simply because lots of downloadable apps on the play store use Material Design and clients like that, but not always.

    Obvious I come across clients that have a completely different design in mind, then I have to create everything from scratch and either create myself or try to find libraries or classes to suite.

    But I do find myself using my templates more often than not, and that's not by my choice, but the choice of what my clients say when I ask them their thoughts. I really do enjoy putting together everything from start to finish, but if a client says that they want the look and feel of GMail, Play Store, Photos etc with some minor changes like toolbar and drawer menu etc, I already have it ready to hand and I even have multiple color themes ready, about 20 in total. I don't create bespoke apps for clients that want to put the app on the Play Store, that's too much hassle and there's way too much that can go wrong.

    I do create apps for clients that look totally different with what I call strange designs as in look and feel, but if that is what the clients want, then that's what the clients will get, they pay the bill after all.

    Nah, you're still young at heart Klaus...
     
    Last edited: Oct 5, 2018
  14. moster67

    moster67 Expert Licensed User

    In my opinion, the idea of the templates is not to give us developers a free ride or a full app but a good starting point in a specific area of programming. If the templates then are also being updated when new programming features or "best practices" are released in B4A, it is also a good way to be sure that we are coding adhering to this and making the most out of B4X. That said, the developers then need to extend their knowledge by coding and testing and learning more about the specifics but it's a head-start.

    I also like this idea of being able to add you own templates in a folder.
     
    Multiverse app and Peter Simpson like this.
  15. Multiverse app

    Multiverse app Active Member Licensed User

    Giving the option to select different templates does not mean that users cannot customize their own ones. These Templates could be a step to creating new projects and can help to save a lot of time while doing so. That also doesn't mean that new users won't learn anything, as individual libraries are clearly documented in b4a forums. I personally think that this can make our task much more productive than before.

    I don't think you can compare Microsoft Word with the IDE. I am positive that if this feature is added, more developers will use it more than we think.

    If a developer doesn't wish to have a predefined template, they could select a blank activity or, their own customized template from the list.
     
    Last edited: Oct 8, 2018
    Peter Simpson, Filippo and moster67 like this.
  16. Johan Hormaza

    Johan Hormaza Active Member Licensed User

    I think the templates with which we work with B4A are excellent, the truth is that I completely agree with @klaus. I have also noticed that the projects compiled in Android Studio (APKs) weigh much more than the projects compiled with B4A.
     
  17. moster67

    moster67 Expert Licensed User

    What templates? Have I missed something?
     
    Filippo likes this.
  18. joilso oliveira da silva

    joilso oliveira da silva Member Licensed User

    Good!!
    Good idea! I as a beginner would enjoy this a lot!
     
  19. Johan Hormaza

    Johan Hormaza Active Member Licensed User

    I mean all the libraries that already exist that make the templates, like AppCompat among others.
     
  20. Multiverse app

    Multiverse app Active Member Licensed User

    I am not talking about the libraries. Those are not templates. And there is no way it increases the size of the project.

    Once the developer clicks on one of the templates, the appropriate libraries are automatically included, and the manifest entries are automatically made. Nothing extra is added. And once the above is done by the IDE, you are free to customize the project as your like.
     
    Peter Simpson, LucaMs and Filippo like this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice