How to create an info overlay in Android - android

I am looking for a way to create a short overlay intro of an app to display to first time users. These posts gave me some understanding of how it can be done, but not entirely:
How do I create a help overlay like you see in a few Android apps and ICS?
How to use LayoutInflater / ViewStub for an overlay
I do not understand how to access my elements correctly, since my root layout element is a LinearLayout that includes an Actionbar and a ViewPager instead of containing actual elements.
Are there any frameworks that does this for you?

I think that this library : ShowcaseView is your best option.
As its name implies, it allows you to recreate the Android 4.x showcase view; ie :
.
The documentation of the project explains how to implement it.
Word of advice though : this kind of explanation view is viewed as bad design most of the time : if your application is well designed, you don't need to provide a tutorial to the user, it is supposed to be intuitive.
It can be totally justified in some cases of course, just be sure that :
-your users really need a tutorial.
-it is not because you are doing something opposite to the Android convetions.

Have a look at MaterialShowcaseView. It inherits from ShowcaseView and is up-to-date.

Related

Is it possible to add custom interactive UI elements to EditText?

A bit of context here. I'm an iOS developer with no knowledge on Android development.
I need to know whether it's feasible in Android to embed custom interactive UI elements (in iOS that'd be a UIView) inside of EditText.
A library I found to do this in iOS is: https://github.com/vlas-voloshin/SubviewAttachingTextView
You can see a GIF in that link showcasing the kind of behavior I'm looking for.
Is there built in support, or any third party library I can use to achieve something similar in Android?
in normal way this is not possible in android and we don't have any standard component or any library (that i know) for doing such a thing but we can create something similar to this (for this you should search about custom Views in android !) and also there is other way and easier way to achieve something similar to this is using the container layouts in android like LinearLayout and adding all your component to that container layout in run-time base on your text ! for example in your code you can dive in to your text and find tags like or and create appropriate view for your tag and add it to your container layout and at the end your layout looks like that gif wich is in your question ! and also in android we can show some basic html code in textView

How to present an Android project when only the layout has to be done

I have to make a new design for an Android App, but I only have to create the visual part (native Android). The app logic would be created by another guy based on what I present to him.
My question is? How would this be managed correctly? Do I have to make the XML's of each layout? How could I show the other person my progress?
What things should I consider when doing this?
Thanks
You need to mock the app first (create a prototype) as suggested by NoChinDeluxe. Then if you guys go ahead and decide to code it, the answer to your problem is separation of responsibilities. As Jeffrey said UI work is not only about layouts, but code as well. What I would suggest is that you and the other guy get together first and define some contracts (interfaces) that will allow you guys to split the work and work in parallel. Therefore, he can create the business logic of the app without worrying about the UI implementation. You, on the other hand, will have to mock that business logic he's implementing at the beginning so it doesn't block your UI work.
you could create layout XML files for all the Activities/screens, using resources (icons, etc as suggested by #NoChinDeluxe). However since you'd want to run the mock app, you might want to also create a "throw-away" Activity that allows you navigate to different screens of the app. Here you can add a number of buttons and when you click on each button, your app shows a specific activity. This way, you will be able to show your colleague all the screens you have created. I hope this helps.
This may not be what you want to hear, but creating Android layouts isn't a design task. They are closely tied to the code, and the design of them is going to depend on how the engineer chooses to implement the app.
Here's an example. You might have a grid with 4 cells. You could use a RelativeLayout, a LinearLayout, or GridLayout, or a GridViewLayout. Which will use choose?
I'd suggest providing your engineer with mockups and graphical assets where required. Let him / her take those and create the layouts. If you want to create layouts as a (visual-only) reference for engineering, great, but it's certainly a non-optimal tool for that task.
Things You will consider when doing visual part:-
You have to work on the resource folder of your application
Layout : All Layout you have to prepare.
Drawable : Images and drawable .xml.
Inside Values folder you will find
dimen.xml : For different devices dimen you can set.
string.xml : You can store string for hint or other purpose.
style.xml : For designing or theme or custom design.
color.xml : Color which are going to used in the application.

Dynamic UI Controls in Android

I am in a situation like i have to generate UI Controls like Button,Switcher,Progress Bar, Label text etc based on my list Items .
I am looking for a way to generate the controls in a View and add Views with generated controls in a Layout .
Can anyone give me a proper way to do that?
Why not to use Fragments?
Google docs about this here
and little tutorial here
You may want to take a look at the Metawidget source code. The Android version of Metawidget makes extensive use of generating Views and Layouts at runtime (e.g. see org.metawidget.android.widget.widgetbuilder.AndroidWidgetBuilder). You may even find Metawidget itself will suit your needs (it's designed to be embedded into projects for use-cases such as this).

Custom controls in android

I'm new to android and need to create what in .net would be called a custom control. But I have two questions:
some articles refer to them as custom controls others custom componnets and other custom widgets. What should I be looking up?
Most questions on this topic are simply refered this page http://developer.android.com/guide/topics/ui/custom-components.html which is just a view class and is a bit like being handed a chinese dictionary when asked how to write chinese and told everything you need is there. Although true, I'm looking for a simple example something like an odd shapped button with one even attached to it. Surely there must be one such example?
If you really need custom view - look this document. But easier way - customize existing components, by providing specific backgrounds and providing special events.

Android Tweetdeck-like UI

I'm getting started with Android development, and I would like to have an interface similar to that of tweetdeck: there are several workspaces (activities) that are laid out left to right, and the user can switch between them with a horizontal gesture. The same way the Android desktops are switched.
In tweetdeck there are also dots in the titlebar, that indicate on which side and how many workspaces there are.
Is it a standard Android interface, or something custom built? How do I do something like this?
How you go about this is going to be partially dependent on the content you want to present. If there are going to be many heavyweight pages you'll want to look into doing something like a custom AdapterView. If there are only a few fixed pages such as in the stock home screen you can treat it like a scrollable view with some custom logic to handle snapping to pages.
Here's a link to the custom view that implements this in the stock Android launcher. The bits you're interested in will mostly be in onTouchEvent, onInterceptTouchEvent, and computeScroll.
https://android.googlesource.com/platform/packages/apps/Launcher2/+/master/src/com/android/launcher2/Workspace.java
Take a look at ViewFlipper: http://developer.android.com/reference/android/widget/ViewFlipper.html
In addition to studying the actual Android code (referenced in another answer), some folks have extracted and isolated the workspace (Launcher2) code into a re-usable view group. You can find the work in github here https://github.com/olibye/AndroViews

Categories

Resources