I want to make very simple book finder app for a website.
The prototype is this(how i want it to look like):
I have chosen grid layout, but the search field keeps jumping around, i think the problem is the layout(maybe wrong)
Question: what layout do you recommend for this simple app?
GridLayout or TableLayout will work fine, but you can also use a combination of LinearLayout (one vertical and one horizontal).
If your app stays simple, it is easier to use LinearLayout.
I am not sure I answered your question.
Related
Friends,
I am trying to develop an application which requires the below UI:
I know its not a feasible thing to run a ListView with-in ListView or with-in a ScrollView. So I'll like to know that Is there any other way to do this same thing ? as the UI has to be same as its running in its LIVE iOS App.
Thanks in advance.
Solution: Thanks guys for all of your answers, but as I told that the Expandable-ListView is not the option in my condition. So I have creating a dynamic layout in Java Class file using an amount of various Layouts & Widget's Array. It took a lot of practice but it covered the necessity.
android-expandable-listview-simple
check this it will help you
You don't really describe your problem in detail but from your indication of a blue bar at the left, I suppose that you want to have some sort of a secondary ScrollView inside the primary ListView; which itself has its one scrolling view. If so, then using an ExpdandableListView will not be the solution that you want.
Android has some difficulties managing a ScrollView inside another ScrollView but if this is what you want, then take a look at: ScrollView Inside ScrollView .
Be warned that these solutions are not perfect and that probably you will never achieve the same level of control for this type of thing on Android as you can have on iOS.
I'm fairly new to android programming (making the switch from Windows programming to Mobile Platforms.)
Problem: Every time I add, let's say, a text view, I get a green box around it that will put it in a location. When I add multiple text views, I go to place it down under another text view and everything in my app shifts, and moves everything into a stack on the upper left most part of the screen. It seems like every time I move one thing, 5 other things move with it.
Question: Is there a way to disable that function?
Go to your layout, right click it, then click on change layout. I changed it to absolute layout so I can move any or my widgets around the screen as much as I wanted without the movement effecting other widgets. Hope this helps
Android forces you to develop without a pixel-rigid notation. Basicly you have a set of Layout types (Linear, Relative, etc) that stablish a relation between the child's elements.
Therefore, it is important to know those Layouts, how can you connect them and how their childs are arranged.
In eclipse you can add elements but some things eclipse doesn't know how they are related. Eclipse will update the new data, and therefore moving all kind of views out of the way to update into the new hierarquy you defined. Therefore you can't remove "auto-layout". Even if you change to Absolute Layout (like David suggested) you are not removing the "auto-layout" feature. You are simply telling eclipse that you want to arrange your things with absolute positioning. However, absolute positioning is not advisable since you have several devices with different resolutions.
I advice you to read some information about Layouts and then try to use the XML. Don't be afraid. It can become quite easly. Actually, I prefer XML to interface builder in eclipse. After you get some idea how layouts work you can use make a better use of the interface builder.
Is it possible to create a layout based on (background) images? For example, there is well know app called Appie that uses this picture as a homescreen:
I might be able to recreate the layout with a TableLayout, but this will be difficult to get it perfectly aligned with the buttons in the image. The default layout options make it very difficult, or maybe impossible, to allow for selection of the buttons on the image (especially when the buttons are in an arc-path).
Can anyone tell me how this is done?
I had some issues positioning a badge on the corner of a view. You can check my solved question:
Positioning a badge bubble on the left upper side of a button
About how it can be done. I would do it with a RelativeLayout and TableLayout as you mentioned, but to be completely sure, you can use apktool to see how the xml are done but it might be ilegal to do it.
I want to create an activity, which shows a question with 4 answers, and at the bottom of the screen i want to place a timer.
I have already found timer example, and i created a question with the answers. the problem that they are 2 different projects and activities, and i am looking for the best way to implement it. i think i can't show 2 activities on one screen, but i can show 2 views or shell i use the ViewGroup, or maybe to copy-paste one of the activities code to another ( its the easiest way but probably the most ugliest way to implement it).
please tell me what is the best way, that i will study and not to waste time to study all the ways and only then to choose one of them.
welcome to StackOverflow.
You are correct in that you cannot display two activities at once. You must instead look into how layouts work in Android by reading some tutorials on the Android developer guide.
For your layout, I would recommend using a LinearLayout with four TextView objects inside it containing the questions (and perhaps your EditText objects below them) as well as your timer. Make sure they are all inside a ScrollView so the software keyboard doesn't force it all to be squeezed up. This is how I would approach it, but I encourage you to read about how layouts work and use the XML resources.
The Notepad tutorial is an excellent way to get started with views and text entry, as well as using SQLite databases.
I'm taking my first steps in Android programming.
My application is to create entries in a database. For this task I have created a new Activity. All is fine - but I don't really like how it looks.
Currently, the emulator shows this:
I'd like to have something similar to the "New Contact" Activity:
Buttons at the bottom of the window, not directly below the other controls (I'll hopefully figure that out myself)
Buttons within a nice "box" like shown in the screenshot (what's the control hosting the buttons here?)
When soft-keyboard is displayed, the buttons should "move up". If there's not enough room, the entire area should be scrollable (I'll try and figure that out myself too)
Sample can be seen here:
Which control hosts the buttons in the above "New contact" screenshot? I'd like to use the same for my buttons.
One way to figure out what an existing activity does is to use hierarchyviewer and examine the activity's contents.
Another way to figure out what a native Android activity does is to look at the source code. In this case, it would appear that the buttons are inside of a horizontal LinearLayout with style="#android:style/ButtonBar" to give the silver sheen. That style, in turn, uses #android:drawable/bottom_bar as its background. That image can be found in your SDK installation -- go to the platform directory of your choice, then data/res/drawable-hdpi and data/res/drawable-mdpi for the two versions.
The contacts layout looks like a ListView sitting on top of some sort of RelativeLayout or LinearLayout housing the buttons. The silver background may simply have been set using android:background on the Layout itself (layouts are views).
I found that the commonsware books are excellent resources for getting started and have good examples for this type of layout.
Hey, this is a little late, and I know you've already got the silver bar you wanted, which is all good, but I've stumbled upon a really good guide on controlling the soft keyboard for best user experience. It covers, among other things, how to make the visible area resize to fit the button bar in the view while typing, which is done by specifying the activity in the manifest file like so:
<activity android:name=".MyActivity" android:windowSoftInputMode="resize" />
I really recommend reading it, it covers a lot more helpful stuff than just that. Hope that helps; I couldn't see that anyone else has answered that particular part of your question.
You can put them in LinearLayout and assign weight of 1 to each of the buttons.
Also if you own dev phone / or want to see UI of the application in emulator - there is a very cool tool call hierarchyviewer
http://developer.android.com/guide/developing/tools/hierarchy-viewer.html
and you can see how UI of app you like has been laydown.