Solved

Android questions

Posted on 2013-01-17
2
219 Views
Last Modified: 2013-07-23
Hello, I should begin by saying that I'm brand new to android development, although I have a good understanding of the fundamentals of java. That being said, I usually learn best by doing, so I'm writing an app for a campus magazine I work for and trying to learn through the process of making it.

At the top of the screen is a bar with two spinners labeled "issues" and "sections," which allow the user to filter the articles shown to only those in the respective issue / section. The rest of the screen is taken up by what I will describe as a vertically-oriented gallery, which shows the headline for each story underneath an image associated with it. The user can then "flip" through the stories in the magazine by scrolling through the "gallery." Selecting one of the stories will open the full story up in ViewPager.

Several questions:

1) Initially, I planned to place the "issues" and "sections" spinners in the ActionBar. However, as I understand it, ActionBars are not displayed to users using Android 2.x. Given that these elements are critical to navigating the app, and that a majority of android users are still using 2.x, this seems unacceptable. As a result, I'm using an ActionBar-less theme and essentially drawing my own action bar via a linear layout on top of my main activity. Am I correct in my understanding that ActionBars do not display on Android 2.x devices? If so, am I correct in including my "tool bar" as a part of the main activity, or is there a better way to implement it? (Perhaps as a fragment? I don't really understand how those fit in yet...).

2) I am aware that the gallery widget is deprecated, so obviously I'm not going to use it. What alternative widgets would best achieve the same visual goal of having the user "flip" through the stories in the magazine by scrolling through the widget? Is there a way to animate a ListView to achieve this goal?

3) I'm trying to do just that, but am stumbling even at getting the ListView to work with a custom adapter. I want to make sure that whoever helps me gets enough points to warrant their time, so I've posted this issue to a separate question here.

Again, any help - particularly which helps me to understand the wider issues involved here - will be greatly appreciated.

Thanks in advance.
0
Comment
Question by:dm4488
2 Comments
 
LVL 18

Expert Comment

by:dj_alik
ID: 38792482
may be helpful:
ActionBarSherlock :
The library will automatically use the native action bar when appropriate or will automatically wrap a custom implementation around your layouts. This allows you to easily develop an application with an action bar for every version of Android from 2.x and up.

http://actionbarsherlock.com/
0
 
LVL 17

Accepted Solution

by:
Chris Harte earned 500 total points
ID: 38793364
Pre and post honeycomb are not compatible. Fragments only run on post honeycomb for example. Writing old code just fills my screen with errors and warnings. Every day more stuff gets deprecated from android. Deprecated means that there will come a time, probably sooner rather than later, when it will be completely disabled, usually because of security fears. This means maintaining two versions of the same software. From my experience as a C programmer I know that is an awful lot of work. All the clever bits of Android, the bits that make it fun to use and code, are in the later versions.

Personally I made the decision to write apps for the new versions, the old will just have to learn to upgrade. If I can get ice cream sandwich on my phone, anybody can. Time to let the previous generation wonder off and die on the ice somewhere (By previous generation I do mean three months ago).  That is my opinion, and since you are a premium member, probably worth less than you paid for it.  Good luck with the coding by the way.

http://developer.android.com/guide/topics/ui/actionbar.html
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A short article about problems I had with the new location API and permissions in Marshmallow
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This video is in connection to the article "The case of a missing mobile phone (https://www.experts-exchange.com/articles/28474/The-Case-of-a-Missing-Mobile-Phone.html)". It will help one to understand clearly the steps to track a lost android phone.
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question