Reference for good Android UI design patterns - android

I would like to get some links for getting started with design patterns.My requirement is , (at Initial stage) How to go about developing a particular pattern , say customized ListView which can be shared across applications .
e.g. Applications will call something like drawCustomizedListView(params...) and my code will draw the listview according to the parameters supplied. This is particularly useful when across the applications I have to draw customized views.
My intention is,
I should not repeat the same code everywhere for doing similar task.
Any references for the above requirement ?

See the official video on Android UI design patterns of Google I/O 2010 event from here:
http://www.google.com/events/io/2010/sessions/android-ui-design-patterns.html
Also you can download PDF file of this:
http://dl.google.com/googleio/2010/android-android-ui-design-patterns.pdf
And here you can find ultimate design patterns:
http://www.androidpatterns.com/

Create a package with a name such as com.yourcompany.android.ui.common and create all of your common classes in there. Build it as a .jar file and use it as an external reference in your android projects.

Related

How do we create android application custom documentation for application flow?

Recently my team mates has started to work on an android application, which has more than 200 screens in an application.
In this case, I face one issue that when I need to explain the code or flow of screen to the other developer it would too much difficult. So I have to google to find the solution.
I am not much aware of the solution for android. In javascript, I have used jsDoc or swagger for API documentation, which offered a great way.
But in android, I unable to find the solution for coding documentation and screen flow.
Do I need any design tool to explain screen flow and documentation of an android application?
Let me know if you need more details or explanation I shall update the question accordingly or improve my question.
There is no way to create an automated screen / state transition diagram. If you use the Navigation Architecture component, you can use the navigation editor which is similar to Apple's storyboards. This is helpful but often times doesn't cover everything.
In our projects we rely on tools like overflow.io to create and maintain the screen flow diagrams. We use either design files from sketch or Adobe XD or screenshots from our app. This is a very manual process.
Firstly Go to File -> Project Structure. Under the Platform Settings heading, add or select an Android Platform. Go to the Documentation Paths tab and make sure the path to your SDK's documentation folder is added there - it should be [SDK]\docs\reference, where [SDK] is the full path to your SDK installation.
If it is not found you can add it manually.
After it is completed, use Ctrl+F1 while your cursor is on the item you want to display help for.

Communicate project structure with android using XML?

What I'm Trying to Do
I'm trying to create something that will allow customers to customize how our android application will be set up. This should be a UI editor that sits on our web server and, upon save, will communicate with our android project so that it can set itself up.
What I've Done So Far
I've been looking into something like a Business Project Management tool that can export itself as an XML (or equivalent). For example : https://demo.bpmn.io/new ... The file that even a simple diagram produces (BPMN) seems far more complicated than what we need, though.
What I Need
We can create something on our own or customize an open source project like this to better fit our needs, but I'm not sure if BPMN is the best approach and I've been having trouble finding sources to learn more about it. Is there a better approach I can take?
My project is still in its very early stages and I would like to make sure I'm at least starting off on a good path.

How to render ui from xml

I wanted to create my own tool for android where i will change xml and that should reflect android ui side by side likewise what android studio and eclipse does.
Can someone tell me what android studio and eclipse uses to render ui from xml as shown in screenshot.
First off: it is not really clear what you want to achieve so I think I should ask some questions first.
- Do you want to create an add-on for an existing IDE?
- Do you want to create an Android Application?
- Do you want to create an IDE similar to Android Studio/ Eclipse?
Answer: If you want to create your own IDE then you need to implement the parsers and preview using 2D drawing. The tools AndroidStudio or Eclipse use to display the XML Views are part of the IDE. As far as I know there is no tool that will display your XML preview as they do. Follow the next instructions in order to implement that part.
But regardless of the answer to any of the questions above, here are some directions.
Since you need to know what kind of content you're using, you should start with an xml parser. How to do that can be found here.
Next step would be to actually draw the Views hierarchy somewhere. For that you need a basic 2D drawing knowledge, and you can start here
Access the resources for different platform and draw them to your window, using processed xml information and Android specific images. You can access the Android specific resources (images) for different platform, through the AOSP here
I hope i managed to point out some directions.
This is a complex thing to do:
One and only solution , Making the compiler for XML, If there are openSource XML parser for java Use them.
If there are not any I am afraid you have to make your own.
unity can do it for you its funny but you can do it with unity you can make android native views like button and ... in as objects in unity and load xml for adding views in right place,its so hard but possible and intresting

Android - sharing activities/code between different applications

I have a single android app with a custom logo, some custom json service endpoints, occasional custom text, and possibly a custom color scheme.
For my client this particular app will need to be rebranded and distributed as an entirely different app about 5-10 times over. So I'm looking for way to reuse the most amount of code - the activities and services will be identical except for the custom things I mentioned.
First off, how can I share projects in the sense that one project will hold all code (including activities), and the others just modify a few values. I can't think of a smart way to share both service code and activity code with the occasional value thrown in via properties.
Do android layout/string resource files have the ability to pull from properties? Can activities be bundled inside a jar and shared with other projects?
You can use Android library project to share the common code. Start by reading this article
You do not have to have different java namespaces, they can be common for all projects. All you need is to replace resources and modify manifest to contain different namespace for each application. There is no problem with several applications having the same name of classes inside. Unless you want to rebrand it all the way user could not find it is actually the same code, of course.

How to choose objects for your android application?

I am new to Android but not to programming. I have taken C++ in school and we have been taught how to create objects, but not how to build robust programs using multiple objects. So you can see that using java to build Android apps leaves me with questions.....
thinking like an object oriented programmer, do i just shop through a list of classes until i find ones that i think would suite my app
is there a definite method of choosing the best classes for your project
do i find an app similar to the one i am trying to create and try to find what classes they used
any thoughts appreciated!!!!!!
The best way to learn (for me, at least) is by making small incremental changes to an example so I can how all the various elements of it work.
Download the examples (listed here) - but accessible from your AVD and SDK manager tool from within Eclipse (Window -> Android SDK and AVD Manager).
Start by modifying those examples. They are the best possible examples you can get for much of what you will want to do.
I'd recommend you start with Tutorials and also read about Application Fundamentals - they should get you started. Also browsing Classes is useful if you like wading through lots of technical docs (I do). Those three links are definitely worth looking at.
Well first when building Android applications you need to:
Figure out what your application will be, and how it would work.
Next you would need to find out how you will implement the android classes.
i would recommend first reading a book on Android development. One that really helped me and made me an advance developer was CommonsWare
You should really get these books. When you finish you will be well on your way.

Categories

Resources