Re: [android-developers] news app

2011-10-16 Thread Chris Stewart
What you want are two fragments, one for the article view and one for the 
article detail view.  You then would have an activity (or two) to manage them 
based on phone versus tablet.  The fragments would communicate back to the base 
activity when something happens, say a touch on the article view, and the base 
activity would react as needed based on which type of device it's on.  So if 
it's a tablet, where the base activity is managing both fragments, it would 
simply call a method on the article detail fragment.  If it was on a phone, the 
base activity would use an intent to start the second activity.  Make sense?

Chris Stewart
http://locomolabs.com



On Aug 22, 2011, at 5:30 PM, bob wrote:

 Ok, let's say you are working on a news app.
 
 So, you have a ListView with some article titles.
 
 Then, when an article is clicked you have a TextView that replaces the
 ListView.
 
 What is the best way to do this?
 
 I'm thinking of having the ListView and TextView on top of each other
 in an AbsoluteLayout and showing/hiding as needed.
 
 Or, I can create two XML files and using setContentView as needed.
 
 Any ideas?
 
 -- 
 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

-- 
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] news app

2011-08-22 Thread bob
Ok, let's say you are working on a news app.

So, you have a ListView with some article titles.

Then, when an article is clicked you have a TextView that replaces the
ListView.

What is the best way to do this?

I'm thinking of having the ListView and TextView on top of each other
in an AbsoluteLayout and showing/hiding as needed.

Or, I can create two XML files and using setContentView as needed.

Any ideas?

-- 
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


Re: [android-developers] news app

2011-08-22 Thread Miguel Morales
Seems like editing the item should be an activity.

On Mon, Aug 22, 2011 at 2:30 PM, bob b...@coolgroups.com wrote:
 Ok, let's say you are working on a news app.

 So, you have a ListView with some article titles.

 Then, when an article is clicked you have a TextView that replaces the
 ListView.

 What is the best way to do this?

 I'm thinking of having the ListView and TextView on top of each other
 in an AbsoluteLayout and showing/hiding as needed.

 Or, I can create two XML files and using setContentView as needed.

 Any ideas?

 --
 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



-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://solrpg.com/, http://www.youtube.com/user/revoltingx

-- 
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