Is there any way we can design a live tiles in android like windows phone? If so can you please guide me
hello you have to look at android design principles ,
just look at this link
You can use fragments for mimicking live tiles in android!
The container for the fragments should be dynamically created frame layout or any other layout.
You can add a long click listener for these layouts, to show options like unpin,re-size as in windows.
Add a drag listener too, so that the user can freely drag and drop the view any where within the parent layout.
I hope this idea is pretty clear.
Related
I'm just starting to learn how to develop Android apps and when I tried to finally test an app with the emulator, the TextView, ImageView, and Button controls all seem to be stacked on top of each other at the top of the screen. I formatted the controls with the simple drag and drop feature in Android Studio. How do I fix this?
Tool you are using is called Layout Editor which is not so great for building layouts actually.
That drag-n-drop creation can cause errors like that and you should probably start from here or here
Hint: as a parent layout you most probably (in this case) use LinearLayout with vertical orientation.
Good luck!
The best practice for you is to try to follow a tutorial or a course to get a better understand of how the user-interface works in android.
That's might be useful Android Basics: User-interface
Good luck!
ALL,
I am trying to port the application from iOS to Android.
In iOS there is a view at the bottom of the screen which holds couple of buttons and it looks like a status bar. One button is implemented as notification button (something like icon in SMS-like applications where you see number in the upper right corner of the icon) and the others are just regular buttons.
This view is always on screen and it looks like a notification area.
Now on Android, how do I implement such a view? Go to each layout.xml and add it there? Can ViewGroup be used for such a view?
Need some guidance here.
Thank you.
[EDIT]
As some people asked here is what I'd like to have.
If you look at the Android phone after boot up (I have an HTC one) there is a grey area at the bottom of the screen. In the middle there is a big button, which says "Phone" and there are 2 smaller buttons - one which directs you to the applications installed and the other is for Personalization of the device.
What we want is something like this with much smaller button images.
[/EDIT]
Tabs on Android are placed at the top of the screen; not at the bottom:
Please carefully read this page: http://developer.android.com/design/patterns/pure-android.html and http://developer.android.com/design/patterns/actionbar.html
You could of course use a custom View, but developing will be a nightmare.
The contents of tabs can be achieved using ViewPager and Fragments: http://developer.android.com/reference/android/support/v4/view/ViewPager.html
While the indicators can be achieved with PagerTabStrips
http://developer.android.com/reference/android/support/v4/view/PagerTabStrip.html
I'm not sure what exactly the view is you are talking about without an image but you can create this layout in its own xml file then you simply use an <include> tag in each xml file. Once you get the properties how you want them it is simply copy/paste into each file, for the most part
I do this in my layouts. I extend from a BaseActivity or BaseListActivityandincludea customActionBar` so I can have the look and functionality I need throughout the whole app.
Reu-using Layouts
Does anybody know how the article layout in the Google Currents Android app is built? I'd like to use some very similar layout for my app.
Example:
The first thing which came to my mind was to build up an the layout with a WebView with multicolumn stlye (http://www.w3.org/TR/css3-multicol/). Am I on the right way or is my suspicion completely wrong.
How do I get the page flip through the swipe/fling gesture and how to get the corresponding page indicator at the bottom?
Thanks in advance! :-)
You must use native views android and not webView because it is not efficient. But if you begun on Android you can actually use a webView is a good learning.
However, if you're interreses the layout android http://developer.android.com/ the website is a very good teaching technique. And what is the view of pourfaire text scroll from right to left, I encourage you to use the library ViewPagerIndicator.
I hope I have helped you!
I have a linear linear layout with 10 buttons in it. I need to drag these buttons and add it into another linear layout(Horizontal) in the order they are dropped. Please help me in doing this?
I have some suggestions on how to do drag-drop in apps running on API level 8 up and beyond. I studied the source code for the Android Launcher module and learned about the drag-drop framework they put in place for that. I have found that is a good foundation on which to build. I have written up the details of the key classes (DragSource, DropTarget, DragLayer, DragController) in a series of articles on my blog. A solution is too long to post here, so I refer you to those notes:
(a) Moving Views In Android - Part 2, Drag and Drop - this describes the basic framework and includes a demo app. Since I was primarily concerned with learning about drag-drop, I used the now deprecated AbsoluteLayout class. The follow-on to this one (Part 3) is worth looking at too because it develops further the notion of DropTarget.
(b) Drag-Drop for an Android GridView - a demo app that shows how to use the drag-drop framework for grid views. Even better, it illustrates how to get by without AbsoluteLayout. In this case, the DragLayer and other classes know more about the kind of layouts they are working with.
The demo apps illustrate images and text views being dragged. The underlying code is perfectly general: any view can be dragged. A problem you will face with dragging buttons is making sure that the start of a drag operation will not be confused with the normal click handling that buttons do. Consider using a long click to initiate a drag sequence.
I've been using firefox for Android and really like the use of the sidebar to hold shortcut icons and the like. How would I go about creating a similar bar myself with the following attributes:
progressively revealed as I swipe in one direction
progressively hides as I swipe in the other direction
can be a custom width
I can dynamically inject layout in to it or it can hold static content
Is there any open source code available? If not, what approach would I use to create this?
Sound like you're describing a Gallery control. There are some examples in the ApiDemos project here.
The first part can be solved by using a ListView. The second part I don't know yet. I'm looking for such a component as well.