Hello everybody,
I 'm a novice in the android world (after an experience in WM dev) and i m trying some GUi examples with 2.3 android SDK.
So my questio is: I found so many apps that has a great look and a very nice GUI. Are they using the library provided with the SDK? or are they using their owns libraries?
are there some librairies (open source or not) availbles for android GUI dev?(Something like Flex I mean).
Thank you very much,
weldmongi
I'd say 95% of what you're seeing is apps using Androids GUI code and theming/skinning the components. (The exception is basically games that use an engine to run and do their GUI in the engine).
The theme system in Android is generally quite flexible however there are a few areas that it is lacking/inflexible. So sometimes you have to set graphics in the layout xml because the theme system just wont change something (I'm looking at you, AlertDialog).
It is also something that's a bit hard to wrap your mind around at first but there are quite a few tutorials out there that are pretty helpful. Just google "Android theme dev" etc. Nevertheless this is one of my biggest criticisms of Google/Android. They basically invented a non-sensical syntax for theming.
http://developer.android.com/guide/topics/ui/themes.html
Hi there
not THAT much threads here related to development questions. Now it's absolutly ironic that I ASK this, cause Im no dev and coded the last small tools in C some 10 yrs ago. I'm a complete and definite noob in C++ ... bada SDK is my first contact with C++. I though it's interesting to try some first steps in bada.
Started in SDK 2.0.2. I found out that code examples in Internet relate to bada SDK 1.x and things seem to have changed here and there. After 3 days I was able to understand structurally what I collected together or found in help.
Question: What did you guys face as difference in 2.0 compared to 1.x?
I wasn't able to invoke the app "terminate()" command. What do I need to include/declare? I'm puzzled. this is the most difficult exit function of all languages I know
I had trouble to insert a photo as the splash screen. You guys have difficulties too?
More philosophic question: What do you think of Samsung, that they gave you SDK 2.0 and even started a competition, while there's STILL NO bada 2.0 device ready? So you can only test in Emulator or Remote ... is it normal in this industry that you don't have access to the target platform while creating an app?
Oh, just want to mention: I'm no competition - I'm too uneducated to code - and no time for a serious app.
Ray
Its simple, alot of things gone easier.
CustomList, GroupedList, SllidableList, IconList, ... all collected to two types
ListView and GroupedListView, they both are using SimpleItems (Image, Text, Option) or a CustomItem as we devs them wish. GroupedItems are in GroupedListView and saying itself what they does, both lists have a fast scroll option and automatically relocating on need their items. The best autoscroll for bigger text in elements and of cousre the behind Context menu for each item which can be changed in different ways if user slides left or right and so on. Finally to update the list, only UpdateList() is needet not after every change every item as i used in badaSI before.
Than we have the powerfull Gallery that provides all featuers to show pictures as you all saw it in badas Gallary App.
Then header and footer, very nice, devs can so made a good basci gui that looks good integreted to the os, the best function of them are the back button option with its listener, it reduces a lot of time.
My pesonal favorit is the extension for animation class, there you can make every thinkable animation for forms, panels, controls and other stuff, with some code lines. So the UIx is improved and no extra code is needet.
I would rather say that the 2.0 sdk makes c++ a lot of easier to use also for beginners, the api itself is self explaining for what it stands, so it is not like old c++ stuff bada SDK makes many things alot of easier than people think. And of course it has more oportunities than other ... and so on.
Push Notifications and some old unaccessable System Privilegs are now free to use for every developer. Auto resolution takes a lot of work from us all devs.
PThread is addet so porting applications from other oses like ios are much easier, in my oppinion useless cause i am not porting i am writing from scratch.
In a whole overview of the new sdk, a lot of new stuff that makes everything easier, and the old stuff is still in there to support older applications. so no visible changes are there if you see an custom list or a listview in voluntas as example, but the behind things made it a lot of easier and better for memory.
And so on....................
ah, so push noti was there before, but only to priviledged partner dev's right?
Lari, you list is your favourites? What of them will help most often? Header/Footer? Auto Resolution to unite higher and lower lever Waves? Let's see if there's still two separate bada versions for the 2 familys.
Ray
So finally I got the Terminate() function up and running ...
In the form.cpp I had to add these:
#include "<myappname>.h"
... to get declaration of my app name
using namespace Osp::App;
... to enable the Terminate function (don't know if the include makes this unnecessary now ... in "<myappname>.h the public Osp::App::Application,
is used as class
<myappname>::GetInstance()->Terminate();
... only with this the function worked.
Is this standard in C++? Help didn't show me this way, and it seems quite complicated for me as a former ANSI C amateur
Ray
hello? zehn zoicha kaesdreck!
Hello programmers
I would like to do learning app for kids
the app will include :
1- registration -> to show the score that he got from quizzes and also display hes friends score (like a competition between friends)
1.1 - registration can using facebook , twitter so he can invite his friends to the game and play with them.
2- voice -> to say the name of the items (numbers, alphabets, animals, foods ... etc)
3- some animations -> for the quizzes answers (correct or incorrect) and going to next quiz. Also for menu
4- moving items by user -> to move the items (answer) to the correct picture
what languages should I learn to do this app?
I know Java , also I have create some basic apps for android from android tutorials like note , Calc and many basics app
but the design is regular android design
so for my app it needs other design for kids and it need be more colorful (including with any event user make)
I'm good designer using photoshop but I don't know how to get the sizes for the android layout and items sizes
also for registration : do I need to make database using sqllite ?or I have to create database online "mysql" for example ? or if i do registration via facebook only so I'll get the database from facebook ? (I haven't try to do facebook apps before)
as I said before the registration is only to display the score between user and his friends
for moving items (answers) to the correct pictures . is it the same way when I do it using JFrame in java ? so I just need to do an object then control it wit MouseMotionListener then mouseDragged and mouseMoved . what are the names for the events, interface listener and functions in android
about the "Voice": is there a website that I can download the sound for most of Items (numbers, alphabets, animals, foods) for free ? or should I create it by myself ?
also is it better to create many sound files? Or using Text-To-Speech (TTS) ?
I know how to play a sound file in my program
but if you suggesting using TTS can you please give me a link to learn how to use it
my question again .. what exactly should I learn to do this app with the details the I gave above ?
what I mean is don't please tell me you should learn for example Java tell me what I have to learn in java for android
such as what are the names for the events, interface listener and functions in android for MouseMotionListener - mouseDragged and mouseMoved
thanks
For graphics check Google's design guidelines. You can set any image as the background of a view. So being good at Photoshop is great.
I think that you will need to use Sqlite databases. You cannot handle other ones in Android (Ok. Maybe with some libs)
However, sometimes it can be done with files, too. That would mean maybe encrypted text files.
Use Android DPI Calculator to get the translation from pixels to dip for all screen resolution. You just input a width and/or height in pixels and it gives you the translation and even tells you if you'll get half pixels
For the APIs codebase, I guess the documentation is the the best place to look if you already know java : http://developer.android.com/guide/components/index.html
Here is a good tutorial on how to achieve "drag n' drop" : http://www.vogella.com/articles/AndroidDragAndDrop/article.html
Hi everyone,
I'm looking for some general advice regarding drawing shapes, lines intersecting those shapes, and filling the space in between.
A little background, I'm creating an app for my son where patterns of geometric shapes are shown. When they are interacted with it would be nice to be able to change colour / animate in some way.
I have created the basic framework for the app - activities, layout, menus and the like. I now need to think about actual functionality.
Looking online I have read some resources on canvases and OpenGL. Both look as though there would be a considerable learning curve, so I'm reaching out for some advice ahead of that.
Many thanks,
Peter :laugh:
Canvas is really pretty easy - just give it a try.
For example you could implement classes for each Object Type (Rectangle, Circle) and save the data (colour, x/y-position,...) in it. Then code a draw(Canvas onto) for that classes.
Kind Regards
Thanks, I'll give it a go with that
petedunc88 said:
Thanks, I'll give it a go with that
Click to expand...
Click to collapse
Yeah, you won't need OpenGL for that.
You could also have a look at 2D graphics engines. They simplify things a lot.
Hello, XDA!
I have created my own 2D game engine that utilizes OpenGL and sports many features to help make programming 2D games for Android as quick and simple as possible. I created this engine for use in my own projects but then I thought why no make it open-source? I think other people could benefit from this and input from other developers could help fine tune this thing so it's as good as it can be.
So I gave my engine the name "BobEngine" after my online alias and uploaded the first public release called "BobEngine 1.0 Thingama" to GitHub. That was months ago and now I've finished working on the next update: BobEngine 2.0 Shishka.
I've got a post on my website detailing what's new in update: http://www.bobbyloujo.com/2015/01/bobengine-20-shishka-update.html
BobEngine uses a similar structure to GameMaker games so if you've ever used that you may be interested in BobEngine. BobEngine uses a specialized BobView to display the content of Rooms. Rooms are collections of GameObjects which each have a graphic and attributes such as x and y positions, width, height, angle, frame, etc... Rooms and GameObjects also have step, newpress, and released events built in. The step event happens each frame, the newpress event happens when a new pointer is touched on the screen, and the released event happens when a pointer is lifted from the screen.
There are many other tools included with BobEngine and the best way to start learning how to use them is have a look at the examples that are included! In the GitHub repository you'll find an Android Studio project called "BobEngine". This project contains the "bobEngine" library module that you'll need to include in your own projects if you want to use BobEngine. Also in the BobEngine project are modules for each of the included examples. Currently there are examples that demonstrate the structure of a BobEngine game, how to use input from the touch screen, and how to manipulate the camera. I'll be creating more examples in the future to show off all the things you can do with this engine!
All the methods and data members in BobEngine are internally documented and the examples include a lot of internal documentation to help you out as well.
I'll keep updating the library with new things as I think of them. If there is anything you think should be added go ahead and post about it in this thread.
Benjamin Blaszczak
a.k.a. Bobby Lou Jo
@Bobbyloujo on Twitter
Edit: Forgot the GitHub link: https://github.com/Bobbyloujo/BobEngine
@Bobbyloujo
Thanks man will try this today and welcome 2 xda :highfive:
Thanks sir...pls give us some game template made from your lib
Great job man. It looks great.
I will try as soon as possible
Sylvain
Thanks man. Will surely try it out. good work.
Awesome, just what I've been looking for. Thanks!
nice work, and thanks for putting your time and effort into it.
Could this be used to recreate "biomenace" for android?
Thanks everyone!
@berlyshells Anything you want to see in particular? I could probably throw together a Flappy Bird clone real quick or something...
@verbuyst It certainly looks doable if you put the time and effort into it.
Bobbyloujo said:
..
Click to expand...
Click to collapse
im not really looking for anything in particular..probably any game source with comments (of the functions/what for is this code etc..) inside the code would be nice haha i just requesting but its you're choice sir im sorry im just a newbie
TIA
A new example has been added to the repository per @berlyshells request. This example is called Jumpy Bug and it is a Flappy Bird clone. It demonstrates what a full game programmed with BobEngine looks like.
Bobbyloujo said:
....
Click to expand...
Click to collapse
thank you very much sir..you are indeed a good hearted person..this is what i really love on xda
While working on my most recent project I made a few changes to BobEngine. The changes have been uploaded to GitHub.
Changes:
The extra functionality provided by BobActivity has been moved to a new class - BobHelper. A BobHelper can be used by any activity. When using a BobHelper, be sure to call its onResume() method from your activity's onResume() method. BobActivity still functions the same way it did before. BobHelper is useful for when you want to use some other kind of activity has your application's main activity but still want the extra functions from BobActivity. For example, if you want to use BaseGameActivity from the BaseGameUtils library for Google Play services.
SplashActivity has been totally changed because, frankly, it sucked before It is now an abstract class. Create your own activity for showing splash screens and extend SplashActivity. Implement the setup() and end() methods. In the setup() method, call addSplash(R.layout.your_splash_layout, time_in_ms) to add a splash screen to show as defined by an xml layout. You can add up to 10 layouts. Add them in the order you want them to show. The end() method is called after the last splash screen has been shown. In the end() method, start an intent for your main activity and then call finish() to close the splash screen activity.
Other small changes.
How many games have made using library? Looks cool)
Thanks..I tried AndEngine and it failed to import on my Android Studio.
Marshal3 said:
How many games have made using library? Looks cool)
Click to expand...
Click to collapse
Uhm... about three. There's Plane Popper, Crazy Taxi Driver, and I just finished Bounce the Beach Ball. Other than that, I've made a few examples that you can find in the repository - including a Flappy Bird clone. Also, I've been working on a platformer.
basil2style said:
Thanks..I tried AndEngine and it failed to import on my Android Studio.
Click to expand...
Click to collapse
Let me know if you need any help with BobEngine!
Hello again, XDA!
I've updated BobEngine again. This update brings the following major additions:
Gamepad support! You can now get input from any standard gamepad using BobEngine. A new example has been added to the Android Studio project that shows and explains how to use this new gamepad support. The example is called controllerexample.
Multiple quads per GameObject. Up until now, a GameObject consisted of a single textured quad (well, two triangles that form a quad). Sometimes it is useful to have many quads grouped together. If you use this, note that all the quads for each GameObject must have the same graphic. This is a very niche feature that I added for a particular purpose but didn't end up using myself. If you'd like an example of what can be done with this, let me know and I'll make one.
Some other miscellaneous stuff has been changed as well. It's been so long since I posted an update that I forget everything I changed! One useful change I made was to the camera features. Rooms now have their own camera values, meaning if you change the camera in one room, then switch to another and change the camera there, then switch back to the first room the camera will be where you left it in the first room.
BobEngine can of course still be found here on GitHub: https://github.com/Bobbyloujo/BobEngine
Here's a video showing off gamepad support: https://youtu.be/vRdaaaJnqGk
As always, if you have any questions feel free to ask. Also, if you've made anything with BobEngine I would love to see it! Whether it's something big or something small I'd love to see how others have used my engine
If you haven't already, please follow me on Twitter. My handle is @Bobbyloujo and I post updates about the games and things I'm working on there pretty frequently. Right now I'm working on something pretty big!
Another new update today!
Changes:
* TextDisplay object added! TextDisplay is a GameObject that can be used to output text! Text can be centered, aligned left or right. A new example has been added to show how this new object can be used.
* A new 'visible' attribute has been added to GameObjects. Setting gameObject.visible to false will cause the object to be hidden so it isn't drawn.
* The getAngle() function in Room.java was broken. It has been fixed so now getAngle() and getAngleBetween() both work properly.
* The getRatioX() and getRatioY() functions sometimes would not work properly on some devices. This has been fixed.
* When using multiple quads per GameObject, the performance has been increased. This was done by collecting vertex data from the quads in a way that does not require the concatenation of many arrays.
As always, the repository can be found here: https://github.com/Bobbyloujo/BobEngine
It'll really help me out if you follow me on Twitter: https://twitter.com/Bobbyloujo
And like my Facebook page: https://www.facebook.com/BobbyLouJo
If you have any questions or would like to report a bug, please leave a message in this thread or PM me on XDA, Twitter, or Facebook.
Have a great week!!
Version 3.0 Bobsled
It's been a while, but in the time since my last update I've added a lot of new things to BobEngine. Since it's such a big update, I'm giving it a new version name: v3.0 Bobsled. Here goes:
RoomCache - In BobView.java you will find a new static class called RoomCache. As the name implies, RoomCache is used for storing and retrieving instances of Rooms. The nice thing about RoomCache is that you can call getRoom(Class roomType) with any class type that inherits Room and the function will return an instance of that room type, even if you haven't manually added a Room of that type to the cache. The function getRoom(...) will search the cache for an instance of roomType and return it if one is found OR it will create a new instance of roomType using reflection and return that. You'll also notice that there is a getRoom(Class roomType, Object... args) function. If you have created a room type that takes parameters other than (BobView view) like a default Room does, you can use this method to pass the required arguments to initialize a new instance of that room type if need be. The cache holds a specified max number of Rooms. When the cache is full and a new Room is added, the oldest Room is removed. You can make your own RoomCaches, but each BobView has it's own cache with an initial size of 3. To access it from your BobView, just call getRoomCache().
Along with RoomCache, BobView has received two new goToRoom overrides: goToRoom(Class roomType) and goToRoom(Class roomType, Object... args) for switching to rooms retrieved from the RoomCache.
Input events (newpress, released) are now handled on the main thread (same thread as step event). Handling game logic on the separate input thread was causing a lot strange glitches in my games when values were being changed when I was not expecting them to be changed. Now, input will be handled on the same thread just before the step event.
For even more convenience and even quicker game development, a new constructor has been added to GameObject: GameObject(Room room). This will automatically assign an instance ID number AND add the object to the room. What typically looked like this before:
Code:
GameObject object = new GameObject(room.nextInstance(), room);
room.addObject(object);
Now looks like this:
Code:
GameObject object = new GameObject(room);
So simple! The old constructor is still there and behaves the same way for those who want it and for backwards compatibility.
Setting GameObject.visible to false will now hide all Quads belonging to that GameObject. This will not change the Quad.visible field for any Quad. Also, similarly to GameObject, Quads are now added to the GameObject when initialized.
Animations can now be played once and looped for a limited number of times. animationFinished() will return true when an animation has finished playing.
Animation class - a new class has been added to GameObject.java. This class can be used to predefine animations with a start frame, end frame, fps, and loop times.
Previously, I was using 3 coordinates for each vertex. I learned it's possible to use only 2 in OpenGL. Since the 3rd vertex is not needed, I changed the code to use only 2 vertices. I'm not sure if this actually caused any performance improvement.
Graphic.Parameters class - A new class in Graphic.java allows you to predefine Graphic parameters to use with GameObject.setGraphic(Graphic.Parameters params). Useful for when you want to switch between graphics on a GameObject often.
A new method in the Graphic class called setDimensions(int width, int height) allows you to set the height and width of the DPI level image you want to use for setGraphic(Graphic g, int x, int y...). Previously, you would have to use setPreciseGraphic(...) if you had different sized images for different DPI levels that have multiple graphics on them.
Set the color intensity of all GameObjects on a specific layer using Room.setLayerColor(int layer, float r, float g, float b, float a).
Graphics management (this is a big one):
The Room, Graphic, and GraphicsHelper classes have been updated to improve and simplify management of graphics for large games. A new GraphicsHelper.cleanUp() method makes it easy to manage graphics. You can choose points in your game to call cleanUp(). When called, Graphics that have not been used recently will be unloaded and removed from the GraphicsHelper. Graphics have a new public field called 'persistent' which when set to true will cause the graphic to remain loaded when cleanUp() is called. All non-persistent Graphics will survive through a set number of cleanUp() calls before they are removed. If a Graphic is removed but then a GameObject tries to use it again, it will automatically be re-added to the GraphicsHelper and reloaded.
You can also manually call:
Graphic.load() to load a graphic after is has been added to the GraphicsHelper.
Graphic.unload() to unload a graphic
Graphic.remove() OR GraphicsHelper.removeGraphic(Graphic g) to unload and remove a Graphic from the GraphicsHelper.
OKAY, I think that's just about everything. I actually had to look through the changes in the GitHub commit to remember all the things I've changed xD There are a few other small changes but I didn't think they were important enough to list. Now I want to ask you guys something:
Is there any interest in a full-blown tutorial series for BobEngine?
I could start with the basics, then explain more advanced features like graphics management. I could also take requests for certain tutorials. I could even cover general game development topics and how to implement them with BobEngine. Doing this would be a lot of work so before I dive in I really want to gauge the level of interest in BobEngine. So far, it's been difficult to tell how many people are interested because I haven't gotten an overwhelming amount of replies here but every once in a while I get a PM or email asking for help. So if you're using BobEngine raise your hand!
And of course: if you've made anything with BobEngine I would love to see it! I've seen a few things and it makes me happy to see you guys using getting some use out of my engine.
Thanks for your time! If you have any questions, just ask. You find any issues with BobEngine, post them here or on GitHub and will fix them. Also don't forget to let me know if you're using BobEngine!
Once again, the repo can be found here: https://github.com/Bobbyloujo/BobEngine
Thanks again,
Ben a.k.a. Bobby Lou Jo
Twitter: https://twitter.com/Bobbyloujo
Facebook: https://www.facebook.com/BobbyLouJo
you are great and i should more from you
I am a new man in the electronic area, and you have developed your own staff, you set a good example for me.
Jackiefire said:
I am a new man in the electronic area, and you have developed your own staff, you set a good example for me.
Click to expand...
Click to collapse
Thanks! Your support means a lot.