Android: Employing ImageButton with ListView - android

I’ve delved into the Android documentation that is somewhat nebulous regarding my question. Is it possible to overlay an ImageButton over a ListView employing a SimpleExpandableListAdapter? If so, pointing me in the right direction (code example or technical specs) would be most appreciative.
Additional clarification: I’m designing/developing a prototype courseware app template to be used in advanced degree programs. For this specific piece, the upper 2/3 of the screen will contain a ListView employing a SimpleExpandableListAdapter that pulls such items as lesson orientation, activities, and assessment instruments from a resource file (text file to make it easier to populate/modify). The lower 1/3 will be comprised of ImageButtons that control the flow of other lesson functions such as RSS feeds, access to school Websites, and arrow buttons that will change the contents of the upper 2/3 of the screen while leaving the lower 1/3 screen as is. In essence, a customized GUI menu system at the lower 1/3 of the screen. Thus, looking to determine if it is technically feasible to layer ImageButtons over a ListView. Thanks in advance.

Related

Design android screen mixing text and graphics, better approach?

I will like to develop an application in Android 4 that shows some gauges, text, images, etc.
It will display information read from sensors connected to IOIO board (hardware):
- temperature gauges (linear and angular)
- horizontal horizon (10Dof IMu)
- speed (vertical gauge)
- altitud (vertical gauge)
- etc...
Basically like a Garmin G1000 but the horizontal horizon will be displayed in a square (not all the screen). For example this image: Garmin G1000 image
The screen will contain text and graphics. Some graphic may change high frequently (horizontal horizon, speed, etc), but other no (temperatures, fuel qty, etc).
I was wondering what is the best approach to do it: draw all the screen with canvas, or put text with Textview and graphics with transparent bitmaps, or other options.
I will like if someone could say me what he think about the best approach to design it and to organize the visual components.
Thanks in advance.
With android, your design space is quit limited. So for something like that i would suggest nesting some layouts. You'd set one for the background and others for what ever function you wanna do. I also suggest planning what you wanna display and what layout is best optimized for the function.Eg:
Use a relative layout to set the landscape background
Use the Liner layout for the ruler functions on the sides
Use grid layouts for maps maybe
Use Split action tabs for the options at the bottom
Use menus for calibration settings
Use Relative layouts for all the funny gauges moving about and textboxes and stuff.
Then from there it's a matter of making everything work.
Here are some links on layouts:
Link 1 Link 2

is there any android dynamic treeview like c# devExpress treeview

I want to create dynamic treeview. But the levels of tree unknown. it's up to database.
So expandable listview not work for me,
is there any treeview example like below type in android ?
A...
->b...
->b...
->b...
->c..
A..
->b..
->c..
->d..
->d..
ExpandableListView is for sure something to look into, but may not expose enough functionality though.
Having said that: on a mobile device it may not be a good idea to show an arbitrarily deep tree, as the user a) may have issues selecting the nodes and b) may loose himself in navigation due to the reduced screen estate.
Especially for a) keep in mind that a touch point is not a few pixels like when you click with a mouse, but depending on screen resolution an area of 20x20-80x80 pixels.

dynamically configuring views for a ViewPager widget?

First let me say that I'm very new to android development (although I have a good understanding of the basics of java), and I am building a magazine reader app for a campus publication I work for.
I want to display each article using a ViewPager widget. I'm going to build a java program which enables the magazine editor to post articles in .txt format onto a server, along with images associated with each, and have the android app periodically download these articles to a local folder.
I'm a little confused about how to construct the views for each ViewPager from the text files. Somehow my logic needs to determine the size of the screen running the app, in order to know how many words can fit on each screen.
Is this right, or am I fundamentally misunderstanding ViewPager somehow? If so, how might I structure the program to configure the views dynamically based on the txt + images given to it?
From what I understand, each page will contain as much of the article as possible, and when the user selects the article they will be able to see the entire thing. Something like this, but so it fills up the entire screen?
If this is the case, you have two options here:
Just ellipsize the textview so that it ends with a "..." at the end. Probably the preferred solution.
Resize the TextView to fit all your text (Auto Scale TextView Text to Fit within Bounds).
EDIT:
Here's a different interpretation of your question.
From what I understand, you're trying to have something like an eBook reader with an undefined number of pages; kind of what Flipboard does:
Basically, once all the text fills in the entire area you want to have it continue to the next page.
The easiest way to do this, if you do not need native performance, would be to just use a WebView, split the text across several columns, and have only one column be visible at a time.
However, it is certainly possible to calculate how tall the entire text would be and then split it up accordingly; i.e. Pagination in Android TextView
It seems similar questions have been asked and addressed: Splitting a TextView into multiple TextViews relative to screen height (see the accepted answer).

Connecting tree nodes in android graphics

How can I create drag and drop graphics in Android almost similar to html5's canvas. Specifically I want to mimic how ancestry.com's android app "family tree" screen is in the picture below. I want to be able to drag/drop the nodes and connect/disconnect them. I also want the screen to seem "endless"; if you've used ancestry.com's android app you will notice that in this screen below you can move the entire tree left/right until no more nodes are left. My guess is that the nodes in these screens are image buttons and they use some type of horizontal scroll view, but I'm not sure. Thanks for your help in advance! :)

Need to create spreadsheet like control, what should I extend ListView or GridView?

I am an experienced developer, but I'm inexperienced on the Android platform. So I am seeking some advice from developers with more experience with Android.
I am building a Honeycomb application using Fragments. One of the fragments calls for a vertically scroll-able read-only "HTML table-like" view with dynamically loaded data. Similar to a spreadsheet, I should have clickable headers which I can implement server-side requests to filter/sort the data.
I am pretty sure this Control doesn't exist yet, am I right? Do I have to build it?
Assuming I have to build it, which existing widget should I extend? ListView, Table, GridView?
I assume I would have one widget for the header, and then wrap the body of the table in a scrollable layout to handle scrolling while keeping the header visible. I am concerned that I might not be able to guarantee that the headers line up with the columns.
Thanks in advance,
Tim
Android layouts are pretty basic - there are not any shipped layouts that will really do what you are looking for automatically, but you could probably do what you want with a heavily controlled gridView. Android is also pretty bad about controlling multiple elements to fit within the screen size, as it's goal is to support multiple screen sizes and densities.
From what I understand your desire to be, I think the best solution is to create a nx2 grid view dynamically, and control the width of the view based on the device size. You would have n number of headers on the top, and you could fill the lower half of the grid with your textViews, or whatever data you wanted. The hard part would be keeping the widths of the grid elements under control and on the screen. In addition, you will probably find that you can only fit a small number of header items on the screen because of the phone's small size, so you may discover a better layout to fit your needs.

Categories

Resources