I need to draw a diagram but I am not sure what sort of diagram that is appropriate for my application.
It is a mobile application that contains:
Splash (as welcoming scree)
Main Menu Screen (Which contains)
Gallery
Settings
Map
Help
The Gallery has contain all the images/photos that is stored on the device.
Can anyone suggest what sort of UML that is appropriate for this application? Is it Use Case Diagram? or Sequence Diagram?
Thanks in advance.
Hi every application/project requires activity diagram for its final implementation besides usecase,sequence,statechart.Heres the link hope this will help you
http://www.tutorialspoint.com/uml/uml_activity_diagram.htm
In my opinion, you should be clear about what you're trying to achieve before generating documentation, otherwise you can end up with heaps of useless charts and diagrams.
If I were you, I'd use a Class Diagram with a Use Case diagram.
The Class Diagram will help you and other technically-minded people to understand how your code fits together.
Then use a Use Case Diagram to show the flow of typical use of your program. This should be understandable by anyone.
Related
I would like to ask about the tinder-like swipeable card stack for my application. The point of it is that users will be able to see photos and swipe when they want to see another one. I'm already sending and receiving images to and from webservice and I have been trying some libraries that could manage to do this (googled 'swipedeck' and 'swipecard') but non of them either offered enough flexibility to customize actions fully, or were not working with ImageViews, only TextView.
Now I'm new at this, but I figured that there has to be some kind of RecyclerView, TabLayout or some other implementation that would make it possible to do this and would include also transitions/sliding effects between pictures. I just need someone to point me in the right direction.
Could you please help me by posting your ideas? It would help a lot, and I do not need any specific code parts, I will do my research later on based on your ideas. Thank you a lot!
This is the official guide on creating sliding screens using Viewpager. This should help you get started : Using Viewpager for Screen Slides
There is a project in github that does exactly that - it's called "TinderStack", and you can find it at https://github.com/lawloretienne/TinderStack
I want to implement a list like a leaderboard into my project. I saw an example which usw the Android native ListView class but is this the right way? Does any body know a solution?;)
I don't have a solution but since you got no answer yet, I wanted to inform you that I used the native ListView class and it worked like a charm !
Easy to implement and I haven't heard about any other way to do so with Andengine yet (there might be though). This only is a return of experience, hope it helps !
Here is a tutorial that will demonstrate how to create, add and update ListViews:
http://www.vogella.com/tutorials/AndroidListView/article.html
After practicing the concepts in the tutorial, please keep in mind that every row in a list (a separate view) is recycled - while you do not need to inflate it again, you do need to ensure that you set/selete/update any and all information on it, otherwise you get funky bugs. Hope this helps.
You can use the approach from Google Play Game Services.
Your game activity can extend AndEngine's BaseGameActivity. The leader-board activity can extend a normal ListActivity.
In your game start the leaderboards activity with startActivityForResutl. When the user is done, he just goes back to your game activity.
Go Launcher have a nice first-time tutorial. it is very similar to Stock ICS first time run. I want to learn how to make the similar tutorial display at the first launch of my app. How can I implement this Transparent view (which interacts with screen objects) in my android app?
I was trying to do something similar using a transparent activity with a viewpager inside it. I wanted static 'tutorial' images that users could swipe through.
One of the answers to my question mentioned an interesting library (called ShowcaseView). It seems like it may be a good fit for your requirements as well.
https://github.com/Espiandev/ShowcaseView
You can either use a FrameLayout or RelativeLayout as root of your Activity/Fragment, and put your "first time" View upon content with a (almost) transparent background, or use another Activity/Fragment themed with a transluscent window. (like this)
I'd rather use an Activity/Fragment, but this is up to you!
I wrote little library That contains a simple component for making a app tour. It`s very restricted to my case but maybe could be your case . Single LessonCardView Showed onstartactivity for the first time or on button click Any criticism ,help or advice will be appreciated. thanks https://github.com/dnocode/DnoLib
You can implement a first-time user guide with the Spotlight library by TakuSemba.
It is similar to the one shared above and it is still well-maintained (as of 2021).
https://github.com/TakuSemba/Spotlight
I'm finishing an application, the thing is that I have a couple of layouts and all the code concentrated in an Activity.
I have 5000 lines of codes and when I have to fix something is a pain in the ass to find what im looking for.
as im really new in Android development, I can't find a way to split the code into several classes.
is there a simply way of split one layout with one activity?
its really annoying to declare each layout with his corresponding activity in the manifest.
thanks for any suggestion.
Actually it is not Android. But OOP (Object Oriented Programming) concept.
Of course you can split function in one Activity into several classes. For example, if you have AsyncTask you could make it outside an Activity, if you have Adapter that reads from DB you could also make it outside an Activity. Just call to those classes when needed. And any other general functions you could also make it outside an Activity perhaps in Utility class or something.
From what I understand, you have multiple layouts for a single Activity? You could check out the Fragments API and divide up the Activity into easily manageable Fragments. As for the 5,000 lines of code, try to divide that up into separate classes with static access or is there a way you could use data objects? You really shouldn't have 5,000 lines of code in ONE class, divide that up into separate classes.
Well, the Android way is to use activities to hold your layouts; that is what they are intended to be used for. It would be a good idea to make your program as object oriented as possible... Here's why..
Java is an object oriented programming language.
Help make your code easier for you to understand, follow, and make changes to.
To make your code easy for OTHERS to follow.
Ensure cohesiveness in your application.
So it would be a good idea to make your application as functionally cohesive as possible. It will save you much trouble in the future.
I've read several example programs and tutorials to try and solve my problem but they all seem to go the same way. I've used a couple Activities and xml documents to create a menu that loads when my game starts. When the user clicks the "Start The Game" button, it loads a new Activity that sets the view with my game thread and all of the game properties. I know this activity works because I've run it alone as its own project, but every way I've tried to start it after the Menu, I get a nullPointerException and it force closes. I read the SurfaceViewOverlay tutorial and attempted to use that implementation, but I'm using a SurfaceView, not a GLSurfaceView. I'm debating rewriting my entire program to use OpenGL but I figured I would see if anyone else knows what I'm doing wrong here. If you need the code snippets I can paste some here, but it's not really the specific code that's wrong, I think it's the way I'm using(abusing) the language...
Thanks for any help,
Aaron
I discovered my problem quite some time ago, but figured I would come back and give an answer to anyone else having my problem. When using a SurfaceView it must be part of the activity that created it and be in some sort of FrameLayout in the xml for that activity.
For example:
<com.example.MySurfaceView
android:id="#+id/mySurfaceView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
You can add any other layout elements you would like, but this is required to create the SurfaceView. I hope this helps anyone else who had my problem, for any further questions just ask and I'll be sure to elaborate if necessary.