[android-developers] Lack of clicking in ListView

2011-07-09 Thread arudzki
All,

I'm writing an app that has 3 tabs and a ListView as its first
screen.  Here is a portion of the class that sets up the 3 tabs with
icons and then creates an intent for the MyList.class that is my
ListView class.   This works.  I can select the different tabs and it
switches between the three views.  If I select the Tracking tab, I
get the ListView view.

Below the line of asterisks is a portion of code for the MyList
class.  The issue is that I cannot select an item from the list.  I
have seen examples where Listeners are used and examples where they
aren't used.  This code DOESN'T have the listener.  Is that why the
list is unresponsive?  Or does it have something to do with the fact
that the ListView is part of the tabs scheme?  I'ld love some
direction here

btw, R.layout.rowlayout in the code is the .xml defining the rows in
the listview.  Nothing special, 2 lines of text and a thin progress
bar.  As I said before, the ListView pains and scrolls fine.  It just
doesn't select.


Thanks

Tony



public class WritersPubs extends TabActivity {
long id;

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//setContentView(R.layout.rowlayout);

Resources res = getResources(); // Resource object to get
Drawables
TabHost tabHost = getTabHost();  // The activity TabHost
TabHost.TabSpec spec;  // Resusable TabSpec for each tab
Intent intent;  // Reusable Intent for each tab

// Create an Intent to launch an Activity for the tab (to be
reused)
 //   .
 // removed the code for 2 tabs for brevity
 //   .
intent = new Intent().setClass(this, MyList.class);
spec = tabHost.newTabSpec(Tracking).setIndicator(Tracking,

res.getDrawable(R.drawable.ic_tab_tracking_selected))
  .setContent(intent);
tabHost.addTab(spec);

tabHost.setCurrentTab(2);


**


public class MyList extends ListActivity {
boolean bPrompt = false;
boolean bDate = false;
boolean bNeither = true;
boolean bTextTrue = false;
boolean bUseStored = false;
boolean bRPrompt = false;
long id;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Create an array of Strings, that will be put to our 
ListActivity

String[] names = new String[] { Linux, Windows7, Eclipse,
Suse,
Ubuntu, Solaris, Android, iPhone };
setListAdapter(new ArrayAdapterString(this, 
R.layout.rowlayout,
R.id.label, names));

}

@Override
protected void onListItemClick(ListView l, View v, int position,
long id) {
super.onListItemClick(l, v, position, id);
Object o = this.getListAdapter().getItem(position);
String os = o.toString();
Toast.makeText(this, You have chosen OS:  +   + os,
Toast.LENGTH_LONG).show();
}




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Three line ListView question

2011-07-01 Thread arudzki
All,

I would like to know if something is possible, and if I could get a
hint or two on how to do it.  I want to use a ListView where each
group that can be selected consists of two lines of text and below
that a progress bar or a colored line.  The point of the screen is to
keep track of the amount of time until something occurs.  The two text
lines would contain the name of the item or event, the second line,
when it started (a date) and the progress bar/colored line would
graphically show how much time until that event or timer
expired(starts off at say, 30 pixels equaling 30 days, and every day
one pixel is removed and the line gets shorter).

I've done two line ListViews, but how do I add a really thin progress
bar or colored line as a third line in each of the ListView items?

Thanks for the help

Tony

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] possible use for Bluetooth

2011-05-17 Thread arudzki
All,

I'm thinking of creating a game with up to 4 players and part of the
game may involve bidding on random items.  Is it possible to use
bluetooth as a peer to peer communication medium?  I'm thinking one
player could be the master (to control the auction), but they could
all bid.

Is this even do-able?


thanks

Tony

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Preference Radio Buttons holding settings

2011-05-13 Thread arudzki
All,

I've followed the tutorials to create a separate preference page for
my app but I have an issue.  The check boxes and text editing box seem
to hold their values but the radio buttons don't.  I have 3 choices, I
can select, say #1, recheck it and it is lit.  When I exit to my main
app and go back to the preference screen, none of the options are
selected.  I'm sure its possible to fix it, but most of the tutorials
for preferences show the preference java code as about 4 lines of code
and android takes care of the rest!!...

Any help would be appreciated.


Tony

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Best way to do this

2011-04-07 Thread arudzki
I'ld like to make an app with a new inspirational message per day.
Whats the best way to store the 365 strings so that they can be
accessed?  A database or a string list in a file?   I'm looking for
something that will be easy to code and easy to update (separate
inspirational packs).

I'm new to this whole Android thing, but am enjoying picking and
coding my way through the learning process.

Thanks

TonyR

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en