[android-developers] MVP and Android Architecture sample

2016-07-21 Thread Wouter de Vos
Hi there

I'm trying to find a sensible way to implement MVP that can handle 
configuration changes and asynchronous requests. I discovered the Android 
architecture page on Github recently and I've been looking closely at this 
sample: 
https://github.com/googlesamples/android-architecture/tree/todo-mvp-loaders/. 
I like this sample because it makes use of loaders which are supposed to 
handle configuration changes and asynchronous data. I noticed that the 
sample uses a fragment for the view and passes that along to the presenter. 
>From what I understand about fragments, if the app goes into the background 
the fragment manager maintains the fragment and it wont be recreated when 
the app comes back into the foreground. However, if the activity is 
destroyed during a configuration change, then the fragment will need to be 
recreated. As far as I know, the only way to retain the fragment in a 
configuration change would be by using a headless fragment. Since the 
presenter has a reference to the fragment I suspect that there will be a 
memory leak in the presenter. From what I've learned the presenter needs to 
keep a weak reference to the fragment to avoid a memory leak. Am I 
completely wrong about this? I want to know how to avoid these memory leaks 
and if anyone could share their knowledge it would be greatly appreciated. 
Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/382e3876-c1da-4de8-bea7-b92c7a3fc599%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Android emulator too snow, unusable

2011-04-06 Thread wouter
Hi all,

This must have been posted many times before, but I'd like to add my
two cents...

I'm trying to develop an app for Android Honeycomb, but it is next to
impossible. I can't buy a device yet in Europe, and the emulator is
slow beyond usable. I'm using a quad-core 2 GHz machine with 8 GB's of
RAM and Ubuntu 10.10, and it takes more than 10 minutes to start, and
a click or gesture is about impossible to do on the emulator. Typing a
word in a textfield works with at most 5-7 characters per minute.

Is there any way to run code in a simulator instead of this hardware
emulator? Has anyone found a way develop, test and debug code with the
emulator?

With kind regards,

Wouter

-- 
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] Re: how to Play music from AudioTrack

2010-03-17 Thread Wouter
Hey,

i am also creating a media player for online radio. I have my online
streams in mp3 format and I also hear a gap between 2 files (i write
the stream to different files and play them, just like kavitha).
How can i convert the stream to ogg when I try to play it?

Can you give me any solutions on how you did this?

Thanks,

Wouter

On Feb 16, 1:03 pm, skink  wrote:
> On Feb 16, 12:20 pm, kavitha  wrote:
>
> > yes,,skink,
>
> > I tried playing ogg files.
>
> > ogg files give very less gap (almost inconsiderable)than mp3.
>
> > I need to convert and store into ogg format now.
>
> > how to convert from mp3 to ogg format?
>
> http://linux.die.net/man/1/oggenc

-- 
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] Background from PreferenceActivity is not applied to sub-PreferenceScreen

2010-01-28 Thread Wouter
Hi,

I am testing my application on a Nexus One and i have some problems.
My theme is Light and when an sub PreferenceScreen is displayed, the
window background becomes black instead of keeping the
PreferenceActivity's one.


...




What is the problem?

Wouter

You can find my code here:

http://pastie.org/798564

-- 
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] Re: Transparent Button

2009-12-31 Thread Wouter
use this as your background for your button

android:background="@android:color/transparent"

On Dec 31, 7:55 am, Fei Zhang  wrote:
> use a transparent image as background
>
> 2009/12/31 Sasikumar.S 
>
> > Hi,
>
> > How to make a button as transparent in android?...
>
> > --
> > Thanks & Regards
> > Sasikumar.S
>
> > --
> > 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] Strange behavior using alignParentBottom in a Relative Layout for a ListView item

2009-12-29 Thread Wouter
Does someone has a solution for this issue?

http://code.google.com/p/android/issues/detail?id=1394

Thanks,

Wouter

-- 
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] Android WebView touch event link

2009-12-23 Thread Wouter


Hey,

I have a webview with a banner and when I click on the banner there
should open a second webview that follows the link. How can I do that?
I have created the first WebView and it shows my banner but when I
click on it, it opens the link in the same WebView.

How can I catch any events in the WebView when I click on a link that
it should do something (with that link)? Just like
shouldStartLoadWithRequest in iPhone (http://developer.apple.com/
iphone/library/documentation/UIKit/Reference/UIWebViewDelegate
%5FProtocol/Reference/Reference.html#//apple%5Fref/occ/intfm/
UIWebViewDelegate/webView%3AshouldStartLoadWithRequest
%3AnavigationType:)

Thank you,

Wouter

-- 
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] ImageView and TextView float (left/right)

2009-12-21 Thread Wouter
Hey,

I am searching for a way to position my text around my imageview (so
like the css float left/right).
How can I do this in Android? I have used
android:layout_alignParentLeft="true" (to position my imageview left)
and android:layout_alignParentRight="true" for my textview but the
textview comes next to the imageView and doesn't continue underneath
the ImageView when I have a long text..

Anyone an idea?

Wouter

-- 
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] Re: Drag and Drop

2009-12-19 Thread Wouter
How can I create a list where I can rearrange list items with dragging
list rows to another row and so on (to change to order)?

Just like on the HTC Hero in the clocks app where you can rearrange
the order of clocks?

Wouter

On Dec 18, 11:08 pm, Business Talk 
wrote:
> Thanks Mark
>
> On Dec 18, 4:37 pm, Mark Murphy  wrote:
>
> > Business Talk wrote:
> > > is there any drag and drop support in android? Couldn't find any
>
> > Nothing really built in, though with touch events and such you could
> > create something that works for your app.
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > Android Training in US: 11-15 January 2010:http://onlc.com

-- 
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] Re: Button Bar

2009-12-12 Thread Wouter
There is a topic already about this
http://groups.google.com/group/android-developers/browse_thread/thread/96d617a9e11cedfc?hl=en

and there must be some kind of view for this. It is used in the Google
Maps application..

On Dec 10, 3:28 am, Julian Chu  wrote:
> Hi,
>
> A Button is a Clickable-Image.
>
> If I were you, I would draw 4 images and use ImageButton to apply those
> images.
>
> The four images are: the leftest, middle, rightest.
> the last image is for situation "Only one button at the bar".
>
> -Ju1ian
>
>
>
> On Thu, Dec 10, 2009 at 1:56 AM, Wouter  wrote:
> > Hey,
>
> > I'm developping an Android application for a TV Guide for the
> > Netherlands and Belgium.
> > I do this for a company who already has an iphone application for this
> > and I have to make the look the most as possible the same.
>
> > My question is how do I make something like this?
>
> >http://snapplr.com/q6cx
>
> > So 2 buttons next to each other but the middle has no rounded corners!
> > Do I have to get the source of Button from the android source and
> > adapt it myself? or how can I do this?
>
> > Thanks,
>
> > Wouter
>
> > --
> > 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
>
> --
> Julian Chu.  a.k.a. WalkingIce -- 會走路的冰塊http://walkingice.twbbs.org 只放拖鞋的鞋櫃

-- 
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] Re: Looking for "bar" of button toggles (c.f. Google Maps car/transit/walk directions button)

2009-12-09 Thread Wouter
I'm looking for this too! Have you found something already that can
makes such a view?

Wouter

On Nov 23, 8:46 pm, jean-guys  wrote:
> We are looking for a UI view that imitates the functionality of the
> Google Maps directions screen UI control where it allows the user to
> pick the type of directions allowed, either Car, Transit or Walking.
>
> The widgit is essentially three buttons laid out horizontally with
> rounded corners only on the left of the first and right of the thirdbutton.  
> The buttons collectively form a RadioGroup (i.e. multiple
> exclusion scope).
>
> I can't see a standard way to do this, although it seems like it would
> be a common widgit.  Is there some other standard way of presenting a
> multi-choice grouping in a horizontal layout as a "single" layout
> object.  Note that radios, checkboxes and ToggleButtons are not what
> we are looking for here.
>
> Any help appreciated, thanks!

-- 
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] Button Bar

2009-12-09 Thread Wouter
Hey,

I'm developping an Android application for a TV Guide for the
Netherlands and Belgium.
I do this for a company who already has an iphone application for this
and I have to make the look the most as possible the same.

My question is how do I make something like this?

http://snapplr.com/q6cx

So 2 buttons next to each other but the middle has no rounded corners!
Do I have to get the source of Button from the android source and
adapt it myself? or how can I do this?

Thanks,

Wouter

-- 
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] Re: Can other applications use the share function of "Facebook for Android"?

2009-12-04 Thread Wouter
All the other apps except of facebook and bloo (facebook) are working
with my EXTRA_TEXT.
Really sucks that this isn't working for facebook. And it's a lot of
work to make facebook client to post status update?

Wouter

On Dec 4, 5:38 pm, theSmith  wrote:
> Im using this
>       chooseIntent.setType("text/*");
>
> while this will cause the facebook app to show up (and bloo for that
> matter), the apps dont respond to the EXTRA_TEXT the way they should.
> Basicly the facebook app opens and tries to post, but fails.  Since I
> can't find any documentation for the facebook app's intents I'm stuck
> with a broken app at the moment.
>
> On Dec 4, 11:05 am, Wouter  wrote:
>
> > Ok I am using also the intentChooser like this
>
> >                                 Intent t = new Intent(Intent.ACTION_SEND);
> >                                 t.setType("text/plain");
> >                                 t.putExtra(Intent.EXTRA_TEXT, "test");
> >                 t.putExtra(Intent.EXTRA_SUBJECT,"found this great
> > trip");
> >                                 t.addCategory(Intent.CATEGORY_DEFAULT);
> >                                 Intent share = 
> > Intent.createChooser(t,"Share with others");
> >                                 startActivity(share);
>
> > It opens mail and messaging correcty with the text.
>
> > What do you mean with implement it this way?
>
> > On Dec 4, 4:51 pm, theSmith  wrote:
>
> > > Im not using intents here actually, its the intent chooser with a type
> > > of "text/*" that will display it in the chooser's menu.  But again it
> > > doesn't work correctly so you really have to reason to implement it
> > > this way.
>
> > > On Dec 4, 10:48 am, Wouter  wrote:
>
> > > > Could you tell me which intents you have used to share via facebook.
> > > > i'm also looking for this and share via twitter, ...
>
> > > > Thanks,
>
> > > > Wouter
>
> > > > On Nov 27, 7:43 am, theSmith  wrote:
>
> > > > > My application is able to detect thefacebookapp (if its installed)
> > > > > and will attempt toshareviafacebook.
> > > > > But thats as far as I've gotten.  The mobile.facebook.com site opens
> > > > > and tells me it couldn'tsharemy link.
>
> > > > > Ultimately this is theFacebookapps problem, as far as I know there
> > > > > is no documentation for its Intents and this is the limiting factor
> > > > > for me.
>
> > > > > -theSmith
>
> > > > > On Oct 28, 6:08 am, feeling3_4  wrote:
>
> > > > > > Hi, guys
>
> > > > > > "Facebookfor Android" is great, but I just wonder that whether my
> > > > > > application can use thesharefunction of it. Or, does the ""Facebook
> > > > > > for Android"" release some apis and let other applications use the
> > > > > > built in functions like "share" or "feed"?
>
> > > > > > Any advice is greatly appreciated. Thanks.

-- 
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] Re: Can other applications use the share function of "Facebook for Android"?

2009-12-04 Thread Wouter
Ok I am using also the intentChooser like this

Intent t = new Intent(Intent.ACTION_SEND);
t.setType("text/plain");
t.putExtra(Intent.EXTRA_TEXT, "test");
t.putExtra(Intent.EXTRA_SUBJECT,"found this great
trip");
t.addCategory(Intent.CATEGORY_DEFAULT);
Intent share = Intent.createChooser(t,"Share 
with others");
startActivity(share);

It opens mail and messaging correcty with the text.

What do you mean with implement it this way?

On Dec 4, 4:51 pm, theSmith  wrote:
> Im not using intents here actually, its the intent chooser with a type
> of "text/*" that will display it in the chooser's menu.  But again it
> doesn't work correctly so you really have to reason to implement it
> this way.
>
> On Dec 4, 10:48 am, Wouter  wrote:
>
> > Could you tell me which intents you have used to share via facebook.
> > i'm also looking for this and share via twitter, ...
>
> > Thanks,
>
> > Wouter
>
> > On Nov 27, 7:43 am, theSmith  wrote:
>
> > > My application is able to detect thefacebookapp (if its installed)
> > > and will attempt toshareviafacebook.
> > > But thats as far as I've gotten.  The mobile.facebook.com site opens
> > > and tells me it couldn'tsharemy link.
>
> > > Ultimately this is theFacebookapps problem, as far as I know there
> > > is no documentation for its Intents and this is the limiting factor
> > > for me.
>
> > > -theSmith
>
> > > On Oct 28, 6:08 am, feeling3_4  wrote:
>
> > > > Hi, guys
>
> > > > "Facebookfor Android" is great, but I just wonder that whether my
> > > > application can use thesharefunction of it. Or, does the ""Facebook
> > > > for Android"" release some apis and let other applications use the
> > > > built in functions like "share" or "feed"?
>
> > > > Any advice is greatly appreciated. Thanks.

-- 
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] Re: Can other applications use the share function of "Facebook for Android"?

2009-12-04 Thread Wouter
Could you tell me which intents you have used to share via facebook.
i'm also looking for this and share via twitter, ...

Thanks,

Wouter

On Nov 27, 7:43 am, theSmith  wrote:
> My application is able to detect thefacebookapp (if its installed)
> and will attempt toshareviafacebook.
> But thats as far as I've gotten.  The mobile.facebook.com site opens
> and tells me it couldn'tsharemy link.
>
> Ultimately this is theFacebookapps problem, as far as I know there
> is no documentation for its Intents and this is the limiting factor
> for me.
>
> -theSmith
>
> On Oct 28, 6:08 am, feeling3_4  wrote:
>
> > Hi, guys
>
> > "Facebookfor Android" is great, but I just wonder that whether my
> > application can use thesharefunction of it. Or, does the ""Facebook
> > for Android"" release some apis and let other applications use the
> > built in functions like "share" or "feed"?
>
> > Any advice is greatly appreciated. Thanks.

-- 
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] Re: Save variable and ArrayList of object

2009-12-01 Thread Wouter
I'm looking for the same, check my topic

http://groups.google.com/group/android-developers/browse_thread/thread/930bdd672bf0ff8b/6c65bb164d3f36d3?hl=en#6c65bb164d3f36d3

Hope we can find what we are looking for

On Dec 1, 5:22 pm, Charles  wrote:
> Hello,
>
> I created an application with loging and an arraylist to fill a
> ListView.
>
> If i am calling or i need to check my mail, sometimes i lost the
> context of my application (variables and the listview !)
>
> It is a little complex to save arraylist in SharedPreferences and i am
> not an expert in SQLite.
>
> Do you know a solution to keep persistent my data (variables and the
> arraylist) during the use of my application?

-- 
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] Re: offline access to data

2009-11-30 Thread Wouter
No sorry I don't use a database. I save the data in a textfile.. I
have tried to save it in a database but
I'm breaking the heirarchy rather than using it in my advantage, by
creating tables for every kind of object.

Using a database isn't a option for me, any other suggestions?

Wouter

On Nov 30, 5:33 pm, String  wrote:
> On Nov 30, 4:16 pm, Wouter  wrote:
>
> > Isn't there a better way to do this? I cannot save this file
> > in a database because the structure is to complex.
>
> Don't save the text file in a database, save the data. This is exactly
> the sort of problem that databases exist for. I doubt very much that
> the data is too complex for SQL, and that accessing a well-designed
> set of table would be slower than parsing a text file.
>
> String

-- 
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] offline access to data

2009-11-30 Thread Wouter
Hey,

I am developing an application with TripIt integration and I make a
call to their API and I get all my data in JSON format and save it in
an object ListTripResponse. This object contains all the data I need
over all the application.

What I do now, I write this object to a txt file (i serialize my
object and save it as a file with ObjectOutputStream) and in every
activity I read this file. But this file is pretty long and it takes a
while to read it. And i have to use and read this object in every
activity! Isn't there a better way to do this? I cannot save this file
in a database because the structure is to complex.

Does anyone has a suggestion?

Wouter

-- 
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] Re: viewflipper deck?

2009-11-15 Thread Wouter
Ok I have changed the way i want to make this:

I want to make this like the homescreen. So when you fling, the view
follows your finger. SO when you are dragging to left, you see already
the next view dragging with your finger gesture.
Now with the viewflipper it only makes a transition to the next view
after you make a full swipe to left or right.

How can this be done? I have looked in the android source code (app
Launcher) but this is much to complicated for me!

Thank you,

Wouter

On Nov 14, 4:18 pm, Wouter  wrote:
> Hey,
>
> How can i make something like this:
>
> http://mippin.com/buzzdeck
>
> I want to make a deck of itinerary items (for my application TripIt).
> So a new screen per itinerary..
>
> I tried to make this with a viewflipper but it shows the full view on
> the screen and i cannot see the other "decks" on the left or right
> side?
>
> Has someone made this before or has tips to make this?
>
> Thank you so much,
>
> Wouter

-- 
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] viewflipper deck?

2009-11-14 Thread Wouter
Hey,

How can i make something like this:

http://mippin.com/buzzdeck

I want to make a deck of itinerary items (for my application TripIt).
So a new screen per itinerary..

I tried to make this with a viewflipper but it shows the full view on
the screen and i cannot see the other "decks" on the left or right
side?

Has someone made this before or has tips to make this?

Thank you so much,

Wouter

-- 
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] tablelayout rounded corners

2009-11-09 Thread Wouter
Hey,

I want to make something like this:

http://snapplr.com/0g79

So specially the TableLayout (I think they are using that) with
rounded corners!
How can I make that?

Wouter

-- 
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] change the height of a view on runtime

2009-11-08 Thread Wouter Vegter
Hello,

I have defined a view with id "view01" in my xml layout file. I want
to change the height of this view on runtime. At first I wanted to do
it with a single click on the view, but I wasn't able to do that
properly, hence the onClickListener interface. After that i tried to
change the height of the view by hard coding. I didn't succeed. I have
searched quite a while on internet but so far I haven't found the
right solution. Can please someone help me out?

My .java and .xml file are displayed below.

Regards,

Wouter


***.java file
package test2.main;


import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;


public class test2 extends Activity implements OnClickListener  {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

View v1 = (View) findViewById(R.id.view01);
v1.setOnClickListener(this);
v1.setMinimumHeight(160);
LinearLayout ll = (LinearLayout) findViewById
(R.id.linearlayout);
ll.requestLayout();
v1.requestLayout();


}

public void onClick(View arg0) {
if (arg0.getMeasuredHeight() == 80)
{
arg0.setMinimumHeight(160);
} else
{
arg0.setMinimumHeight(80);
}
arg0.requestLayout();
}
}


**.xml file

http://schemas.android.com/apk/res/
android"android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:id="@+id/linearlayout">
  

  
  


  
  




-- 
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] xsd to java simpleType

2009-10-31 Thread Wouter
Hey,

I am developing an Android application with TripIt integration but I
don't know how to make a java class of this:

 
   
 
   
 


And AirportCode is a type that is used in AirObject (for example)

 
   
 
 
 
 

so it has to be private AirportCode start_airport_code.. But what do I
have to write in the AirportCode.java file?

Thank you for your help!

-- 
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] Re: Priced apps - is there a wa

2009-10-30 Thread Wouter

I have this problem too! I live in belgium and cant sell my
applications..

How can we do this?

On Oct 30, 6:28 pm, fhucho  wrote:
> Hi,
> I just finished a chess game and have found out that I can't sell it
> on Android Market because my country is not supported (Czech
> Republic). Is there a way to circumvent this restriction (e.g. pretend
> that I am from US in the registration form)? What would you advise me
> if I want to earn some money on my app? I was thinking about giving it
> for free now and when priced apps are supported in CR start to charge
> for it.
--~--~-~--~~~---~--~~
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] Re: Tripit Oauth

2009-10-29 Thread Wouter

I'm sorry to hear this all.. I search a lot on the net and I try a lot
to find it by myself but this isnt always successful.
This website here is my last place to ask when I don't know how to
solve it.

Now I have succedeed to solve this and I have an application where I
can receive the oauth_token and the authorized access token.

But now I want to access protected resources and when I try to do this
i get a 404 error not found while the url is valid and working.

I use this:

OAuthClient client = getOAuthClient();

OAuthMessage responseMsg = null;

...

responseMsg = client.invoke(access, "GET", baseUrl, null);

10-29 18:52:21.141: ERROR/AndroidRuntime(749): Caused by:
net.oauth.OAuthProblemException: HTTP/1.1 404 Not Found

And yes I have tried a lot myself but I don't succeed to access
anything..

Wouter


On Oct 27, 4:30 pm, "nEx.Software" 
wrote:
> I'll be honest, I have provided you with source code in the past (for
> other stuff) and you struggled with that and ended up asking for yet
> more source code. While I don't mind sharing it in most cases, I do
> grow weary of constantly providing my source to people who, if they
> simply put in the work (in this case it isn't that much), would be
> able to figure it out just like I had to do.
>
> Besides, in looking at the documentation for the TripIt API, my
> implementation for Twitter will not help.
>
> On Oct 27, 3:50 am, Wouter  wrote:
>
> > Is it possible to post your source code for your application with
> > Twitter Oauth so I can make my application work?
>
> > Thank you,
>
> > Wouter
>
> > On 26 okt, 22:00, Wouter  wrote:
>
> > > Hey,
>
> > > I had followed this blog post also but it doesnt works for me..
>
> > > I also have this problem:
> > > when I get to the following line: provider.retrieveAccessToken
> > > (verifier); I receive this
> > > exception:"oauth.signpost.exception.OAuthExpectationFailedException:
> > > Authorized request token or token secret not set. Did you retrieve an
> > > authorized request token before?"
>
> > > Do you know what I can do to solve this problem? Thank you.
>
> > > On Oct 26, 4:53 pm, "nEx.Software" 
> > > wrote:
>
> > > > I have successfully used signpost in Android for Twitter's OAuth API.
> > > > If I remember correctly, it is actually quite trivial. This blog post
> > > > explains how to do it with Twitter. I had commented on there that I
> > > > was not able to get it to work. Found out it was something stupid on
> > > > my part.
>
> > > >http://dev.bostone.us/2009/07/16/android-oauth-twitter-updates/#awp::...
>
> > > > On Oct 26, 1:48 pm, Wouter  wrote:
>
> > > > > Hey,
>
> > > > > I am working on a new project with TripIt integration. Tripit has an
> > > > > api and has Oauth authentication.
> > > > > I have tested much with oauth-signpost but I am not able to receive an
> > > > > access token.
>
> > > > > Does someone has a good example for oauth (signpost) that works good
> > > > > with Android?
>
> > > > > Thank you,
>
> > > > > Wouter
--~--~-~--~~~---~--~~
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] Re: Tripit Oauth

2009-10-27 Thread Wouter

Is it possible to post your source code for your application with
Twitter Oauth so I can make my application work?

Thank you,

Wouter

On 26 okt, 22:00, Wouter  wrote:
> Hey,
>
> I had followed this blog post also but it doesnt works for me..
>
> I also have this problem:
> when I get to the following line: provider.retrieveAccessToken
> (verifier); I receive this
> exception:"oauth.signpost.exception.OAuthExpectationFailedException:
> Authorized request token or token secret not set. Did you retrieve an
> authorized request token before?"
>
> Do you know what I can do to solve this problem? Thank you.
>
> On Oct 26, 4:53 pm, "nEx.Software" 
> wrote:
>
> > I have successfully used signpost in Android for Twitter's OAuth API.
> > If I remember correctly, it is actually quite trivial. This blog post
> > explains how to do it with Twitter. I had commented on there that I
> > was not able to get it to work. Found out it was something stupid on
> > my part.
>
> >http://dev.bostone.us/2009/07/16/android-oauth-twitter-updates/#awp::...
>
> > On Oct 26, 1:48 pm, Wouter  wrote:
>
> > > Hey,
>
> > > I am working on a new project with TripIt integration. Tripit has an
> > > api and has Oauth authentication.
> > > I have tested much with oauth-signpost but I am not able to receive an
> > > access token.
>
> > > Does someone has a good example for oauth (signpost) that works good
> > > with Android?
>
> > > Thank you,
>
> > > Wouter
--~--~-~--~~~---~--~~
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] Re: Tripit Oauth

2009-10-26 Thread Wouter

Hey,

I had followed this blog post also but it doesnt works for me..

I also have this problem:
when I get to the following line: provider.retrieveAccessToken
(verifier); I receive this
exception:"oauth.signpost.exception.OAuthExpectationFailedException:
Authorized request token or token secret not set. Did you retrieve an
authorized request token before?"

Do you know what I can do to solve this problem? Thank you.

On Oct 26, 4:53 pm, "nEx.Software" 
wrote:
> I have successfully used signpost in Android for Twitter's OAuth API.
> If I remember correctly, it is actually quite trivial. This blog post
> explains how to do it with Twitter. I had commented on there that I
> was not able to get it to work. Found out it was something stupid on
> my part.
>
> http://dev.bostone.us/2009/07/16/android-oauth-twitter-updates/#awp::...
>
> On Oct 26, 1:48 pm, Wouter  wrote:
>
>
>
> > Hey,
>
> > I am working on a new project with TripIt integration. Tripit has an
> > api and has Oauth authentication.
> > I have tested much with oauth-signpost but I am not able to receive an
> > access token.
>
> > Does someone has a good example for oauth (signpost) that works good
> > with Android?
>
> > Thank you,
>
> > Wouter
--~--~-~--~~~---~--~~
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] Tripit Oauth

2009-10-26 Thread Wouter

Hey,

I am working on a new project with TripIt integration. Tripit has an
api and has Oauth authentication.
I have tested much with oauth-signpost but I am not able to receive an
access token.

Does someone has a good example for oauth (signpost) that works good
with Android?

Thank you,

Wouter
--~--~-~--~~~---~--~~
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] Re: Slow time zone name loading

2009-10-25 Thread Wouter

Ok I am working on the emulator now and it goes fast (so users with
1.5 has to wait longer).
But now I have this screen:

http://snapplr.com/2p50

How can I enable links in this text? So links in the tweet (username
or website link). And also there is a problem with showing quotes (it
doesnt show " " but qoutes) and --> (it shows -->).
How can I do this? Do you have an example for that?

Thank you,

Wouter

On 24 okt, 16:24, Wouter  wrote:
> Here is a new log file:
>
> 10-24 17:21:58.300: INFO/Resources(14467): Loaded time zone names for
> en_US in 2167ms.
> 10-24 17:21:58.310: INFO/System.out(14467): MNM Redactie:Een nieuwe #1
> in de MNM50! RT @jaspererkens: op 1 in de MNM50! // Om preciezer te
> zijn: 3. Ke$ha 2. David Guetta
> 10-24 17:22:00.260: INFO/Resources(14467): Loaded time zone names for
> en_US in 1932ms.
> 10-24 17:22:00.260: INFO/System.out(14467): MNM Redactie:Fanny is
> vroeg wakker, en haar honden ook...http://www.mnm.be/artikel/159592
> 10-24 17:22:02.030: INFO/Resources(14467): Loaded time zone names for
> en_US in 1758ms.
> 10-24 17:22:02.040: INFO/System.out(14467): appletips.nl:Nieuwe post:
> 10.6 Het “iPhone” label in OS X Adresboekhttp://bit.ly/4sjL0
> 10-24 17:22:03.930: INFO/Resources(14467): Loaded time zone names for
> en_US in 1866ms.
> 10-24 17:22:03.930: INFO/System.out(14467): appletips.nl:Nieuwe post:
> “Half-star rating” activeren in iTuneshttp://bit.ly/1Py6g7
>
> So for every post it loads the time zones.
>
> Same with JTwitter or Twitter4j
>
> Really hate this.. Don't know what I am doing wrong..
>
> On 24 okt, 17:14, Mark Murphy  wrote:
>
> > Wouter wrote:
> > > I had used this first, but had this issue and I tried another API. But
> > > with the same result. Don't you have this problem with 1.5?
>
> > I have had no complaints related to this, if that's what you mean. I
> > have run into the time zone load issue before, but if it's affecting
> > JTwitter, I had not noticed, and nobody commented.
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > _Android Programming Tutorials_ Version 1.0 Available!
--~--~-~--~~~---~--~~
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] Re: Slow time zone name loading

2009-10-24 Thread Wouter

Here is a new log file:

10-24 17:21:58.300: INFO/Resources(14467): Loaded time zone names for
en_US in 2167ms.
10-24 17:21:58.310: INFO/System.out(14467): MNM Redactie:Een nieuwe #1
in de MNM50! RT @jaspererkens: op 1 in de MNM50! // Om preciezer te
zijn: 3. Ke$ha 2. David Guetta
10-24 17:22:00.260: INFO/Resources(14467): Loaded time zone names for
en_US in 1932ms.
10-24 17:22:00.260: INFO/System.out(14467): MNM Redactie:Fanny is
vroeg wakker, en haar honden ook... http://www.mnm.be/artikel/159592
10-24 17:22:02.030: INFO/Resources(14467): Loaded time zone names for
en_US in 1758ms.
10-24 17:22:02.040: INFO/System.out(14467): appletips.nl:Nieuwe post:
10.6 Het “iPhone” label in OS X Adresboek http://bit.ly/4sjL0
10-24 17:22:03.930: INFO/Resources(14467): Loaded time zone names for
en_US in 1866ms.
10-24 17:22:03.930: INFO/System.out(14467): appletips.nl:Nieuwe post:
“Half-star rating” activeren in iTunes http://bit.ly/1Py6g7

So for every post it loads the time zones.

Same with JTwitter or Twitter4j

Really hate this.. Don't know what I am doing wrong..

On 24 okt, 17:14, Mark Murphy  wrote:
> Wouter wrote:
> > I had used this first, but had this issue and I tried another API. But
> > with the same result. Don't you have this problem with 1.5?
>
> I have had no complaints related to this, if that's what you mean. I
> have run into the time zone load issue before, but if it's affecting
> JTwitter, I had not noticed, and nobody commented.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 1.0 Available!
--~--~-~--~~~---~--~~
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] Re: Slow time zone name loading

2009-10-24 Thread Wouter



On Oct 24, 4:59 pm, Mark Murphy  wrote:
> Wouter wrote:
> > What is the problem for 1.5 and why does this works for 1.6?
>
> See the issue I linked to in the previous message.

So it is only fixed in 1.6 and users with 1.5 have to wait longer? :(

>
> > Are do you have another API for twitter I can use or some examples? I
> > have used your thumbnailadapter (as example for Twitter).
>
> Well, I use JTwitter in my books.

I had used this first, but had this issue and I tried another API. But
with the same result. Don't you have this problem with 1.5?
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Training in Germany, 18-22 January 2010:http://bignerdranch.com
--~--~-~--~~~---~--~~
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] Re: Slow time zone name loading

2009-10-24 Thread Wouter

I am only using the twitter4j api and I never use SimpleDateFormat
myself.

And I have this problem also when I use another api for twitter
(jtwitter).

This is my code (a part of):
client=new Twitter(user, password);

Query query = new Query("surrogates");
QueryResult result;
try {
result = client.search(query);

for (Tweet tweet : result.getTweets()) {
model.add(new 
TimelineEntry(tweet.getFromUser(),
tweet.getCreatedAt().toString(), tweet.getText(),
tweet.getProfileImageUrl()));
}
} catch (TwitterException e) {
e.printStackTrace();
}

What is the problem for 1.5 and why does this works for 1.6?

Are do you have another API for twitter I can use or some examples? I
have used your thumbnailadapter (as example for Twitter).

Wouter

On Oct 24, 4:46 pm, Mark Murphy  wrote:
> Wouter wrote:
> > I am using the twitter4j api to get tweets but it takes to long to get
> > the result.
> > When I see at the log files i see this:
>
> > 10-24 16:29:19.300: INFO/Resources(12924): Loaded time zone names for
> > en_US in 2265ms.
>
> > And that per tweet. So it takes a long time before it loads this.
>
> AFAIK, it should only do this once per process in Android 1.5.
>
> > How can this be fixed for 1.5?
>
> Directly, it can't. The underlying problem is that you are trying to
> format (or perhaps parse) a date and using stuff like SimpleDateFormat.
> That is what triggers the time-zone data load.
>
> Read more here:
>
> http://code.google.com/p/android/issues/detail?id=3147
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Training in Germany, 18-22 January 2010:http://bignerdranch.com
--~--~-~--~~~---~--~~
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] Slow time zone name loading

2009-10-24 Thread Wouter

Hey,

I am using the twitter4j api to get tweets but it takes to long to get
the result.
When I see at the log files i see this:

10-24 16:29:19.300: INFO/Resources(12924): Loaded time zone names for
en_US in 2265ms.

And that per tweet. So it takes a long time before it loads this.

I have tested this on my Htc Hero (1.5) and it takes long and on the
emulator with 1.6 it goes fast and normal.
How can this be fixed for 1.5? It takes too long to load this all.

Thank you,

Wouter

--~--~-~--~~~---~--~~
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] Re: database question

2009-10-23 Thread Wouter

Nice thank you so much Mark!

On Oct 23, 7:56 pm, Mark Murphy  wrote:
> Wouter wrote:
> > Hey Mark,
>
> > Thanks for the answer. So how can i backup that database file? I now
> > have a file tvgids.db on my sdcard (so path is /sdcard/tvgids.db)
>
> > How can I make a copy of that?
>
> Java file I/O.
>
> http://exampledepot.com/egs/java.io/CopyFile.html
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android 1.6 Programming Books:http://commonsware.com/books
--~--~-~--~~~---~--~~
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] Re: database question

2009-10-23 Thread Wouter

Hey Mark,

Thanks for the answer. So how can i backup that database file? I now
have a file tvgids.db on my sdcard (so path is /sdcard/tvgids.db)

How can I make a copy of that?

Wouter

On 23 okt, 19:05, Mark Murphy  wrote:
> Wouter wrote:
> >> Now I can do several updates to the tvchannels table and i want to
> >> make a backup of this table to a lokal database file. How can i do
> >> that?
>
> Copy the database file to a backup file. Either you already know your
> path to your database, or you can use getDatabasePath() to find that path.
>
> To be safe, I recommend you have all SQLite* objects and Cursors on that
> database closed before making the file copy.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android 1.6 Programming Books:http://commonsware.com/books
--~--~-~--~~~---~--~~
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] Re: database question

2009-10-23 Thread Wouter

Can someone help me?

On Oct 20, 5:36 pm, Wouter  wrote:
> Hey,
>
> I am working on a project for a belgium Tv Guide.
> Now I download a database (.db) file from a server to the sdcard to
> work with.
> In this database are 2 tabels, tvchannels and tvprograms.
> Now I can do several updates to the tvchannels table and i want to
> make a backup of this table to a lokal database file. How can i do
> that? I want to do this because I have to download a  new database
> file every daye from the server and the channels that are choses are
> saved in the tvchannels database. I want to backup this database table
> and when the new database file (tvgids.db) is downloaded I want to
> replace the tvchannels database (from downloaded database file) with
> the backup from tvchannels..
>
> Anyone has an idea?
>
> Thank you,
>
> Wouter
--~--~-~--~~~---~--~~
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] Re: Showing ellipsis in a TextView?

2009-10-20 Thread Wouter

Yes I have searched this also before and this also works for single
line text so i think you have to use it this way..

Wouter

On Oct 20, 6:23 pm, Mark Wyszomierski  wrote:
> Hi Wouter,
>
> Yes that does work for single line text, but not for multiline -
> checking from other posts here it seems like the ellipsis does not
> handle multiline text correctly?
>
> Thanks
>
> On Oct 20, 12:06 pm, Wouter  wrote:
>
> > I use this in my layout xml file:
>
> > android:ellipsize="end"
> > android:singleLine="true"
>
> > And this works perfectly for text on 1 line..
>
> > On Oct 20, 5:42 pm, Mark Wyszomierski  wrote:
>
> > > Hi,
>
> > > I have a normal TextView which has multiple lines. I set its max
> > > number of lines to 3. I'd like it to show an ellipsis at the end if
> > > the text is too long:
>
> > >   TextView tv = new TextView(context);
> > >   tv.setLines(tv);
> > >   tv.setText("some really long text...");
>
> > > I tried the set ellipsis calls but it doesn't seem to do anything -
> > > the text appears the same way. How do we get this to work?
>
> > > Thanks
--~--~-~--~~~---~--~~
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] Re: Showing ellipsis in a TextView?

2009-10-20 Thread Wouter

I use this in my layout xml file:

android:ellipsize="end"
android:singleLine="true"

And this works perfectly for text on 1 line..

On Oct 20, 5:42 pm, Mark Wyszomierski  wrote:
> Hi,
>
> I have a normal TextView which has multiple lines. I set its max
> number of lines to 3. I'd like it to show an ellipsis at the end if
> the text is too long:
>
>   TextView tv = new TextView(context);
>   tv.setLines(tv);
>   tv.setText("some really long text...");
>
> I tried the set ellipsis calls but it doesn't seem to do anything -
> the text appears the same way. How do we get this to work?
>
> Thanks
--~--~-~--~~~---~--~~
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] database question

2009-10-20 Thread Wouter

Hey,

I am working on a project for a belgium Tv Guide.
Now I download a database (.db) file from a server to the sdcard to
work with.
In this database are 2 tabels, tvchannels and tvprograms.
Now I can do several updates to the tvchannels table and i want to
make a backup of this table to a lokal database file. How can i do
that? I want to do this because I have to download a  new database
file every daye from the server and the channels that are choses are
saved in the tvchannels database. I want to backup this database table
and when the new database file (tvgids.db) is downloaded I want to
replace the tvchannels database (from downloaded database file) with
the backup from tvchannels..

Anyone has an idea?

Thank you,

Wouter
--~--~-~--~~~---~--~~
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] Re: resource with name from numbers

2009-10-14 Thread Wouter

isnt there a way to allow images with numbers as filename?

On 14 okt, 01:38, Xavier Ducrohet  wrote:
> The problem is that each of those resources will become a class field in
> .R.drawable (without the extension)
>
> "1" is not a valid java class field.
>
> Xav
>
>
>
> On Tue, Oct 13, 2009 at 10:49 AM, Wouter  wrote:
>
> > Hey,
>
> > I had imported several .png files with names like 1.png, 2.png untill
> > 59.png in my Android Project..
>
> > But it gives this error:
>
> > Description     Resource        Path    Location        Type
> > Syntax error on token "48", invalid VariableDeclaratorId        R.java  /
> > TVGidsBelgie/gen/com/woutergo/tvgids    line 14 Java Problem
>
> > How can i solve this?
>
> > Wouter
>
> --
> Xavier Ducrohet
> Android SDK Tech Lead
> Google Inc.
--~--~-~--~~~---~--~~
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] resource with name from numbers

2009-10-13 Thread Wouter

Hey,

I had imported several .png files with names like 1.png, 2.png untill
59.png in my Android Project..

But it gives this error:

Description ResourcePathLocationType
Syntax error on token "48", invalid VariableDeclaratorIdR.java  /
TVGidsBelgie/gen/com/woutergo/tvgidsline 14 Java Problem

How can i solve this?

Wouter


--~--~-~--~~~---~--~~
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] Re: rename column sqlite database

2009-10-12 Thread Wouter

It is an sqlite database but don't now why it has no _id but id (for
iPhone? )

Ok i will try your sample code! Thanks, Wouter

On 12 okt, 17:23, Marco Nelissen  wrote:
> On Mon, Oct 12, 2009 at 8:12 AM, Wouter  wrote:
>
> > Hey,
>
> > I have a database that I download external and save on my sdcard.
> > But this database is also used for an iPhone app and has a column id
> > and not _id (sqlite uses _id).
> > How can i rename this column to _id?
>
> So this is not a sqlite database? What does it matter what the column
> is named then, if you won't be able to access it with sqlite anyway?
> In any case, sqlite doesn't support renaming columns, but you can
> usually do things like that with something like "create table foo as
> select id as _id, a as b, c as d from bar" to import all the data in
> to another table with exactly those columns and names you want.
--~--~-~--~~~---~--~~
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] rename column sqlite database

2009-10-12 Thread Wouter

Hey,

I have a database that I download external and save on my sdcard.
But this database is also used for an iPhone app and has a column id
and not _id (sqlite uses _id).
How can i rename this column to _id?

Thank you,

Wouter
--~--~-~--~~~---~--~~
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] Re: listview header

2009-10-11 Thread Wouter

When i use this method i have all my headers at the top of my list and
i want to show header - list -header- list..

On Oct 11, 11:47 am, Getto  wrote:
> Did you try addHeaderView method?
>
> http://developer.android.com/reference/android/widget/ListView.html#a...)
>
> .g
>
> On Oct 10, 2:12 pm, Wouter  wrote:
>
> > Hey,
>
> > What is the easiest way to add headers to a listview (and my list has
> > multiple adapters (sections) so I need to show multiple headers for my
> > list!
>
> > Thank you,
>
> > Wouter
--~--~-~--~~~---~--~~
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] Re: External Database Connectivity

2009-10-11 Thread Wouter

Hey,

I want to do the same.. I have an external sqlite database file at the
internet and i connect with the database with HttpClient.
But how can i save this database (http://... database.db) in the
android filesystem and work with this file in my application?

Wouter

On Oct 3, 5:43 pm, shobhit kasliwal 
wrote:
> One solution is you can create a webservice which will do everythign for
> you.I am also working on the same application and I am getting data from
> remote Sql server using the webservice.
>
> On Fri, Oct 2, 2009 at 6:42 PM, sandreev  wrote:
>
> > Hi All,
>
> > I am working on an app that will need to connect to an external
> > database and pull certain columns.
> > I am looking for some help in opening a connection to the database.
> > In another words, something like ODBC or JDBC in web development.
>
> > Thank you in advance,
> > Sandreev.
>
> --
> Shobhit Kasliwal
> Application Developer Intern
> Liventus Designs
> 3400 Dundee Rd Northbrook IL 60062
> skasli...@liventus.com
> office: 847-291-1395 ext. 192
> Cell: (309) 826 4709
>
> Stephen 
> Leacock<http://www.brainyquote.com/quotes/authors/s/stephen_leacock.html>
> - "I detest life-insurance agents: they always argue that I shall some
> day
> die, which is not so."
--~--~-~--~~~---~--~~
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] Re: How to download a read only sqlite database at runtime

2009-10-11 Thread Wouter

Hey,

I am having the same question.
I have a .db file on the internet and i can download this file but I
want to save it (as a file) so i can work with this sqlite database
file!

How can i create a file like this?

Thanks,

Wouter

On Aug 14, 2:23 am, yao chen  wrote:
> On Fri, Aug 14, 2009 at 7:59 AM, trev  wrote:
>
> > My application needs to download a reasonably sized SQLite database at
> > runtime, depending on the location of the user.  On a remote server I
> > will have many databases for various regions around the globe and
> > would like to download the database file, but can't quite work out
> > what steps are required.  It doesn't seem that I can open a database
> > file for writing to directly.
>
> You can write it as common file by using file operation APIs.
>
>
--~--~-~--~~~---~--~~
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] Re: listview header

2009-10-10 Thread Wouter

There is no problem with the MergeAdapter, I had the same issue in
1.5.

I have tried everything now but nothing works for me :s

On 10 okt, 15:58, Mark Murphy  wrote:
> Wouter wrote:
> > I had uses the MergeAdapter with this code:
>
> >    public void retrieveVideotheek()
> >     {
> >            try {
> >                    HashMap response = (HashMap > Object>)
> > client.call("film.retrieveTv", sessionKey);
>
> >                    Iterator it = response.entrySet().iterator();
>
> >                while (it.hasNext()) {
> >                    cinema = new ArrayList();
> >                    Map.Entry pairs = (Map.Entry)it.next();
> >                    Object[] cinemaFilms = (Object[])pairs.getValue();
> >                    FilmDetail cinemaMovie = new FilmDetail();
>
> >                    for (int i=0; i >                    {
> >                    cinemaMovie = new FilmDetail();
> >                    Map m = (Map) cinemaFilms[i];
> >                    cinemaMovie.setTitle(m.get("title").toString());
> >                        .
> >                    cinema.add(cinemaMovie);
> >                    }
>
> >                    String datum = pairs.getKey().toString();
> >                    long unixTime = Long.parseLong(datum);
> >                    long timeStamp = unixTime * 1000;
> >                    java.util.Date date = new Date(timeStamp);
> >                    SimpleDateFormat formatter = new 
> > SimpleDateFormat("EE,
> > HH:mm 'uur'");
> >                    String parsed = formatter.format(date);
>
> >                    System.out.println("DATUM: " + parsed);
>
> >                    LayoutInflater inflater = (LayoutInflater)
> > this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
> >                    View filmLayout = inflater.inflate(R.layout.list_header,
> > null);
> >                    TextView headerTxt = (TextView)filmLayout.findViewById
> > (R.id.list_header_title);
> >                    headerTxt.setText(parsed);
>
> >                    mergeAdapter.addView(headerTxt);
> >                    mergeAdapter.addAdapter(new cinemaAdapter(this,
> > R.layout.cinema_row, cinema));
>
> >                    //adapter.addSection(parsed, new cinemaAdapter(this,
> > R.layout.cinema_row, cinema));
>
> >                }
>
> > and this is the response:
>
> > {1255207800=[Ljava.lang.Object;@43780378, 1255199100=
> > [Ljava.lang.Object;@43824bb8, 1255204800=[Ljava.lang.Object;@4381fd38,
> > 1255212600=[Ljava.lang.Object;@43822ff0, 1255169700=
> > [Ljava.lang.Object;@438289d8, 1255194000=[Ljava.lang.Object;@43796e08,
> > 1255189800=[Ljava.lang.Object;@43819d98, 1255197600=
> > [Ljava.lang.Object;@43824b18, 1255183500=[Ljava.lang.Object;@438147b8,
> > 1255181400=[Ljava.lang.Object;@43859b58, 1255206000=
> > [Ljava.lang.Object;@438189e0, 1255207500=[Ljava.lang.Object;@43790030,
> > 1255212000=[Ljava.lang.Object;@43788908, 1255216500=
> > [Ljava.lang.Object;@43823570}
>
> > So for every key i make a new header with the corresponding Movies
> > under this header.
>
> > When the listActivity loads it shows it very well but when i scroll
> > down and up it shows me this list like this:
>
> >http://snapplr.com/stkn
>
> > What is the problem?
>
> Off the top of my head, I have no idea.
>
> >                    mergeAdapter.addView(headerTxt);
> >                    mergeAdapter.addAdapter(new cinemaAdapter(this,
> > R.layout.cinema_row, cinema));
>
> That much seems correct. The rest is your business logic which I only
> sorta follow.
>
> I have not tested MergeAdapter on Android 1.6 (part of my chores for
> this weekend), so there is a chance it needs updating.
>
> Try the demo activity that ships with MergeAdapter and see if it behaves
> properly.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Need Android talent? Ask on HADO!http://wiki.andmob.org/hado
--~--~-~--~~~---~--~~
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] Re: listview header

2009-10-10 Thread Wouter

I had uses the MergeAdapter with this code:

public void retrieveVideotheek()
{
try {
HashMap response = (HashMap)
client.call("film.retrieveTv", sessionKey);

Iterator it = response.entrySet().iterator();

while (it.hasNext()) {
cinema = new ArrayList();
Map.Entry pairs = (Map.Entry)it.next();
Object[] cinemaFilms = (Object[])pairs.getValue();
FilmDetail cinemaMovie = new FilmDetail();

for (int i=0; ihttp://snapplr.com/stkn

What is the problem?

Wouter


On Oct 10, 2:54 pm, Wouter  wrote:
> Hey Mark,
>
> Yes I am using the SeperatedListAdapter from Jeff Sharkey, but I will
> take a look at your SectionedAdapter.
> Can I use it in my project?
>
> Wouter
>
> On Oct 10, 2:42 pm, Mark Murphy  wrote:
>
> > Wouter wrote:
> > > What is the easiest way to add headers to a listview (and my list has
> > > multiple adapters (sections) so I need to show multiple headers for my
> > > list!
>
> > I have a MergeAdapter here that can serve that role:
>
> >http://github.com/commonsguy/cwac-merge
>
> > I have a SectionedAdapter here that can serve that role, but it is GPLv3
> > rather than Apache License 2.0:
>
> >http://github.com/commonsguy/cw-advandroid/tree/master/ListView/Secti...
>
> > The reason that is GPLv3 is because it is derived from Jeff Sharkey's
> > original sectioned list code:
>
> >http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-...
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > Need Android talent? Ask on HADO!http://wiki.andmob.org/hado
--~--~-~--~~~---~--~~
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] Re: listview header

2009-10-10 Thread Wouter

Hey Mark,

Yes I am using the SeperatedListAdapter from Jeff Sharkey, but I will
take a look at your SectionedAdapter.
Can I use it in my project?

Wouter

On Oct 10, 2:42 pm, Mark Murphy  wrote:
> Wouter wrote:
> > What is the easiest way to add headers to a listview (and my list has
> > multiple adapters (sections) so I need to show multiple headers for my
> > list!
>
> I have a MergeAdapter here that can serve that role:
>
> http://github.com/commonsguy/cwac-merge
>
> I have a SectionedAdapter here that can serve that role, but it is GPLv3
> rather than Apache License 2.0:
>
> http://github.com/commonsguy/cw-advandroid/tree/master/ListView/Secti...
>
> The reason that is GPLv3 is because it is derived from Jeff Sharkey's
> original sectioned list code:
>
> http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-...
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Need Android talent? Ask on HADO!http://wiki.andmob.org/hado
--~--~-~--~~~---~--~~
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] listview header

2009-10-10 Thread Wouter

Hey,

What is the easiest way to add headers to a listview (and my list has
multiple adapters (sections) so I need to show multiple headers for my
list!

Thank you,

Wouter
--~--~-~--~~~---~--~~
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] Re: You must supply a resource ID for a TextView

2009-10-07 Thread Wouter

How can i solve this please?


--~--~-~--~~~---~--~~
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] Re: You must supply a resource ID for a TextView

2009-10-07 Thread Wouter

Hmm all the @overrides were gone.. :s

On 7 okt, 16:18, purvi  wrote:
> Hi,
>
> I had the same problem, it was gone when i removed all the @override
> lines above the functions of the SeparateListAdapter.
> So try not overriding the functions.
> It worked for me.
>
> Regards,
> Purvi
>
> On Sep 27, 4:00 pm, Wouter  wrote:
>
> > But I declare it there and then in my runnable i do
> > adapter.notifyDatasetChanged so the listview knows there is other data
> > to show.
> > This works for other adapters.. Really don't know why this isn't
> > working.
>
> > My listview with headers works, i can see the first header or
> > sometimes more but when i scroll down it crashes.. When i do for
> > example
>
> > adapter.addSection("test", new cinemaAdapter(this, cinema)); it makes
> > 1 list with 1 header without crashing..
>
> > So there must be a problem with generating my header titles :s
>
> > On 27 sep, 21:55, Marco Nelissen  wrote:
>
> > > I don't see anything obviously wrong with your code. I do notice that
> > > you apparently create the SeparatedListAdapter and then immediately
> > > call setListAdapter with it, whereas the SeparatedListAdapter sample
> > > code creates the adapter, then adds a bunch of sections to it, and
> > > then calls setListAdapter at the end. Could it be that
> > > SeparatedListAdapter doesn't work when it is empty? Have you tried
> > > postponing your call to setListAdapter until after you've added all
> > > the sections?
>
> > > On Sun, Sep 27, 2009 at 12:32 PM, Wouter  wrote:
>
> > > > Ok i will try to explain how i generate my headers with the
> > > > seperatedlistadapter..
>
> > > > private SeparatedListAdapter adapter;
>
> > > > in my setupViews functions:
>
> > > > this.adapter = new SeparatedListAdapter(this);
> > > > setListAdapter(adapter);
>
> > > > And then to retrieve my data:
>
> > > >   �...@suppresswarnings("unchecked")
> > > >        public void retrieveCinema()
> > > >    {
> > > >        try {
> > > >                        HashMap response = 
> > > > (HashMap)
> > > > client.call("film.retrieveCinema", sessionKey);
>
> > > >                        Comparator reverse = Collections.reverseOrder();
>
> > > >                        TreeMap result = new 
> > > > TreeMap
> > > > (reverse);
> > > >                        TreeMap sortedMap = new 
> > > > TreeMap
> > > > (response);
> > > >                        result.putAll(sortedMap);
>
> > > >                        Iterator it = result.entrySet().iterator();
>
> > > >                    while (it.hasNext()) {
> > > >                        cinema = new ArrayList();
> > > >                        Map.Entry pairs = (Map.Entry)it.next();
> > > >                        Object[] cinemaFilms = 
> > > > (Object[])pairs.getValue();
> > > >                        FilmDetail cinemaMovie = new FilmDetail();
>
> > > >                        for (int i=0; i > > >                        {
> > > >                        cinemaMovie = new FilmDetail();
> > > >                        Map m = (Map) cinemaFilms[i];
> > > >                        cinemaMovie.setTitle(m.get("title").toString());
> > > >                        cinemaMovie.setYear(m.get("year").toString());
> > > >                        
> > > > cinemaMovie.setVotes_count(m.get("votes_count").toString());
> > > >                        
> > > > cinemaMovie.setActors_text(m.get("actors_text").toString());
> > > >                        cinemaMovie.setDirectors_text(m.get
> > > > ("directors_text").toString());
> > > >                        
> > > > cinemaMovie.setGenres_text(m.get("genres_text").toString());
> > > >                        
> > > > cinemaMovie.setAverage(m.get("average").toString());
> > > >                        
> > > > cinemaMovie.setFilmId(m.get("filmId").toString());
> > > >                        
> > > > cinemaMovie.setDuration(m.get("duration").toString());
> > > >                        cinema.add(cinemaMovie);
> > > >                        }
>
> &g

[android-developers] Re: You must supply a resource ID for a TextView

2009-10-07 Thread Wouter

Could it be that simple? Gonna try it immediatelly!

Thank you!

On 7 okt, 16:18, purvi  wrote:
> Hi,
>
> I had the same problem, it was gone when i removed all the @override
> lines above the functions of the SeparateListAdapter.
> So try not overriding the functions.
> It worked for me.
>
> Regards,
> Purvi
>
> On Sep 27, 4:00 pm, Wouter  wrote:
>
> > But I declare it there and then in my runnable i do
> > adapter.notifyDatasetChanged so the listview knows there is other data
> > to show.
> > This works for other adapters.. Really don't know why this isn't
> > working.
>
> > My listview with headers works, i can see the first header or
> > sometimes more but when i scroll down it crashes.. When i do for
> > example
>
> > adapter.addSection("test", new cinemaAdapter(this, cinema)); it makes
> > 1 list with 1 header without crashing..
>
> > So there must be a problem with generating my header titles :s
>
> > On 27 sep, 21:55, Marco Nelissen  wrote:
>
> > > I don't see anything obviously wrong with your code. I do notice that
> > > you apparently create the SeparatedListAdapter and then immediately
> > > call setListAdapter with it, whereas the SeparatedListAdapter sample
> > > code creates the adapter, then adds a bunch of sections to it, and
> > > then calls setListAdapter at the end. Could it be that
> > > SeparatedListAdapter doesn't work when it is empty? Have you tried
> > > postponing your call to setListAdapter until after you've added all
> > > the sections?
>
> > > On Sun, Sep 27, 2009 at 12:32 PM, Wouter  wrote:
>
> > > > Ok i will try to explain how i generate my headers with the
> > > > seperatedlistadapter..
>
> > > > private SeparatedListAdapter adapter;
>
> > > > in my setupViews functions:
>
> > > > this.adapter = new SeparatedListAdapter(this);
> > > > setListAdapter(adapter);
>
> > > > And then to retrieve my data:
>
> > > >   �...@suppresswarnings("unchecked")
> > > >        public void retrieveCinema()
> > > >    {
> > > >        try {
> > > >                        HashMap response = 
> > > > (HashMap)
> > > > client.call("film.retrieveCinema", sessionKey);
>
> > > >                        Comparator reverse = Collections.reverseOrder();
>
> > > >                        TreeMap result = new 
> > > > TreeMap
> > > > (reverse);
> > > >                        TreeMap sortedMap = new 
> > > > TreeMap
> > > > (response);
> > > >                        result.putAll(sortedMap);
>
> > > >                        Iterator it = result.entrySet().iterator();
>
> > > >                    while (it.hasNext()) {
> > > >                        cinema = new ArrayList();
> > > >                        Map.Entry pairs = (Map.Entry)it.next();
> > > >                        Object[] cinemaFilms = 
> > > > (Object[])pairs.getValue();
> > > >                        FilmDetail cinemaMovie = new FilmDetail();
>
> > > >                        for (int i=0; i > > >                        {
> > > >                        cinemaMovie = new FilmDetail();
> > > >                        Map m = (Map) cinemaFilms[i];
> > > >                        cinemaMovie.setTitle(m.get("title").toString());
> > > >                        cinemaMovie.setYear(m.get("year").toString());
> > > >                        
> > > > cinemaMovie.setVotes_count(m.get("votes_count").toString());
> > > >                        
> > > > cinemaMovie.setActors_text(m.get("actors_text").toString());
> > > >                        cinemaMovie.setDirectors_text(m.get
> > > > ("directors_text").toString());
> > > >                        
> > > > cinemaMovie.setGenres_text(m.get("genres_text").toString());
> > > >                        
> > > > cinemaMovie.setAverage(m.get("average").toString());
> > > >                        
> > > > cinemaMovie.setFilmId(m.get("filmId").toString());
> > > >                        
> > > > cinemaMovie.setDuration(m.get("duration").toString());
> > > >                        cinema.add(cinemaMovie);
> 

[android-developers] Re: You must supply a resource ID for a TextView

2009-09-27 Thread Wouter

But I declare it there and then in my runnable i do
adapter.notifyDatasetChanged so the listview knows there is other data
to show.
This works for other adapters.. Really don't know why this isn't
working.

My listview with headers works, i can see the first header or
sometimes more but when i scroll down it crashes.. When i do for
example

adapter.addSection("test", new cinemaAdapter(this, cinema)); it makes
1 list with 1 header without crashing..

So there must be a problem with generating my header titles :s

On 27 sep, 21:55, Marco Nelissen  wrote:
> I don't see anything obviously wrong with your code. I do notice that
> you apparently create the SeparatedListAdapter and then immediately
> call setListAdapter with it, whereas the SeparatedListAdapter sample
> code creates the adapter, then adds a bunch of sections to it, and
> then calls setListAdapter at the end. Could it be that
> SeparatedListAdapter doesn't work when it is empty? Have you tried
> postponing your call to setListAdapter until after you've added all
> the sections?
>
> On Sun, Sep 27, 2009 at 12:32 PM, Wouter  wrote:
>
> > Ok i will try to explain how i generate my headers with the
> > seperatedlistadapter..
>
> > private SeparatedListAdapter adapter;
>
> > in my setupViews functions:
>
> > this.adapter = new SeparatedListAdapter(this);
> > setListAdapter(adapter);
>
> > And then to retrieve my data:
>
> >   �...@suppresswarnings("unchecked")
> >        public void retrieveCinema()
> >    {
> >        try {
> >                        HashMap response = (HashMap > Object>)
> > client.call("film.retrieveCinema", sessionKey);
>
> >                        Comparator reverse = Collections.reverseOrder();
>
> >                        TreeMap result = new TreeMap > Object>
> > (reverse);
> >                        TreeMap sortedMap = new 
> > TreeMap
> > (response);
> >                        result.putAll(sortedMap);
>
> >                        Iterator it = result.entrySet().iterator();
>
> >                    while (it.hasNext()) {
> >                        cinema = new ArrayList();
> >                        Map.Entry pairs = (Map.Entry)it.next();
> >                        Object[] cinemaFilms = (Object[])pairs.getValue();
> >                        FilmDetail cinemaMovie = new FilmDetail();
>
> >                        for (int i=0; i >                        {
> >                        cinemaMovie = new FilmDetail();
> >                        Map m = (Map) cinemaFilms[i];
> >                        cinemaMovie.setTitle(m.get("title").toString());
> >                        cinemaMovie.setYear(m.get("year").toString());
> >                        
> > cinemaMovie.setVotes_count(m.get("votes_count").toString());
> >                        
> > cinemaMovie.setActors_text(m.get("actors_text").toString());
> >                        cinemaMovie.setDirectors_text(m.get
> > ("directors_text").toString());
> >                        
> > cinemaMovie.setGenres_text(m.get("genres_text").toString());
> >                        cinemaMovie.setAverage(m.get("average").toString());
> >                        cinemaMovie.setFilmId(m.get("filmId").toString());
> >                        
> > cinemaMovie.setDuration(m.get("duration").toString());
> >                        cinema.add(cinemaMovie);
> >                        }
>
> >                        String datum = pairs.getKey().toString();
> >                        SimpleDateFormat formatter = new 
> > SimpleDateFormat("EE d
> > MM");
> >                        formatter.applyLocalizedPattern("EE d MM");
> >                        int year= Integer.valueOf(datum.substring(0,4));
> >                        int month = Integer.valueOf(datum.substring(5,7));
> >                        int day = Integer.valueOf(datum.substring(8,10));
> >                        java.util.Date date = new java.util.Date(year, 
> > month, day);
> >                        String parsed = formatter.format(date);
>
> >                        System.out.println(parsed);
>
> >                        adapter.addSection(parsed, new cinemaAdapter(this, 
> > cinema));
>
> >                    }
>
> >                } catch (XMLRPCException e) {
> >                        e.printStackTrace();
> >                }
> >                runOnUiTh

[android-developers] Re: ADC2 entries so far...

2009-09-27 Thread Wouter

My ADC2 entrie for category Travel: myBuddy Travel Planner

check http://slideme.org/application/mybuddy-travel-planner for more
information or in the Android Market!

On Sep 27, 4:29 pm, prem  wrote:
> There's one more app in category productivity/tools - ZoomRoid 
> -http://www.zoomdroid.net
> useful for filling your forms on your computer using your phone
> (forget typing complex passwords,
> long URLs, etc. - just zoom the string using your phone).
>
> On Sep 13, 10:12 am, Mobidev  wrote:
>
> > Its mid September and ADC team will soon launch the ADC 2 judging
> > application. So far its been a great job by the ADC team with sticking
> > to the submission deadline and swift uploads(leaving aside package
> > name confusion among the participants).
>
> > Meanwhile, below are about 105ADC2entries posted on forum. In case
> > of new additions or corrections please reply to this discussion with
> >   . ADC1 saw about 1788 apps and my "guess"
> > isADC2will see "a tleast" 2500 apps considering the tight deadline
> > (could have been much higher(4K+) otherwise).
>
> > From the trend it seems that the Miscellaneous category has far less
> > entries than Prod/Tools and Games(both) categories. Possibly, 21st
> > ranking entry under Prod/Tools could be much better than 3rd ranking
> > entry under Misc category. Unlike ADC1, this time Category will be a
> > key factor in winning; along with Originality, Effective Platform Use,
> > Polish and Indispensability.
>
> > -
> > Education/Reference
> >         Librarium IIhttp://steveoliverc.squarespace.com/
> >         Math Jungle
> >         Mystic Maggiehttp://www.phdgaming.com/general_media/mm/
> >         Vivify picture: mathhttp://vivifypicture.com/
>
> > Entertainment
> >         Daisy Gardenhttp://www.tomgibara.com/android/daisy/garden/
> >         Taps Of Firehttp://code.google.com/p/tapsoffire
>
> > Games: Arcade/Action
> >         CowPotato 3Dhttp://www.froogloid.com/cowpotato
> >         FRGhttp://www.woogames.com/
> >         Galactic Guardian: Zap 
> > GPShttp://sites.google.com/site/mysticlakesoftware/
> >         Graviturnhttp://www.cyrket.com/package/com.fheft.graviturn
> >         Head To Head Racinghttp://headtoheadracing.appspot.com/
> >         Light Racer 3D Trial
> >         ProjectINFhttp://www.chickenbrickstudios.com/
> >         UrbanGolf
> >         X-Dischttp://www.youtube.com/watch?v=3EkH-b15fPY
> >         Zepto Wars - RTS
>
> > Games: Casual/Puzzle
> >         Furdiburbhttp://www.sheado.net/
> >         Goobers Vs. Boogershttp://goobersvsboogers.blogspot.com/
> >         ongPayhttp://www.yakloingames.com/
> >         Relativiahttp://www.polyclefsoftware.com/relativia.html
> >         Splat!: Bugs IIhttp://dkdroid.com
> >         What the Doodle!?
> > Lifestyle
> >         Beer Cloudhttp://greatbrewers.com/story/beercloud-mobile-app
> >         Bottle Buzz
> >         DoIthttp://curvefish.com/apps/doit.htm
> >         FoxyRing  http://www.levelupstudio.fr/foxyring
> >         Gigboxhttp://www.mygigbox.com/
> >         NetDroid
> >         NotiMe!http://www.youtube.com/watch?v=wFjoZmrj40k
> >         ReaderScopehttp://www.altcanvas.com/android/readerscope
> >         Rhythmatics Alphahttp://www.twitter.com/brownbaggames
> >         SpecTrek
>
> > Media
> >         Gallery Map
> >         geoPastehttp://www.geopaste.com/
> >         Mediafly Mobile Audio Podcast Client
> >         MicroJam
> >         MicroJam
> >         MyPODhttp://www.my-pod.org/
> >         PackRathttp://packrat.unwesen.de/
> >         Time-Lapsehttp://www.sheado.net/
> >         Uloopshttp://www.uloops.net/
>
> > Misc
> >         Local Agentshttp://local-agents.appspot.com/
> >         picjiggles litehttp://www.yakloingames.com/
>
> > Productivity/Tools
> >         Alarmoidhttp://www.youtube.com/watch?v=yNcVkP_vK08
> >         aListhttp://androidalist.blogspot.com
> >         AppManagerhttp://curvefish.com/apps/appmanager.htm
> >         GeoAlerthttp://sites.google.com/site/appyoursmobile/geoalert
> >         Hoccerhttp://www.hoccer.com/
> >         MobileWrite
> >         Mobisle Noteshttp://www.facebook.com/pages/MobisleApps/127994296229
> >         MyPageshttp://www.youtube.com/watch?v=75lR4zLy_LQ
> >         OpenLoopzhttp://sites.iode.co.uk/openloopz/
> >         Personalyticshttp://personalytics.net/
> >         Skiba PDF Readerhttp://www.anddev.org/skiba_pdf_reader-t6122.html
> >         Smart Lockhttp://www.youtube.com/watch?v=ipue9Yhi5VA
> >         Talking Calendarhttp://www.pwnwithyourphone.com/
> >         Taskerhttp://tasker.dinglisch.net/
> >         Thinking Spacehttp://homepages.nildram.co.uk/~bakachu/screenshot.png
> >         Tracklethttp://tracklet.appspot.com
> >         txeethttp://txeet.com
> >         Voice Caller IDhttp://www.pwnwithyourphone.com/
> >         WebReaderhttp://webreader.vamsee.in/
> >         What Zip?http://www.usnav

[android-developers] Re: You must supply a resource ID for a TextView

2009-09-27 Thread Wouter

Ok i will try to explain how i generate my headers with the
seperatedlistadapter..

private SeparatedListAdapter adapter;

in my setupViews functions:

this.adapter = new SeparatedListAdapter(this);
setListAdapter(adapter);

And then to retrieve my data:

@SuppressWarnings("unchecked")
public void retrieveCinema()
{
try {
HashMap response = (HashMap)
client.call("film.retrieveCinema", sessionKey);

Comparator reverse = Collections.reverseOrder();

TreeMap result = new TreeMap
(reverse);
TreeMap sortedMap = new TreeMap
(response);
result.putAll(sortedMap);

Iterator it = result.entrySet().iterator();

while (it.hasNext()) {
cinema = new ArrayList();
Map.Entry pairs = (Map.Entry)it.next();
Object[] cinemaFilms = (Object[])pairs.getValue();
FilmDetail cinemaMovie = new FilmDetail();

for (int i=0; i wrote:
> On Sun, Sep 27, 2009 at 6:01 AM, Wouter  wrote:
>
> > On 26 sep, 19:10, Marco Nelissen  wrote:
> >> On Sat, Sep 26, 2009 at 6:20 AM, Wouter  wrote:
>
> >> > When i look at the sample from the seperatedlistadapter i see this:
>
> >> > # @Override
> >> > #     public void onCreate(Bundle icicle) {
> >> > #         super.onCreate(icicle);
> >> > #
> >> > #         List> security = new LinkedList>
> >> > ();
> >> > #         security.add(createItem("Remember passwords", "Save
> >> > usernames and passwords for Web sites"));
> >> > #         security.add(createItem("Clear passwords", "Save usernames
> >> > and passwords for Web sites"));
> >> > #         security.add(createItem("Show security warnings", "Show
> >> > warning if there is a problem with a site's security"));
> >> > #
> >> > #         // create our list and custom adapter
> >> > #         SeparatedListAdapter adapter = new SeparatedListAdapter
> >> > (this);
> >> > #         adapter.addSection("Array test", new ArrayAdapter
> >> > (this,
> >> > #             R.layout.list_item, new String[] { "First item", "Item
> >> > two" }));
> >> > #         adapter.addSection("Security", new SimpleAdapter(this,
> >> > security, R.layout.list_complex,
> >> > #             new String[] { ITEM_TITLE, ITEM_CAPTION }, new int[]
> >> > { R.id.list_complex_title, R.id.list_complex_caption }));
> >> > #
> >> > #         ListView list = new ListView(this);
> >> > #         list.setAdapter(adapter);
> >> > #         this.setContentView(list);
> >> > #
> >> > #     }
>
> >> > so every section is using a different layout file. So why doestn't
> >> > this work with me? :(
>
> >> The specific crash you're seeing is caused by the wrong layout being
> >> used for a list item, that much is clear from the log. It's hard to
> >> say whether this is because you're using this SeparatedListAdapter
> >> wrong, or because there's a bug in it. With SeparatedListAdapter
> >> you're actually using multiple adapters (one for each section, and one
> >> for all the section-headers), which makes it a little harder to debug.
> >> You could start by adding lots of logging, so you can see what
> >> position it's trying to get a view for, what section and layout it
> >> thinks that position corresponds to and then check whether that layout
> >> actually has all the fields that that section's adapter needs.
>
> >> On thing that's a bit suspicious about the code you've posted so far
> >> is that you appear to be assigning values (data) to the various views
> >> in your getView(), which is not what you would normally do. Normally
> >> getView only returns a layout of the correct type, and the adapter
> >> itself then assigns the data from the array or Cursor to the various
> >> views in your layout.
>
> > Hmm, i only use on view to assign values to (R.layout.cinema_row):
>
> You are also assigning values to a lot of the child views of that
> layout (all of those calls to setText). On second thought I don't
> think that is actually the problem though.
> Given where it crashed, the problem is with the adapter you specified
> for the section headers, which if I understand correctly is not
> cinemaAdapter, but some other adapter (possibly a plain ArrayAdapter)
> that displays dates. If you post the code for that (how do you create
> it), we can probably sort this out.
--~--~-~--~~~---~--~~
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] Re: You must supply a resource ID for a TextView

2009-09-27 Thread Wouter



On 26 sep, 19:10, Marco Nelissen  wrote:
> On Sat, Sep 26, 2009 at 6:20 AM, Wouter  wrote:
>
> > When i look at the sample from the seperatedlistadapter i see this:
>
> > # @Override
> > #     public void onCreate(Bundle icicle) {
> > #         super.onCreate(icicle);
> > #
> > #         List> security = new LinkedList>
> > ();
> > #         security.add(createItem("Remember passwords", "Save
> > usernames and passwords for Web sites"));
> > #         security.add(createItem("Clear passwords", "Save usernames
> > and passwords for Web sites"));
> > #         security.add(createItem("Show security warnings", "Show
> > warning if there is a problem with a site's security"));
> > #
> > #         // create our list and custom adapter
> > #         SeparatedListAdapter adapter = new SeparatedListAdapter
> > (this);
> > #         adapter.addSection("Array test", new ArrayAdapter
> > (this,
> > #             R.layout.list_item, new String[] { "First item", "Item
> > two" }));
> > #         adapter.addSection("Security", new SimpleAdapter(this,
> > security, R.layout.list_complex,
> > #             new String[] { ITEM_TITLE, ITEM_CAPTION }, new int[]
> > { R.id.list_complex_title, R.id.list_complex_caption }));
> > #
> > #         ListView list = new ListView(this);
> > #         list.setAdapter(adapter);
> > #         this.setContentView(list);
> > #
> > #     }
>
> > so every section is using a different layout file. So why doestn't
> > this work with me? :(
>
> The specific crash you're seeing is caused by the wrong layout being
> used for a list item, that much is clear from the log. It's hard to
> say whether this is because you're using this SeparatedListAdapter
> wrong, or because there's a bug in it. With SeparatedListAdapter
> you're actually using multiple adapters (one for each section, and one
> for all the section-headers), which makes it a little harder to debug.
> You could start by adding lots of logging, so you can see what
> position it's trying to get a view for, what section and layout it
> thinks that position corresponds to and then check whether that layout
> actually has all the fields that that section's adapter needs.

> On thing that's a bit suspicious about the code you've posted so far
> is that you appear to be assigning values (data) to the various views
> in your getView(), which is not what you would normally do. Normally
> getView only returns a layout of the correct type, and the adapter
> itself then assigns the data from the array or Cursor to the various
> views in your layout.
>

Hmm, i only use on view to assign values to (R.layout.cinema_row):

 public View getView(int position, View convertView, ViewGroup parent)
{
View v = convertView;
FilmDetail o = items.get(position);

if (v == null) {
LayoutInflater vi = (LayoutInflater)
getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate(R.layout.cinema_row, parent,
false);
}

if (o != null) {
TextView tt = (TextView) v.findViewById
(R.id.text1);
TextView genre = (TextView) v.findViewById
(R.id.genre);
TextView directors = (TextView) v.findViewById
(R.id.regisse..

As you can see here.. So I don't think this is the problem..
Do you have an example of how i can use getView then in the way you
are saying?

> > If you agree I will give you my source code?
>
> Sorry, no. If you're OK with sharing your code, you should post it
> here (as minimal an example as possible) so that others can help and
> learn from it too.

I have posted a lot of my activity so i hope someone else can help me
too..
--~--~-~--~~~---~--~~
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] Re: You must supply a resource ID for a TextView

2009-09-26 Thread Wouter

When i look at the sample from the seperatedlistadapter i see this:

# @Override
# public void onCreate(Bundle icicle) {
# super.onCreate(icicle);
#
# List> security = new LinkedList>
();
# security.add(createItem("Remember passwords", "Save
usernames and passwords for Web sites"));
# security.add(createItem("Clear passwords", "Save usernames
and passwords for Web sites"));
# security.add(createItem("Show security warnings", "Show
warning if there is a problem with a site's security"));
#
# // create our list and custom adapter
# SeparatedListAdapter adapter = new SeparatedListAdapter
(this);
# adapter.addSection("Array test", new ArrayAdapter
(this,
# R.layout.list_item, new String[] { "First item", "Item
two" }));
# adapter.addSection("Security", new SimpleAdapter(this,
security, R.layout.list_complex,
# new String[] { ITEM_TITLE, ITEM_CAPTION }, new int[]
{ R.id.list_complex_title, R.id.list_complex_caption }));
#
# ListView list = new ListView(this);
# list.setAdapter(adapter);
# this.setContentView(list);
#
# }

so every section is using a different layout file. So why doestn't
this work with me? :(
If you agree I will give you my source code?

On 25 sep, 20:35, Marco Nelissen  wrote:
> On Fri, Sep 25, 2009 at 10:18 AM, Wouter  wrote:
>
> > On 25 sep, 16:57, Marco Nelissen  wrote:
> >> So there's your problem then, probably. The adapter expects each item
> >> to have the same items, so that it can assign the fields from your
> >> Cursor to the corresponding items in your list item layout. In other
> >> words, if your "normal" list item contains items with IDs A, B and C,
> >> them your "section" list items should also have items with IDs A, B
> >> and C, and those items should have the same type in both layouts as
> >> well.
>
> > So if i understand this good if have to use the same layout file for
> > my header file (that only needs a TextView) and my list item (with
> > much more information and many TextViews and a ImageView).
>
> Yes, if you're expecting the adapter to fill the various views in your
> layouts with data automatically.
>
>
>
> > My list_header.xml file is like this:
>
> > 
> >  
> >     xmlns:android="http://schemas.android.com/apk/res/android";
> >     android:id="@+id/list_header_title"
> >     android:layout_width="fill_parent"
> >     android:layout_height="wrap_content"
> >     android:text="header"
> >     android:textColor="#FF"
> >     android:gravity="center_vertical|left"
> >        android:paddingLeft="20dip"
>
> >      android:background="@drawable/settings_header"
> >     android:textAppearance="?android:attr/textAppearanceSmall"
> >  />
>
> > I use this to set up a text for my heade. I use the
> > seperatedlistadapter from here:
> >http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-...
>
> >>In your case, it looks like you have a TextView with a given ID
> >> in one layout, whereas in the other layout that same ID is either used
> >> for something that is not a TextView, or isn't present at all.
>
> > And I don't have a textview with the same ID.
>
> and that is why it complains/crashes.
>
> >> If you need some of the items in your list to be different between
> >> your "normal" and "section" layouts, then you should override bindView
> >> and handle that in there.
>
> > And how can i do that? I now use getView to make my list items in my
> > custom adapter and i only do this for my seperatedlistadapter:
>
> > adapter.addSection(parsed, new cinemaAdapter(this,
> > R.layout.list_header, cinema));
>
> > How can i use BindView then? I will give you my source code if you
> > want!
>
> There are several ways you can accomplish what you want to do.
> The easiest is probably to have a single layout that you can use for
> both types of items, by hiding and showing views as needed. I don't
> think it matters whether you hide/show these views in getView or in
> bindView. What matters is that both layouts have all the views
> present, so that the adapter doesn't get confused.
> Slightly more sophisticated would be to use different layouts for the
> two types of items, and then implement bindView() to only assign data
> to those views that are actually present in the layout for each item.
--~--~-~--~~~---~--~~
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] Re: You must supply a resource ID for a TextView

2009-09-25 Thread Wouter

On 25 sep, 16:57, Marco Nelissen  wrote:
> So there's your problem then, probably. The adapter expects each item
> to have the same items, so that it can assign the fields from your
> Cursor to the corresponding items in your list item layout. In other
> words, if your "normal" list item contains items with IDs A, B and C,
> them your "section" list items should also have items with IDs A, B
> and C, and those items should have the same type in both layouts as
> well.

So if i understand this good if have to use the same layout file for
my header file (that only needs a TextView) and my list item (with
much more information and many TextViews and a ImageView).

My list_header.xml file is like this:


 http://schemas.android.com/apk/res/android";
 android:id="@+id/list_header_title"
 android:layout_width="fill_parent"
 android:layout_height="wrap_content"
 android:text="header"
 android:textColor="#FF"
 android:gravity="center_vertical|left"
android:paddingLeft="20dip"

  android:background="@drawable/settings_header"
 android:textAppearance="?android:attr/textAppearanceSmall"
 />

I use this to set up a text for my heade. I use the
seperatedlistadapter from here:
http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/

>In your case, it looks like you have a TextView with a given ID
> in one layout, whereas in the other layout that same ID is either used
> for something that is not a TextView, or isn't present at all.

And I don't have a textview with the same ID.

> If you need some of the items in your list to be different between
> your "normal" and "section" layouts, then you should override bindView
> and handle that in there.

And how can i do that? I now use getView to make my list items in my
custom adapter and i only do this for my seperatedlistadapter:

adapter.addSection(parsed, new cinemaAdapter(this,
R.layout.list_header, cinema));

How can i use BindView then? I will give you my source code if you
want!
>
> On Thu, Sep 24, 2009 at 11:06 PM, Wouter  wrote:
>
> > Np the headers are using a separate layout file..
>
> > On 25 sep, 00:04, Marco Nelissen  wrote:
> >> On Thu, Sep 24, 2009 at 2:12 PM, Wouter  wrote:
>
> >> > On 24 sep, 22:53, Marco Nelissen  wrote:
> >> >> On Thu, Sep 24, 2009 at 1:41 PM, Wouter  wrote:
>
> >> >> > I have no problem with the data mapping and TextViews.
>
> >> >> The stack trace and crash you're seeing indicate otherwise.
> >> >> Unless you're doing something specific in bindView, the adapter
> >> >> expects each list item layout to be the same. You are overriding
> >> >> getView and returning different kinds of views, so I would take
> >> >> another look at that, and make sure that those two kinds of views are
> >> >> compatible.
>
> >> > Each list item layout is the same. it uses R.layout.cinema_row!
> >> > The weird is it makes my list with headers (when i use
> >> > seperatedlistadapter) and when i scroll down, it crashes and gives
> >> > this error.
> >> > Really will take a look at it, if not i will put my source code here!
>
> >> >> > It fully works
> >> >> > when i don't use a seperatedList adapter..
> >> >> > So there is problem with this seperatedListAdapter..
> >> >> > Is there another way i can use to divide my list in sections with
> >> >> > headers?
>
> >> >> I don't know what effect you're trying to achieve, but in general you
> >> >> can override bindView and/or getView to make each item look exactly
> >> >> the way you want.
>
> >> > I have a list of movies with a release date. all the movies with same
> >> > date has to be listed under a header with date.. And every list item
> >> > has same layout, really don't get it :(
>
> >> Every list item, including the header items? In other words: do your
> >> header items use the same layout as your other list items?
--~--~-~--~~~---~--~~
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] Re: You must supply a resource ID for a TextView

2009-09-24 Thread Wouter

Np the headers are using a separate layout file..

On 25 sep, 00:04, Marco Nelissen  wrote:
> On Thu, Sep 24, 2009 at 2:12 PM, Wouter  wrote:
>
> > On 24 sep, 22:53, Marco Nelissen  wrote:
> >> On Thu, Sep 24, 2009 at 1:41 PM, Wouter  wrote:
>
> >> > I have no problem with the data mapping and TextViews.
>
> >> The stack trace and crash you're seeing indicate otherwise.
> >> Unless you're doing something specific in bindView, the adapter
> >> expects each list item layout to be the same. You are overriding
> >> getView and returning different kinds of views, so I would take
> >> another look at that, and make sure that those two kinds of views are
> >> compatible.
>
> > Each list item layout is the same. it uses R.layout.cinema_row!
> > The weird is it makes my list with headers (when i use
> > seperatedlistadapter) and when i scroll down, it crashes and gives
> > this error.
> > Really will take a look at it, if not i will put my source code here!
>
> >> > It fully works
> >> > when i don't use a seperatedList adapter..
> >> > So there is problem with this seperatedListAdapter..
> >> > Is there another way i can use to divide my list in sections with
> >> > headers?
>
> >> I don't know what effect you're trying to achieve, but in general you
> >> can override bindView and/or getView to make each item look exactly
> >> the way you want.
>
> > I have a list of movies with a release date. all the movies with same
> > date has to be listed under a header with date.. And every list item
> > has same layout, really don't get it :(
>
> Every list item, including the header items? In other words: do your
> header items use the same layout as your other list items?
--~--~-~--~~~---~--~~
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] Re: You must supply a resource ID for a TextView

2009-09-24 Thread Wouter



On 24 sep, 22:53, Marco Nelissen  wrote:
> On Thu, Sep 24, 2009 at 1:41 PM, Wouter  wrote:
>
> > I have no problem with the data mapping and TextViews.
>
> The stack trace and crash you're seeing indicate otherwise.
> Unless you're doing something specific in bindView, the adapter
> expects each list item layout to be the same. You are overriding
> getView and returning different kinds of views, so I would take
> another look at that, and make sure that those two kinds of views are
> compatible.
>

Each list item layout is the same. it uses R.layout.cinema_row!
The weird is it makes my list with headers (when i use
seperatedlistadapter) and when i scroll down, it crashes and gives
this error.
Really will take a look at it, if not i will put my source code here!

> > It fully works
> > when i don't use a seperatedList adapter..
> > So there is problem with this seperatedListAdapter..
> > Is there another way i can use to divide my list in sections with
> > headers?
>
> I don't know what effect you're trying to achieve, but in general you
> can override bindView and/or getView to make each item look exactly
> the way you want.

I have a list of movies with a release date. all the movies with same
date has to be listed under a header with date.. And every list item
has same layout, really don't get it :(
>
> Also, and unrelated to this problem, please don't put your code in the
> com.android namespace (you are using "com.android.moviemeter").

I saw this already when i tried to upload to the android market ;)
--~--~-~--~~~---~--~~
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] Re: You must supply a resource ID for a TextView

2009-09-24 Thread Wouter

I have no problem with the data mapping and TextViews. It fully works
when i don't use a seperatedList adapter..
So there is problem with this seperatedListAdapter..
Is there another way i can use to divide my list in sections with
headers?

On 24 sep, 22:36, Marco Nelissen  wrote:
> Somewhere in your code, you are passing a resource ID to the system
> that should refer to a TextView, but doesn't.
> My guess is you've set your data mapping up incorrectly.
>
> On Thu, Sep 24, 2009 at 1:25 PM, Wouter  wrote:
>
> > Can someone help me please! Really need to get this fixed!
>
> > On Sep 19, 3:10 pm, Wouter  wrote:
> >> Do you know a solution?
>
> >> On 18 sep, 19:00, Wouter  wrote:
>
> >> > This is the function:
>
> >> > public View getView(int position, View convertView, ViewGroup parent)
> >> > {
> >> >                 int sectionnum = 0;
> >> >                 for(Object section : this.sections.keySet()) {
> >> >                         Adapter adapter = sections.get(section);
> >> >                         int size = adapter.getCount() + 1;
>
> >> >                         // check if position inside this section
> >> >                         if(position == 0) return 
> >> > headers.getView(sectionnum, convertView,
> >> > parent);
> >> >                         if(position < size) return 
> >> > adapter.getView(position - 1,
> >> > convertView, parent);
>
> >> >                         // otherwise jump into next section
> >> >                         position -= size;
> >> >                         sectionnum++;
> >> >                 }
> >> >                 return null;
> >> >         }
>
> >> > 93: --> if(position == 0) return headers.getView(sectionnum,
> >> > convertView, parent);
>
> >> > resource file:
>
> >> > 
> >> >  >> >         xmlns:android="http://schemas.android.com/apk/res/android";
> >> >         android:orientation="horizontal" 
> >> > android:layout_width="fill_parent"
> >> >         android:layout_height="fill_parent"
> >> >         >
>
> >> >        >> >      android:layout_width="60px"
> >> >      android:layout_margin="5px"
> >> >      android:src="@drawable/icon"
> >> >       android:layout_height="80px">
> >> >     
>
> >> >  >> >         android:orientation="vertical" android:layout_width="fill_parent"
> >> >         android:layout_height="fill_parent"
> >> >         >
>
> >> >  >> >         android:id="@+id/text1"
> >> >     android:layout_width="fill_parent"
> >> >     android:layout_height="wrap_content"
> >> >     android:textSize="16px"
> >> >     android:textStyle="bold"
> >> >     android:text="FilmTitle"/>
>
> >> >      >> >         android:orientation="horizontal"
> >> >         android:layout_width="wrap_content"
> >> >         android:layout_height="wrap_content"
> >> >         >
> >> >       >> >             style="?android:attr/ratingBarStyleSmall"
> >> >             android:layout_width="wrap_content"
> >> >             android:layout_height="wrap_content"
> >> >             android:layout_gravity="center_vertical" />
> >> >      >> >         android:id="@+id/votes"
> >> >     android:layout_width="fill_parent"
> >> >     android:layout_height="wrap_content"
> >> >         android:textSize="12px"
> >> >     android:text="votes"/>
> >> >     
> >> >      >> >         android:id="@+id/genre"
> >> >     android:layout_width="fill_parent"
> >> >     android:layout_height="wrap_content"
> >> >         android:textSize="12px"
> >> >     android:text="genre"/>
> >> >      >> >         android:id="@+id/regisseur"
> >> >     android:layout_width="fill_parent"
> >> >     android:layout_height="wrap_content"
> >> >         an

[android-developers] Re: You must supply a resource ID for a TextView

2009-09-24 Thread Wouter

Can someone help me please! Really need to get this fixed!

On Sep 19, 3:10 pm, Wouter  wrote:
> Do you know a solution?
>
> On 18 sep, 19:00, Wouter  wrote:
>
> > This is the function:
>
> > public View getView(int position, View convertView, ViewGroup parent)
> > {
> >                 int sectionnum = 0;
> >                 for(Object section : this.sections.keySet()) {
> >                         Adapter adapter = sections.get(section);
> >                         int size = adapter.getCount() + 1;
>
> >                         // check if position inside this section
> >                         if(position == 0) return 
> > headers.getView(sectionnum, convertView,
> > parent);
> >                         if(position < size) return adapter.getView(position 
> > - 1,
> > convertView, parent);
>
> >                         // otherwise jump into next section
> >                         position -= size;
> >                         sectionnum++;
> >                 }
> >                 return null;
> >         }
>
> > 93: --> if(position == 0) return headers.getView(sectionnum,
> > convertView, parent);
>
> > resource file:
>
> > 
> >  >         xmlns:android="http://schemas.android.com/apk/res/android";
> >         android:orientation="horizontal" android:layout_width="fill_parent"
> >         android:layout_height="fill_parent"
> >         >
>
> >        >      android:layout_width="60px"
> >      android:layout_margin="5px"
> >      android:src="@drawable/icon"
> >       android:layout_height="80px">
> >     
>
> >  >         android:orientation="vertical" android:layout_width="fill_parent"
> >         android:layout_height="fill_parent"
> >         >
>
> >  >         android:id="@+id/text1"
> >     android:layout_width="fill_parent"
> >     android:layout_height="wrap_content"
> >     android:textSize="16px"
> >     android:textStyle="bold"
> >     android:text="FilmTitle"/>
>
> >      >         android:orientation="horizontal"
> >         android:layout_width="wrap_content"
> >         android:layout_height="wrap_content"
> >         >
> >       >             style="?android:attr/ratingBarStyleSmall"
> >             android:layout_width="wrap_content"
> >             android:layout_height="wrap_content"
> >             android:layout_gravity="center_vertical" />
> >      >         android:id="@+id/votes"
> >     android:layout_width="fill_parent"
> >     android:layout_height="wrap_content"
> >         android:textSize="12px"
> >     android:text="votes"/>
> >     
> >      >         android:id="@+id/genre"
> >     android:layout_width="fill_parent"
> >     android:layout_height="wrap_content"
> >         android:textSize="12px"
> >     android:text="genre"/>
> >      >         android:id="@+id/regisseur"
> >     android:layout_width="fill_parent"
> >     android:layout_height="wrap_content"
> >         android:textSize="12px"
> >     android:text="regisseur"/>
> >      >         android:id="@+id/acteurs"
> >     android:layout_width="fill_parent"
> >     android:layout_height="wrap_content"
> >             android:textSize="12px"
> >     android:text="acteurs"/>
>
> > 
>
> > 
>
> > But without this seperatedlistadapter it is working (was working
> > before with it too). So don't know what problem is..
>
> > hope you can help me!
>
> > Wouter
> > On 18 sep, 18:41, "Yusuf Saib (T-Mobile USA)" 
> > Mobile.com> wrote:
> > > Where in your code is SeparatedListAdapter.java:93? And can you post
> > > the resource xml as well?
>
> > > Yusuf Saib
> > > Android
> > > ·T· · ·Mobile· stick together
> > > The views, opinions and statements in this email are those of the
> > > author solely in their individual capacity, and do not necessarily
> > > represent those of T-Mobile USA, Inc.
>
> > > On Sep 18, 7:16 am, Wouter  wrote:
>
> > > > I removed my seperatedlistadapter 

[android-developers] Re: fit text on 1 line

2009-09-22 Thread Wouter

hey,

thank you for your answer! But how can i set up the text encoding?

Wouter

On Sep 22, 6:49 pm, Dianne Hackborn  wrote:
> You need to look at the data that you are getting from the server, and know
> what encoding it is in.  Java is UTF-16, so when you build a String from the
> data from the server you need to tell it what encoding the original text is
> in.
>
>
>
> On Tue, Sep 22, 2009 at 4:45 AM, Wouter  wrote:
>
> > How can i check the text encoding?
>
> > On 21 sep, 21:25, Marco Nelissen  wrote:
> > > On Mon, Sep 21, 2009 at 10:36 AM, Wouter  wrote:
>
> > > > Ok I had to place android:singleLine="true" (http://code.google.com/p/
> > > > android/issues/detail?id=882)
>
> > > > and now it is working :)
>
> > > > Other question:
>
> > > > when you look at this picture:http://snapplr.com/stxgyoucan see
> > > > that there are weird symbols in my text. The text is in dutch but if
> > > > there are symbols used like é or à ... android places a symbol with a
> > > > "?"
> > > > I am consuming a web service (xml rpc) and in this response the text
> > > > is good!
>
> > > > How can i fix this?
>
> > > Make sure you're using the right text encoding, and convert if needed.
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
--~--~-~--~~~---~--~~
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] Re: fit text on 1 line

2009-09-22 Thread Wouter

How can i check the text encoding?

On 21 sep, 21:25, Marco Nelissen  wrote:
> On Mon, Sep 21, 2009 at 10:36 AM, Wouter  wrote:
>
> > Ok I had to place android:singleLine="true" (http://code.google.com/p/
> > android/issues/detail?id=882)
>
> > and now it is working :)
>
> > Other question:
>
> > when you look at this picture:http://snapplr.com/stxgyou can see
> > that there are weird symbols in my text. The text is in dutch but if
> > there are symbols used like é or à ... android places a symbol with a
> > "?"
> > I am consuming a web service (xml rpc) and in this response the text
> > is good!
>
> > How can i fix this?
>
> Make sure you're using the right text encoding, and convert if needed.
--~--~-~--~~~---~--~~
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] Re: fit text on 1 line

2009-09-21 Thread Wouter

Ok I had to place android:singleLine="true" (http://code.google.com/p/
android/issues/detail?id=882)

and now it is working :)

Other question:

when you look at this picture: http://snapplr.com/stxg you can see
that there are weird symbols in my text. The text is in dutch but if
there are symbols used like é or à ... android places a symbol with a
"?"
I am consuming a web service (xml rpc) and in this response the text
is good!

How can i fix this?

Wouter

On Sep 21, 7:28 pm, "Mark Murphy"  wrote:
> > Hey,
>
> > I am working on a project and i need to fit a text (string) on line at
> > a textView.
> > I know I can work with maxLines but if the text does not fit the view,
> > it has to end with "..."
> > so for example directed by brad pitt an...
>
> > So can users see that it is not the end of the text they are seeing
> > but that there is more ;)
>
> android:ellipsize="end" at least used to work for this...
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
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] Re: fit text on 1 line

2009-09-21 Thread Wouter

I have tried this but the ellipsis (...) is not appearing..

On Sep 21, 7:28 pm, "Mark Murphy"  wrote:
> > Hey,
>
> > I am working on a project and i need to fit a text (string) on line at
> > a textView.
> > I know I can work with maxLines but if the text does not fit the view,
> > it has to end with "..."
> > so for example directed by brad pitt an...
>
> > So can users see that it is not the end of the text they are seeing
> > but that there is more ;)
>
> android:ellipsize="end" at least used to work for this...
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
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] fit text on 1 line

2009-09-21 Thread Wouter

Hey,

I am working on a project and i need to fit a text (string) on line at
a textView.
I know I can work with maxLines but if the text does not fit the view,
it has to end with "..."
so for example directed by brad pitt an...

So can users see that it is not the end of the text they are seeing
but that there is more ;)

How can I do that?

Thanx,

Wouter
--~--~-~--~~~---~--~~
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] Re: Listview and scrolling

2009-09-19 Thread Wouter

Edit: got it, thankx

On 19 sep, 19:25, Wouter  wrote:
> Hmm it seems that i cannot click on the list items.. how can i enable
> that?
>
> On 19 sep, 19:23, Wouter  wrote:
>
> > Thank you so much for your help!
>
> > It worked great and fast with MergeAdapter..
>
> > Preview:http://snapplr.com/803q
>
> > Very nice :)
>
> > On 19 sep, 19:16, Mark Murphy  wrote:
>
> > > Wouter wrote:
> > > > Ok but is the MergeAdapter not better for adding a listadapter to the
> > > > listview? or how can i do that too with SackOfViewsAdapter?
>
> > > The MergeAdapter uses the SackOfViewsAdapter. If you wish to use
> > > MergeAdapter, feed it the inflated views and your other adapters, as per
> > > the demo:
>
> > > MergeAdapter adapter=new MergeAdapter();
>
> > > adapter.addAdapter(buildFirstList());
> > > adapter.addView(buildButton());
> > > adapter.addAdapter(buildSecondList());
>
> > > setListAdapter(adapter);
>
> > > In your case, addView() would be passed the results of an inflation.
>
> > > --
> > > Mark Murphy (a Commons 
> > > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > > Need help for your Android OSS project?http://wiki.andmob.org/hado
--~--~-~--~~~---~--~~
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] Re: Listview and scrolling

2009-09-19 Thread Wouter

Hmm it seems that i cannot click on the list items.. how can i enable
that?

On 19 sep, 19:23, Wouter  wrote:
> Thank you so much for your help!
>
> It worked great and fast with MergeAdapter..
>
> Preview:http://snapplr.com/803q
>
> Very nice :)
>
> On 19 sep, 19:16, Mark Murphy  wrote:
>
> > Wouter wrote:
> > > Ok but is the MergeAdapter not better for adding a listadapter to the
> > > listview? or how can i do that too with SackOfViewsAdapter?
>
> > The MergeAdapter uses the SackOfViewsAdapter. If you wish to use
> > MergeAdapter, feed it the inflated views and your other adapters, as per
> > the demo:
>
> > MergeAdapter adapter=new MergeAdapter();
>
> > adapter.addAdapter(buildFirstList());
> > adapter.addView(buildButton());
> > adapter.addAdapter(buildSecondList());
>
> > setListAdapter(adapter);
>
> > In your case, addView() would be passed the results of an inflation.
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > Need help for your Android OSS project?http://wiki.andmob.org/hado
--~--~-~--~~~---~--~~
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] Re: Listview and scrolling

2009-09-19 Thread Wouter

Thank you so much for your help!

It worked great and fast with MergeAdapter..

Preview: http://snapplr.com/803q

Very nice :)

On 19 sep, 19:16, Mark Murphy  wrote:
> Wouter wrote:
> > Ok but is the MergeAdapter not better for adding a listadapter to the
> > listview? or how can i do that too with SackOfViewsAdapter?
>
> The MergeAdapter uses the SackOfViewsAdapter. If you wish to use
> MergeAdapter, feed it the inflated views and your other adapters, as per
> the demo:
>
> MergeAdapter adapter=new MergeAdapter();
>
> adapter.addAdapter(buildFirstList());
> adapter.addView(buildButton());
> adapter.addAdapter(buildSecondList());
>
> setListAdapter(adapter);
>
> In your case, addView() would be passed the results of an inflation.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Need help for your Android OSS project?http://wiki.andmob.org/hado
--~--~-~--~~~---~--~~
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] Re: Listview and scrolling

2009-09-19 Thread Wouter

I have this now:

private void setupViews()
{
MergeAdapter adapter=new MergeAdapter();

LayoutInflater inflater = (LayoutInflater)this.getSystemService
(Context.LAYOUT_INFLATER_SERVICE);
View filmLayout = inflater.inflate(R.layout.filmdetail_layout,
null);
plot = (TextView) filmLayout.findViewById(R.id.plot);
filmTitle = (TextView) 
filmLayout.findViewById(R.id.txtFilmTitle);
filmAverage = (TextView) 
filmLayout.findViewById(R.id.filmAverage);
filmVotes = (TextView) filmLayout.findViewById(R.id.filmVotes);
filmRating = (RatingBar) 
filmLayout.findViewById(R.id.filmRating);
filmImg = (ImageView) 
filmLayout.findViewById(R.id.imgFilmDetail);

adapter.addView(filmLayout);
//reviews = new ArrayList();
//this.reviAdapter = new reviewsAdapter(this,
R.layout.review_row, reviews);

setListAdapter(adapter);


}

so i add one view with all the widgets except of my custom list
adapter.

And then i want to do this

filmTitle.setText(detail.getTitle() + " (" + detail.getYear() + ")");
plot.setText(detail.getPlot());
filmAverage.setText("gemiddelde: " + detail.getAverage());
filmVotes.setText(detail.getVotes_count() + " stemmen");
filmRating.setRating(Float.valueOf(detail.getAverage()));

and it gives nullpointerexception..

On 19 sep, 19:02, Wouter  wrote:
> Ok but is the MergeAdapter not better for adding a listadapter to the
> listview? or how can i do that too with SackOfViewsAdapter?
--~--~-~--~~~---~--~~
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] Re: Listview and scrolling

2009-09-19 Thread Wouter

Ok but is the MergeAdapter not better for adding a listadapter to the
listview? or how can i do that too with SackOfViewsAdapter?
--~--~-~--~~~---~--~~
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] Re: Listview and scrolling

2009-09-19 Thread Wouter

Isn't this the right way to inflate?

LayoutInflater inflater = (LayoutInflater)this.getSystemService
(Context.LAYOUT_INFLATER_SERVICE);
View filmLayout = inflater.inflate(R.layout.filmdetail_layout,
null);
plot = (TextView) filmLayout.findViewById(R.id.plot);

filmdetail_layout is my seperate layout file.. I got a nullpointer
exception when i try to set text in this view..

Do i have to place this in newView like this?

protected View newView(int position, ViewGroup parent) {
TextView txt=new TextView(SackOfViewsDemo.this);

txt.setText(items[(position-2)/2]);

return(txt);
}

On 19 sep, 18:31, Wouter  wrote:
> Ok thank you i will try putting them in seperate layout files now!
>
> Will let you know if this all worked ;)
>
> On 19 sep, 18:28, Mark Murphy  wrote:
>
> > Wouter wrote:
> > > But i have a layout xml file where i declarate all the widgets (yes
> > > its a lot).
> > > Do i have to put this layout file in seperate file (so for all that
> > > has to come above the review list) and then do like this:
>
> > > View v = LayoutInflater.from(this).inflate(your_layout_xml,..);
>
> > > and then add this view to the arraylist of views? (like in the
> > > SackOfViewsDemo).
>
> > > I also have a custom adapter for my listview (list of rows)
>
> > > Or how can i do this the best and easiest? :)
>
> > Either:
>
> > -- Put all of your widgets (outside of the custom adapter) in separate
> > layout files, or
>
> > -- Construct them in Java rather than use layout XML
>
> > It's conceivable to add support for loading a single layout file and
> > pouring all the root's children into the list, but I don't have that in
> > there right now.
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > Need help for your Android OSS project?http://wiki.andmob.org/hado
--~--~-~--~~~---~--~~
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] Re: Listview and scrolling

2009-09-19 Thread Wouter

Ok thank you i will try putting them in seperate layout files now!

Will let you know if this all worked ;)

On 19 sep, 18:28, Mark Murphy  wrote:
> Wouter wrote:
> > But i have a layout xml file where i declarate all the widgets (yes
> > its a lot).
> > Do i have to put this layout file in seperate file (so for all that
> > has to come above the review list) and then do like this:
>
> > View v = LayoutInflater.from(this).inflate(your_layout_xml,..);
>
> > and then add this view to the arraylist of views? (like in the
> > SackOfViewsDemo).
>
> > I also have a custom adapter for my listview (list of rows)
>
> > Or how can i do this the best and easiest? :)
>
> Either:
>
> -- Put all of your widgets (outside of the custom adapter) in separate
> layout files, or
>
> -- Construct them in Java rather than use layout XML
>
> It's conceivable to add support for loading a single layout file and
> pouring all the root's children into the list, but I don't have that in
> there right now.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Need help for your Android OSS project?http://wiki.andmob.org/hado
--~--~-~--~~~---~--~~
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] Re: Listview and scrolling

2009-09-19 Thread Wouter

Hey Mark,

The Demo from SackOfViewsAdapter looks really nice and i think this is
it what i am looking for.

But i have a layout xml file where i declarate all the widgets (yes
its a lot).
Do i have to put this layout file in seperate file (so for all that
has to come above the review list) and then do like this:

View v = LayoutInflater.from(this).inflate(your_layout_xml,..);

and then add this view to the arraylist of views? (like in the
SackOfViewsDemo).

I also have a custom adapter for my listview (list of rows)

Or how can i do this the best and easiest? :)

On 19 sep, 17:57, Mark Murphy  wrote:
> Wouter wrote:
> > Hey,
>
> > I am working on a new project now and I want to use a method as above.
> > But I hadn't used this anymore, because it doesnt worked for me..
>
> > I have this:http://snapplr.com/tp7p
>
> > So i have different widgets (TextView, ImageView) and this all in a
> > scrollview (because otherwise window doesnt scroll down when text goes
> > under page).
> > And then i have placed my listview in the scrollview? Don't know how
> > else i could do it. My view has to scroll and my listview has to be
> > under my other widgets as you can see on the image..
>
> > What is the best way i can do this? My activity is just extending
> > Activity and not ListActivity!
>
> Remember that a ListView does not have to have all of the same sort of
> row. So, I would put it all in a ListView.
>
> For similar sorts of UIs, I created the SackOfViewsAdapter and MergeAdapter:
>
> https://www.google.com/accounts/o8/id?id=AItOawnQNC70ZHdz9I0RXR03e97k...
>
> They are open source and are available off of my github page:
>
> http://github.com/commonsguy
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Looking for Android opportunities?http://wiki.andmob.org/hado
--~--~-~--~~~---~--~~
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] Re: Listview and scrolling

2009-09-19 Thread Wouter

Hey,

I am working on a new project now and I want to use a method as above.
But I hadn't used this anymore, because it doesnt worked for me..

I have this: http://snapplr.com/tp7p

So i have different widgets (TextView, ImageView) and this all in a
scrollview (because otherwise window doesnt scroll down when text goes
under page).
And then i have placed my listview in the scrollview? Don't know how
else i could do it. My view has to scroll and my listview has to be
under my other widgets as you can see on the image..

What is the best way i can do this? My activity is just extending
Activity and not ListActivity!

Wouter

On Aug 13, 5:03 pm, Wouter  wrote:
> Ok did a small test and that works. But now the other widgets also
> have a listselector (background) when going over it. How can i disable
> that?
>
> On 13 aug, 15:19, 王开发  wrote:
>
> > Hi
> >  In your ListActivity :
> >     View v = LayoutInflater.from(this).inflate(your_layout_xml,..);
> >     getListView().addHeaderView(v,);
>
> > 2009/8/13 Wouter 
>
> > > How can i use addHeaverView with widgets i have setup in the layout
> > > xml file?
>
> > > On 13 aug, 14:48, Wouter  wrote:
> > > > Is the use of  your MergeAdapter a good idea for me?
>
> > > > On 13 aug, 14:30, Mark Murphy  wrote:
>
> > > > > Wouter wrote:
> > > > > > Now the problem is. I have a scrollview and all the other views and
> > > > > > widgets are placed inside of it.
>
> > > > > One of those other widgets is a ListView. Do not put widgets that do
> > > > > their own scrolling (e.g., ListView) in a ScrollView.
>
> > > > > > How can I fix this?
>
> > > > > Come up with some other approach to your UI that does not require a
> > > > > ScrollView to wrap the ListView. For example, perhaps you can put them
> > > > > all as rows in the ListView (e.g., addHeaderView()/addFooterView()).
>
> > > > > --
> > > > > Mark Murphy (a Commons Guy)http://commonsware.com|
> > >http://twitter.com/commonsguy
>
> > > > > Warescription: Three Android Books, Plus Updates, $35/Year
--~--~-~--~~~---~--~~
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] Re: You must supply a resource ID for a TextView

2009-09-19 Thread Wouter

Do you know a solution?

On 18 sep, 19:00, Wouter  wrote:
> This is the function:
>
> public View getView(int position, View convertView, ViewGroup parent)
> {
>                 int sectionnum = 0;
>                 for(Object section : this.sections.keySet()) {
>                         Adapter adapter = sections.get(section);
>                         int size = adapter.getCount() + 1;
>
>                         // check if position inside this section
>                         if(position == 0) return headers.getView(sectionnum, 
> convertView,
> parent);
>                         if(position < size) return adapter.getView(position - 
> 1,
> convertView, parent);
>
>                         // otherwise jump into next section
>                         position -= size;
>                         sectionnum++;
>                 }
>                 return null;
>         }
>
> 93: --> if(position == 0) return headers.getView(sectionnum,
> convertView, parent);
>
> resource file:
>
> 
>          xmlns:android="http://schemas.android.com/apk/res/android";
>         android:orientation="horizontal" android:layout_width="fill_parent"
>         android:layout_height="fill_parent"
>         >
>
>             android:layout_width="60px"
>      android:layout_margin="5px"
>      android:src="@drawable/icon"
>       android:layout_height="80px">
>     
>
>          android:orientation="vertical" android:layout_width="fill_parent"
>         android:layout_height="fill_parent"
>         >
>
>          android:id="@+id/text1"
>     android:layout_width="fill_parent"
>     android:layout_height="wrap_content"
>     android:textSize="16px"
>     android:textStyle="bold"
>     android:text="FilmTitle"/>
>
>              android:orientation="horizontal"
>         android:layout_width="wrap_content"
>         android:layout_height="wrap_content"
>         >
>                   style="?android:attr/ratingBarStyleSmall"
>             android:layout_width="wrap_content"
>             android:layout_height="wrap_content"
>             android:layout_gravity="center_vertical" />
>              android:id="@+id/votes"
>     android:layout_width="fill_parent"
>     android:layout_height="wrap_content"
>         android:textSize="12px"
>     android:text="votes"/>
>     
>              android:id="@+id/genre"
>     android:layout_width="fill_parent"
>     android:layout_height="wrap_content"
>         android:textSize="12px"
>     android:text="genre"/>
>              android:id="@+id/regisseur"
>     android:layout_width="fill_parent"
>     android:layout_height="wrap_content"
>         android:textSize="12px"
>     android:text="regisseur"/>
>              android:id="@+id/acteurs"
>     android:layout_width="fill_parent"
>     android:layout_height="wrap_content"
>             android:textSize="12px"
>     android:text="acteurs"/>
>
> 
>
> 
>
> But without this seperatedlistadapter it is working (was working
> before with it too). So don't know what problem is..
>
> hope you can help me!
>
> Wouter
> On 18 sep, 18:41, "Yusuf Saib (T-Mobile USA)" 
> Mobile.com> wrote:
> > Where in your code is SeparatedListAdapter.java:93? And can you post
> > the resource xml as well?
>
> > Yusuf Saib
> > Android
> > ·T· · ·Mobile· stick together
> > The views, opinions and statements in this email are those of the
> > author solely in their individual capacity, and do not necessarily
> > represent those of T-Mobile USA, Inc.
>
> > On Sep 18, 7:16 am, Wouter  wrote:
>
> > > I removed my seperatedlistadapter and now it worked.. :s But it was
> > > working before with my seperatedlistadapter :(
>
> > > On 18 sep, 14:47, Wouter  wrote:
>
> > > > Really dont find what the problem is, the weird is it worked and i
> > > > havent changed anything :(
>
> > > > On 18 sep, 12:02, Wouter  wrote:
>
> > > > > Hey,
>
> > > > > I have a weird problem. For days i have a working list with movie
> > > > > details i get from an xml rpc source. It loads the list very well and
> > > > > I t

[android-developers] Re: How do I start a new activity inside a tab? TabSpec.setContent(Intent) doesn't appear to work

2009-09-19 Thread Wouter

Hmm this is not working..

Got error, probably problem with tabonchangelistener..

Can you post an example of that?

On 18 sep, 22:44, "nEx.Software"  wrote:
> Well, I'm not sure why you would get the TabSpec there, but I
> personally would replace:
>
> return;
>
> with something like:
>
> invokeOnTabChangeListener();
> return;
>
> Of course, this is not ideal because it is not a "change"...
> You could modify the interface to include an onTabReselected() method
> to keep the logic separate.
>
> On Sep 18, 1:16 pm, Wouter  wrote:
>
> > Trying your second option now, but does not work..
>
> >         if (index == mCurrentTab) {
> >                 mTabSpecs.get(mCurrentTab);
> >         }
>
> > Not correct right? :s
>
> > On 18 sep, 22:06, "nEx.Software"  wrote:
>
> > > Well, you could put a button in the MovieDetail to go back to Cinema
> > > list, or you could modify the setCurrentTab in TabHost to not bail out
> > > when clicking the already active tab. See lines 324-326.
>
> > > On Sep 18, 1:01 pm, Wouter  wrote:
>
> > > > Ok this works when i go to other tab and go back to original tab.
>
> > > > So if i open MovieDetail in CinemaActivity (cinema tab), cinema got
> > > > replaces by MovieDetail. if i open Video tab and go back to Cinema, it
> > > > shows cinemaActivity again, this is good!
>
> > > > But when i open MovieDetail in CInemaActivity (cinema tab) and click
> > > > on cinema tab again, it doesnt change.. It has to load cinemaActivity
> > > > again..
>
> > > > Code:
>
> > > > mTabHost.setOnTabChangedListener(new
> > > > my.android.widget.TabHost.OnTabChangeListener() {
>
> > > >           �...@override
> > > >            public void onTabChanged(String arg0) {
> > > >                 int selectedTab = mTabHost.getCurrentTab();
> > > >                 System.out.println("TAB: " + selectedTab);
>
> > > >                 if (selectedTab == 0)
> > > >                 {
> > > >                         refreshCinemaTab();
> > > >                 }
> > > >            }
> > > >       });
>
> > > >     }
>
> > > >     public void refreshCinemaTab()
> > > >     {
> > > >         cinema.replaceContent(new android.content.Intent(this,
> > > > CinemaActivity.class));
> > > >     }
>
> > > > And cinema --> tab 0
>
> > > > How can i do this?
>
> > > > On 18 sep, 19:28, "nEx.Software"  wrote:
>
> > > > > Register an OnTabChangeListener in your tab activity and handle it in
> > > > > there.
>
> > > > > On Sep 18, 10:10 am, Wouter  wrote:
>
> > > > > > How can i do that?  It initates the tabs on create but when happens
> > > > > > when i click on tab again.. where do i have to place the
> > > > > > replaceContent code?
>
> > > > > > On 18 sep, 19:01, "nEx.Software"  
> > > > > > wrote:
>
> > > > > > > You'll have to replace the content again. :)
>
> > > > > > > On Sep 18, 9:58 am, Wouter  wrote:
>
> > > > > > > > Nice works great!
>
> > > > > > > > But when i switch to other tab and go back to cinema tab my
> > > > > > > > MovieDetail is still open and when i click on Cinema in tabs it 
> > > > > > > > doest
> > > > > > > > change to my cinema activity..
>
> > > > > > > > How can i go back now?
>
> > > > > > > > On 18 sep, 18:49, "nEx.Software"  
> > > > > > > > wrote:
>
> > > > > > > > > Well, you could do it a couple ways... One way, for example:
>
> > > > > > > > > In CinemaActivity:
>
> > > > > > > > > Home parentActivity = ((Home) this.getParent());
> > > > > > > > > parentActivity.cinema.replaceContent(new 
> > > > > > > > > android.content.Intent(this,
> > > > > > > > > MovieDetail.class))
>
> > > > > > > > > On Sep 18, 9:30 am, Wouter  wrote:
>
> > > > > > > > > > Hey,
>
> > > > > > > > > > Thank you!
>
> > > > > > > > > >

[android-developers] Re: How do I start a new activity inside a tab? TabSpec.setContent(Intent) doesn't appear to work

2009-09-18 Thread Wouter

Trying your second option now, but does not work..

if (index == mCurrentTab) {
mTabSpecs.get(mCurrentTab);
}

Not correct right? :s

On 18 sep, 22:06, "nEx.Software"  wrote:
> Well, you could put a button in the MovieDetail to go back to Cinema
> list, or you could modify the setCurrentTab in TabHost to not bail out
> when clicking the already active tab. See lines 324-326.
>
> On Sep 18, 1:01 pm, Wouter  wrote:
>
> > Ok this works when i go to other tab and go back to original tab.
>
> > So if i open MovieDetail in CinemaActivity (cinema tab), cinema got
> > replaces by MovieDetail. if i open Video tab and go back to Cinema, it
> > shows cinemaActivity again, this is good!
>
> > But when i open MovieDetail in CInemaActivity (cinema tab) and click
> > on cinema tab again, it doesnt change.. It has to load cinemaActivity
> > again..
>
> > Code:
>
> > mTabHost.setOnTabChangedListener(new
> > my.android.widget.TabHost.OnTabChangeListener() {
>
> >           �...@override
> >            public void onTabChanged(String arg0) {
> >                 int selectedTab = mTabHost.getCurrentTab();
> >                 System.out.println("TAB: " + selectedTab);
>
> >                 if (selectedTab == 0)
> >                 {
> >                         refreshCinemaTab();
> >                 }
> >            }
> >       });
>
> >     }
>
> >     public void refreshCinemaTab()
> >     {
> >         cinema.replaceContent(new android.content.Intent(this,
> > CinemaActivity.class));
> >     }
>
> > And cinema --> tab 0
>
> > How can i do this?
>
> > On 18 sep, 19:28, "nEx.Software"  wrote:
>
> > > Register an OnTabChangeListener in your tab activity and handle it in
> > > there.
>
> > > On Sep 18, 10:10 am, Wouter  wrote:
>
> > > > How can i do that?  It initates the tabs on create but when happens
> > > > when i click on tab again.. where do i have to place the
> > > > replaceContent code?
>
> > > > On 18 sep, 19:01, "nEx.Software"  wrote:
>
> > > > > You'll have to replace the content again. :)
>
> > > > > On Sep 18, 9:58 am, Wouter  wrote:
>
> > > > > > Nice works great!
>
> > > > > > But when i switch to other tab and go back to cinema tab my
> > > > > > MovieDetail is still open and when i click on Cinema in tabs it 
> > > > > > doest
> > > > > > change to my cinema activity..
>
> > > > > > How can i go back now?
>
> > > > > > On 18 sep, 18:49, "nEx.Software"  
> > > > > > wrote:
>
> > > > > > > Well, you could do it a couple ways... One way, for example:
>
> > > > > > > In CinemaActivity:
>
> > > > > > > Home parentActivity = ((Home) this.getParent());
> > > > > > > parentActivity.cinema.replaceContent(new 
> > > > > > > android.content.Intent(this,
> > > > > > > MovieDetail.class))
>
> > > > > > > On Sep 18, 9:30 am, Wouter  wrote:
>
> > > > > > > > Hey,
>
> > > > > > > > Thank you!
>
> > > > > > > > But I have some questions..
>
> > > > > > > > I now declarate my tabs in Home.java (my tabs are now at 
> > > > > > > > bottom).
> > > > > > > > I have 4 tabs: Cinema, Video,TV and search.
>
> > > > > > > > These 4 tabs are 4 different activities with lists. When i 
> > > > > > > > click on a
> > > > > > > > list item in cinema activity I have to open MovieDetail.java 
> > > > > > > > (now it
> > > > > > > > opens in new activity without tabs) and the tabs have to stay 
> > > > > > > > at the
> > > > > > > > bottom.
> > > > > > > > But how can i reach my custom tabspec cinema in CInemaActivity 
> > > > > > > > so i
> > > > > > > > can do replaceContent --> cinema.replaceContent(new
> > > > > > > > android.content.Intent(this, MovieDetail.class));
>
> > > > > > > > Wouter
>
> > > > > > > > On 18 sep, 17:51, "nEx.Software"  
> > > > > > > > wrote:
>
>

[android-developers] Re: How do I start a new activity inside a tab? TabSpec.setContent(Intent) doesn't appear to work

2009-09-18 Thread Wouter

Ok this works when i go to other tab and go back to original tab.

So if i open MovieDetail in CinemaActivity (cinema tab), cinema got
replaces by MovieDetail. if i open Video tab and go back to Cinema, it
shows cinemaActivity again, this is good!

But when i open MovieDetail in CInemaActivity (cinema tab) and click
on cinema tab again, it doesnt change.. It has to load cinemaActivity
again..

Code:

mTabHost.setOnTabChangedListener(new
my.android.widget.TabHost.OnTabChangeListener() {

   @Override
   public void onTabChanged(String arg0) {
int selectedTab = mTabHost.getCurrentTab();
System.out.println("TAB: " + selectedTab);

if (selectedTab == 0)
{
refreshCinemaTab();
}
   }
  });


}

public void refreshCinemaTab()
{
cinema.replaceContent(new android.content.Intent(this,
CinemaActivity.class));
}

And cinema --> tab 0

How can i do this?

On 18 sep, 19:28, "nEx.Software"  wrote:
> Register an OnTabChangeListener in your tab activity and handle it in
> there.
>
> On Sep 18, 10:10 am, Wouter  wrote:
>
> > How can i do that?  It initates the tabs on create but when happens
> > when i click on tab again.. where do i have to place the
> > replaceContent code?
>
> > On 18 sep, 19:01, "nEx.Software"  wrote:
>
> > > You'll have to replace the content again. :)
>
> > > On Sep 18, 9:58 am, Wouter  wrote:
>
> > > > Nice works great!
>
> > > > But when i switch to other tab and go back to cinema tab my
> > > > MovieDetail is still open and when i click on Cinema in tabs it doest
> > > > change to my cinema activity..
>
> > > > How can i go back now?
>
> > > > On 18 sep, 18:49, "nEx.Software"  wrote:
>
> > > > > Well, you could do it a couple ways... One way, for example:
>
> > > > > In CinemaActivity:
>
> > > > > Home parentActivity = ((Home) this.getParent());
> > > > > parentActivity.cinema.replaceContent(new android.content.Intent(this,
> > > > > MovieDetail.class))
>
> > > > > On Sep 18, 9:30 am, Wouter  wrote:
>
> > > > > > Hey,
>
> > > > > > Thank you!
>
> > > > > > But I have some questions..
>
> > > > > > I now declarate my tabs in Home.java (my tabs are now at bottom).
> > > > > > I have 4 tabs: Cinema, Video,TV and search.
>
> > > > > > These 4 tabs are 4 different activities with lists. When i click on 
> > > > > > a
> > > > > > list item in cinema activity I have to open MovieDetail.java (now it
> > > > > > opens in new activity without tabs) and the tabs have to stay at the
> > > > > > bottom.
> > > > > > But how can i reach my custom tabspec cinema in CInemaActivity so i
> > > > > > can do replaceContent --> cinema.replaceContent(new
> > > > > > android.content.Intent(this, MovieDetail.class));
>
> > > > > > Wouter
>
> > > > > > On 18 sep, 17:51, "nEx.Software"  
> > > > > > wrote:
>
> > > > > > > I was planning on writing a full blown tutorial but since I can 
> > > > > > > tell
> > > > > > > you are anxious to see it... This is a 1.5 compatible version that
> > > > > > > uses modified versions of the TabActivity, TabHost, and TabWidget 
> > > > > > > (and
> > > > > > > related resources) from Android 1.6. There are obvious things that
> > > > > > > could be done better but the idea is there and should at least 
> > > > > > > get you
> > > > > > > headed in the "right" direction.
>
> > > > > > >http://nexsoftware.net/Android/Tutorials/CustomTabActivity.zip
>
> > > > > > > On Sep 18, 6:36 am, Wouter  wrote:
>
> > > > > > > > Thank you so much!
>
> > > > > > > > On Sep 18, 3:03 pm, "nEx.Software" 
> > > > > > > > 
> > > > > > > > wrote:
>
> > > > > > > > > Sure, I'll throw together a quick sample and post it in a bit.
>
> > > > > > > > > On Sep 18, 12:11 am, Wouter  wrote:
>
> > > > > > > > > > And can you post the source code from this and your other 
>

[android-developers] Re: How do I start a new activity inside a tab? TabSpec.setContent(Intent) doesn't appear to work

2009-09-18 Thread Wouter

How can i do that?  It initates the tabs on create but when happens
when i click on tab again.. where do i have to place the
replaceContent code?

On 18 sep, 19:01, "nEx.Software"  wrote:
> You'll have to replace the content again. :)
>
> On Sep 18, 9:58 am, Wouter  wrote:
>
> > Nice works great!
>
> > But when i switch to other tab and go back to cinema tab my
> > MovieDetail is still open and when i click on Cinema in tabs it doest
> > change to my cinema activity..
>
> > How can i go back now?
>
> > On 18 sep, 18:49, "nEx.Software"  wrote:
>
> > > Well, you could do it a couple ways... One way, for example:
>
> > > In CinemaActivity:
>
> > > Home parentActivity = ((Home) this.getParent());
> > > parentActivity.cinema.replaceContent(new android.content.Intent(this,
> > > MovieDetail.class))
>
> > > On Sep 18, 9:30 am, Wouter  wrote:
>
> > > > Hey,
>
> > > > Thank you!
>
> > > > But I have some questions..
>
> > > > I now declarate my tabs in Home.java (my tabs are now at bottom).
> > > > I have 4 tabs: Cinema, Video,TV and search.
>
> > > > These 4 tabs are 4 different activities with lists. When i click on a
> > > > list item in cinema activity I have to open MovieDetail.java (now it
> > > > opens in new activity without tabs) and the tabs have to stay at the
> > > > bottom.
> > > > But how can i reach my custom tabspec cinema in CInemaActivity so i
> > > > can do replaceContent --> cinema.replaceContent(new
> > > > android.content.Intent(this, MovieDetail.class));
>
> > > > Wouter
>
> > > > On 18 sep, 17:51, "nEx.Software"  wrote:
>
> > > > > I was planning on writing a full blown tutorial but since I can tell
> > > > > you are anxious to see it... This is a 1.5 compatible version that
> > > > > uses modified versions of the TabActivity, TabHost, and TabWidget (and
> > > > > related resources) from Android 1.6. There are obvious things that
> > > > > could be done better but the idea is there and should at least get you
> > > > > headed in the "right" direction.
>
> > > > >http://nexsoftware.net/Android/Tutorials/CustomTabActivity.zip
>
> > > > > On Sep 18, 6:36 am, Wouter  wrote:
>
> > > > > > Thank you so much!
>
> > > > > > On Sep 18, 3:03 pm, "nEx.Software" 
> > > > > > wrote:
>
> > > > > > > Sure, I'll throw together a quick sample and post it in a bit.
>
> > > > > > > On Sep 18, 12:11 am, Wouter  wrote:
>
> > > > > > > > And can you post the source code from this and your other 
> > > > > > > > example
> > > > > > > > please?
>
> > > > > > > > On 17 sep, 23:50, "nEx.Software"  
> > > > > > > > wrote:
>
> > > > > > > > > It just worked for me...
>
> > > > > > > > > That being said, I have also copied all of the relevant code 
> > > > > > > > > from the
> > > > > > > > > Android Open Source Project, added a replaceContent(Intent 
> > > > > > > > > intent)
> > > > > > > > > method, and done the same thing as before but without the 
> > > > > > > > > switching to
> > > > > > > > > a new tab first... Again, I am almost positive that this is 
> > > > > > > > > not the
> > > > > > > > > correct way to do this so I hesitate to recommend it. I can't 
> > > > > > > > > say
> > > > > > > > > exactly what happens to the Activity, to be honest. It may be 
> > > > > > > > > hanging
> > > > > > > > > out in limbo.
>
> > > > > > > > > On Sep 17, 2:44 pm, Wouter  wrote:
>
> > > > > > > > > > But i want to show this new activity in the same active 
> > > > > > > > > > tab. now it
> > > > > > > > > > opens in a new activity without showing my 3 tabs..
>
> > > > > > > > > > On 17 sep, 23:28, "nEx.Software" 
> > > > > > > > > >  wrote:
>
> > > > > > > > 

[android-developers] Re: You must supply a resource ID for a TextView

2009-09-18 Thread Wouter

This is the function:

public View getView(int position, View convertView, ViewGroup parent)
{
int sectionnum = 0;
for(Object section : this.sections.keySet()) {
Adapter adapter = sections.get(section);
int size = adapter.getCount() + 1;

// check if position inside this section
if(position == 0) return headers.getView(sectionnum, 
convertView,
parent);
if(position < size) return adapter.getView(position - 1,
convertView, parent);

// otherwise jump into next section
position -= size;
sectionnum++;
}
return null;
}

93: --> if(position == 0) return headers.getView(sectionnum,
convertView, parent);

resource file:


http://schemas.android.com/apk/res/android";
android:orientation="horizontal" android:layout_width="fill_parent"
android:layout_height="fill_parent"
>

  







 










But without this seperatedlistadapter it is working (was working
before with it too). So don't know what problem is..

hope you can help me!

Wouter
On 18 sep, 18:41, "Yusuf Saib (T-Mobile USA)"  wrote:
> Where in your code is SeparatedListAdapter.java:93? And can you post
> the resource xml as well?
>
> Yusuf Saib
> Android
> ·T· · ·Mobile· stick together
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
>
> On Sep 18, 7:16 am, Wouter  wrote:
>
> > I removed my seperatedlistadapter and now it worked.. :s But it was
> > working before with my seperatedlistadapter :(
>
> > On 18 sep, 14:47, Wouter  wrote:
>
> > > Really dont find what the problem is, the weird is it worked and i
> > > havent changed anything :(
>
> > > On 18 sep, 12:02, Wouter  wrote:
>
> > > > Hey,
>
> > > > I have a weird problem. For days i have a working list with movie
> > > > details i get from an xml rpc source. It loads the list very well and
> > > > I tried it again today and when i scroll down, always at the same list
> > > > item it gives me this error. I don't know what the problem is. It
> > > > shows my list items very good and now not anymore. If you want i can
> > > > give you my source code too! And it worked a few days ago and now
> > > > suddenty not :(
>
> > > > 09-18 11:50:00.940: ERROR/ArrayAdapter(1561): You must supply a
> > > > resource ID for a TextView
> > > > 09-18 11:50:00.950: DEBUG/AndroidRuntime(1561): Shutting down VM
> > > > 09-18 11:50:00.950: WARN/dalvikvm(1561): threadid=3: thread exiting
> > > > with uncaught exception (group=0x4001aa28)
> > > > 09-18 11:50:00.950: ERROR/AndroidRuntime(1561): Uncaught handler:
> > > > thread main exiting due to uncaught exception
> > > > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):
> > > > java.lang.IllegalStateException: ArrayAdapter requires the resource ID
> > > > to be a TextView
> > > > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > > > android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:
> > > > 347)
> > > > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > > > android.widget.ArrayAdapter.getView(ArrayAdapter.java:323)
> > > > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > > > com.android.moviemeter.SeparatedListAdapter.getView
> > > > (SeparatedListAdapter.java:93)
> > > > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > > > android.widget.AbsListView.obtainView(AbsListView.java:1255)
> > > > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > > > android.widget.ListView.addViewBelow(ListView.java:2795)
> > > > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > > > android.widget.ListView.scrollListItemsBy(ListView.java:2725)
> > > > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > > > android.widget.ListView.arrowScrollImpl(ListView.java:2225)
> > > > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > > > android.widget.ListView.arrowScroll(ListView.java:2172)
> > > > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > > > android.widget.ListView.commonKey(ListView.java:1977)
> > > > 09-18 11:50:00.990: ERROR

[android-developers] Re: How do I start a new activity inside a tab? TabSpec.setContent(Intent) doesn't appear to work

2009-09-18 Thread Wouter

Nice works great!

But when i switch to other tab and go back to cinema tab my
MovieDetail is still open and when i click on Cinema in tabs it doest
change to my cinema activity..

How can i go back now?

On 18 sep, 18:49, "nEx.Software"  wrote:
> Well, you could do it a couple ways... One way, for example:
>
> In CinemaActivity:
>
> Home parentActivity = ((Home) this.getParent());
> parentActivity.cinema.replaceContent(new android.content.Intent(this,
> MovieDetail.class))
>
> On Sep 18, 9:30 am, Wouter  wrote:
>
> > Hey,
>
> > Thank you!
>
> > But I have some questions..
>
> > I now declarate my tabs in Home.java (my tabs are now at bottom).
> > I have 4 tabs: Cinema, Video,TV and search.
>
> > These 4 tabs are 4 different activities with lists. When i click on a
> > list item in cinema activity I have to open MovieDetail.java (now it
> > opens in new activity without tabs) and the tabs have to stay at the
> > bottom.
> > But how can i reach my custom tabspec cinema in CInemaActivity so i
> > can do replaceContent --> cinema.replaceContent(new
> > android.content.Intent(this, MovieDetail.class));
>
> > Wouter
>
> > On 18 sep, 17:51, "nEx.Software"  wrote:
>
> > > I was planning on writing a full blown tutorial but since I can tell
> > > you are anxious to see it... This is a 1.5 compatible version that
> > > uses modified versions of the TabActivity, TabHost, and TabWidget (and
> > > related resources) from Android 1.6. There are obvious things that
> > > could be done better but the idea is there and should at least get you
> > > headed in the "right" direction.
>
> > >http://nexsoftware.net/Android/Tutorials/CustomTabActivity.zip
>
> > > On Sep 18, 6:36 am, Wouter  wrote:
>
> > > > Thank you so much!
>
> > > > On Sep 18, 3:03 pm, "nEx.Software" 
> > > > wrote:
>
> > > > > Sure, I'll throw together a quick sample and post it in a bit.
>
> > > > > On Sep 18, 12:11 am, Wouter  wrote:
>
> > > > > > And can you post the source code from this and your other example
> > > > > > please?
>
> > > > > > On 17 sep, 23:50, "nEx.Software"  
> > > > > > wrote:
>
> > > > > > > It just worked for me...
>
> > > > > > > That being said, I have also copied all of the relevant code from 
> > > > > > > the
> > > > > > > Android Open Source Project, added a replaceContent(Intent intent)
> > > > > > > method, and done the same thing as before but without the 
> > > > > > > switching to
> > > > > > > a new tab first... Again, I am almost positive that this is not 
> > > > > > > the
> > > > > > > correct way to do this so I hesitate to recommend it. I can't say
> > > > > > > exactly what happens to the Activity, to be honest. It may be 
> > > > > > > hanging
> > > > > > > out in limbo.
>
> > > > > > > On Sep 17, 2:44 pm, Wouter  wrote:
>
> > > > > > > > But i want to show this new activity in the same active tab. 
> > > > > > > > now it
> > > > > > > > opens in a new activity without showing my 3 tabs..
>
> > > > > > > > On 17 sep, 23:28, "nEx.Software"  
> > > > > > > > wrote:
>
> > > > > > > > > It seems you cannot change the Activity of the current tab 
> > > > > > > > > using
> > > > > > > > > setContent(); That being said... Doing something you really 
> > > > > > > > > probably
> > > > > > > > > should not do, you can get this to work: Programmatically 
> > > > > > > > > switch to
> > > > > > > > > another tab (something like getTabHost().setCurrentTab(1);), 
> > > > > > > > > then do
> > > > > > > > > MainTabActivity.projectTab.setContent(i);, then go back to the
> > > > > > > > > original tab (something like getTabHost().setCurrentTab(0);). 
> > > > > > > > > Like I
> > > > > > > > > said though... this is probably not something you should do.
>
> > > > > > > > > On Sep 17, 1:52 pm, Wouter  wrote:
>
> > >

[android-developers] Re: How do I start a new activity inside a tab? TabSpec.setContent(Intent) doesn't appear to work

2009-09-18 Thread Wouter

Hey,

Thank you!

But I have some questions..

I now declarate my tabs in Home.java (my tabs are now at bottom).
I have 4 tabs: Cinema, Video,TV and search.

These 4 tabs are 4 different activities with lists. When i click on a
list item in cinema activity I have to open MovieDetail.java (now it
opens in new activity without tabs) and the tabs have to stay at the
bottom.
But how can i reach my custom tabspec cinema in CInemaActivity so i
can do replaceContent --> cinema.replaceContent(new
android.content.Intent(this, MovieDetail.class));

Wouter

On 18 sep, 17:51, "nEx.Software"  wrote:
> I was planning on writing a full blown tutorial but since I can tell
> you are anxious to see it... This is a 1.5 compatible version that
> uses modified versions of the TabActivity, TabHost, and TabWidget (and
> related resources) from Android 1.6. There are obvious things that
> could be done better but the idea is there and should at least get you
> headed in the "right" direction.
>
> http://nexsoftware.net/Android/Tutorials/CustomTabActivity.zip
>
> On Sep 18, 6:36 am, Wouter  wrote:
>
> > Thank you so much!
>
> > On Sep 18, 3:03 pm, "nEx.Software" 
> > wrote:
>
> > > Sure, I'll throw together a quick sample and post it in a bit.
>
> > > On Sep 18, 12:11 am, Wouter  wrote:
>
> > > > And can you post the source code from this and your other example
> > > > please?
>
> > > > On 17 sep, 23:50, "nEx.Software"  wrote:
>
> > > > > It just worked for me...
>
> > > > > That being said, I have also copied all of the relevant code from the
> > > > > Android Open Source Project, added a replaceContent(Intent intent)
> > > > > method, and done the same thing as before but without the switching to
> > > > > a new tab first... Again, I am almost positive that this is not the
> > > > > correct way to do this so I hesitate to recommend it. I can't say
> > > > > exactly what happens to the Activity, to be honest. It may be hanging
> > > > > out in limbo.
>
> > > > > On Sep 17, 2:44 pm, Wouter  wrote:
>
> > > > > > But i want to show this new activity in the same active tab. now it
> > > > > > opens in a new activity without showing my 3 tabs..
>
> > > > > > On 17 sep, 23:28, "nEx.Software"  
> > > > > > wrote:
>
> > > > > > > It seems you cannot change the Activity of the current tab using
> > > > > > > setContent(); That being said... Doing something you really 
> > > > > > > probably
> > > > > > > should not do, you can get this to work: Programmatically switch 
> > > > > > > to
> > > > > > > another tab (something like getTabHost().setCurrentTab(1);), then 
> > > > > > > do
> > > > > > > MainTabActivity.projectTab.setContent(i);, then go back to the
> > > > > > > original tab (something like getTabHost().setCurrentTab(0);). 
> > > > > > > Like I
> > > > > > > said though... this is probably not something you should do.
>
> > > > > > > On Sep 17, 1:52 pm, Wouter  wrote:
>
> > > > > > > > Does someone has found an easy solution for this? I have the 
> > > > > > > > same
> > > > > > > > issue. I have 3 tabs and I want to show a new activity in one 
> > > > > > > > of these
> > > > > > > > tabs!
>
> > > > > > > > Wouter
>
> > > > > > > > On Aug 12, 3:47 pm, Sena  wrote:
>
> > > > > > > > > Thanks for the pointers Mark.
> > > > > > > > > S
>
> > > > > > > > > On Aug 12, 3:16 pm, Mark Murphy  
> > > > > > > > > wrote:
>
> > > > > > > > > > Sena Gbeckor-Kove wrote:
> > > > > > > > > > > Thanks for the tip. Can you point me at what I need to be 
> > > > > > > > > > > looking up to
> > > > > > > > > > > find the documentation about changing the 
> > > > > > > > > > > viewinsidetheTab?
>
> > > > > > > > > > You don't change the Viewinsideof atab. You cause the 
> > > > > > > > > > existing View
> > > > > > > > > > to show something else (e.g., u

[android-developers] Re: You must supply a resource ID for a TextView

2009-09-18 Thread Wouter

I removed my seperatedlistadapter and now it worked.. :s But it was
working before with my seperatedlistadapter :(

On 18 sep, 14:47, Wouter  wrote:
> Really dont find what the problem is, the weird is it worked and i
> havent changed anything :(
>
> On 18 sep, 12:02, Wouter  wrote:
>
> > Hey,
>
> > I have a weird problem. For days i have a working list with movie
> > details i get from an xml rpc source. It loads the list very well and
> > I tried it again today and when i scroll down, always at the same list
> > item it gives me this error. I don't know what the problem is. It
> > shows my list items very good and now not anymore. If you want i can
> > give you my source code too! And it worked a few days ago and now
> > suddenty not :(
>
> > 09-18 11:50:00.940: ERROR/ArrayAdapter(1561): You must supply a
> > resource ID for a TextView
> > 09-18 11:50:00.950: DEBUG/AndroidRuntime(1561): Shutting down VM
> > 09-18 11:50:00.950: WARN/dalvikvm(1561): threadid=3: thread exiting
> > with uncaught exception (group=0x4001aa28)
> > 09-18 11:50:00.950: ERROR/AndroidRuntime(1561): Uncaught handler:
> > thread main exiting due to uncaught exception
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):
> > java.lang.IllegalStateException: ArrayAdapter requires the resource ID
> > to be a TextView
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:
> > 347)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > android.widget.ArrayAdapter.getView(ArrayAdapter.java:323)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > com.android.moviemeter.SeparatedListAdapter.getView
> > (SeparatedListAdapter.java:93)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > android.widget.AbsListView.obtainView(AbsListView.java:1255)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > android.widget.ListView.addViewBelow(ListView.java:2795)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > android.widget.ListView.scrollListItemsBy(ListView.java:2725)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > android.widget.ListView.arrowScrollImpl(ListView.java:2225)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > android.widget.ListView.arrowScroll(ListView.java:2172)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > android.widget.ListView.commonKey(ListView.java:1977)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > android.widget.ListView.onKeyDown(ListView.java:1924)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > android.view.KeyEvent.dispatch(KeyEvent.java:893)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > android.view.View.dispatchKeyEvent(View.java:3647)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:744)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > android.widget.ListView.dispatchKeyEvent(ListView.java:1909)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > com.android.internal.policy.impl.PhoneWindow
> > $DecorView.superDispatchKeyEvent(PhoneWindow.java:1708)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent
> > (PhoneWindow.java:1197)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > android.app.Activity.dispatchKeyEvent(Activity.java:1967)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent
> > (PhoneWindow.java:1684)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > android.widget.TabHost.dispatchKeyEvent(TabHost.java:272)
> > 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> > android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
> > 09-1

[android-developers] Re: How do I start a new activity inside a tab? TabSpec.setContent(Intent) doesn't appear to work

2009-09-18 Thread Wouter

Thank you so much!

On Sep 18, 3:03 pm, "nEx.Software" 
wrote:
> Sure, I'll throw together a quick sample and post it in a bit.
>
> On Sep 18, 12:11 am, Wouter  wrote:
>
> > And can you post the source code from this and your other example
> > please?
>
> > On 17 sep, 23:50, "nEx.Software"  wrote:
>
> > > It just worked for me...
>
> > > That being said, I have also copied all of the relevant code from the
> > > Android Open Source Project, added a replaceContent(Intent intent)
> > > method, and done the same thing as before but without the switching to
> > > a new tab first... Again, I am almost positive that this is not the
> > > correct way to do this so I hesitate to recommend it. I can't say
> > > exactly what happens to the Activity, to be honest. It may be hanging
> > > out in limbo.
>
> > > On Sep 17, 2:44 pm, Wouter  wrote:
>
> > > > But i want to show this new activity in the same active tab. now it
> > > > opens in a new activity without showing my 3 tabs..
>
> > > > On 17 sep, 23:28, "nEx.Software"  wrote:
>
> > > > > It seems you cannot change the Activity of the current tab using
> > > > > setContent(); That being said... Doing something you really probably
> > > > > should not do, you can get this to work: Programmatically switch to
> > > > > another tab (something like getTabHost().setCurrentTab(1);), then do
> > > > > MainTabActivity.projectTab.setContent(i);, then go back to the
> > > > > original tab (something like getTabHost().setCurrentTab(0);). Like I
> > > > > said though... this is probably not something you should do.
>
> > > > > On Sep 17, 1:52 pm, Wouter  wrote:
>
> > > > > > Does someone has found an easy solution for this? I have the same
> > > > > > issue. I have 3 tabs and I want to show a new activity in one of 
> > > > > > these
> > > > > > tabs!
>
> > > > > > Wouter
>
> > > > > > On Aug 12, 3:47 pm, Sena  wrote:
>
> > > > > > > Thanks for the pointers Mark.
> > > > > > > S
>
> > > > > > > On Aug 12, 3:16 pm, Mark Murphy  wrote:
>
> > > > > > > > Sena Gbeckor-Kove wrote:
> > > > > > > > > Thanks for the tip. Can you point me at what I need to be 
> > > > > > > > > looking up to
> > > > > > > > > find the documentation about changing the viewinsidetheTab?
>
> > > > > > > > You don't change the Viewinsideof atab. You cause the existing 
> > > > > > > > View
> > > > > > > > to show something else (e.g., use FrameLayout and make one 
> > > > > > > > layer VISIBLE
> > > > > > > > and another layer GONE, or use ViewFlipper to swap between 
> > > > > > > > contents).
>
> > > > > > > > You *might* be able to get setContent() to replace the current 
> > > > > > > > View by
> > > > > > > > passing in another layout ID or TabContentFactory, but I'm 
> > > > > > > > skeptical
> > > > > > > > this will work.
>
> > > > > > > > Thetabwidget framework in Android is designed for simple stuff. 
> > > > > > > > You
> > > > > > > > may wish to grab the source code for the relevant classes out 
> > > > > > > > of Android
> > > > > > > > and make your own version that handles your own scenario.
>
> > > > > > > > --
> > > > > > > > Mark Murphy (a Commons 
> > > > > > > > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > > > > > > > Warescription: Three Android Books, Plus Updates, $35/Year
--~--~-~--~~~---~--~~
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] Re: You must supply a resource ID for a TextView

2009-09-18 Thread Wouter

Really dont find what the problem is, the weird is it worked and i
havent changed anything :(

On 18 sep, 12:02, Wouter  wrote:
> Hey,
>
> I have a weird problem. For days i have a working list with movie
> details i get from an xml rpc source. It loads the list very well and
> I tried it again today and when i scroll down, always at the same list
> item it gives me this error. I don't know what the problem is. It
> shows my list items very good and now not anymore. If you want i can
> give you my source code too! And it worked a few days ago and now
> suddenty not :(
>
> 09-18 11:50:00.940: ERROR/ArrayAdapter(1561): You must supply a
> resource ID for a TextView
> 09-18 11:50:00.950: DEBUG/AndroidRuntime(1561): Shutting down VM
> 09-18 11:50:00.950: WARN/dalvikvm(1561): threadid=3: thread exiting
> with uncaught exception (group=0x4001aa28)
> 09-18 11:50:00.950: ERROR/AndroidRuntime(1561): Uncaught handler:
> thread main exiting due to uncaught exception
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):
> java.lang.IllegalStateException: ArrayAdapter requires the resource ID
> to be a TextView
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:
> 347)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.widget.ArrayAdapter.getView(ArrayAdapter.java:323)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> com.android.moviemeter.SeparatedListAdapter.getView
> (SeparatedListAdapter.java:93)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.widget.AbsListView.obtainView(AbsListView.java:1255)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.widget.ListView.addViewBelow(ListView.java:2795)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.widget.ListView.scrollListItemsBy(ListView.java:2725)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.widget.ListView.arrowScrollImpl(ListView.java:2225)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.widget.ListView.arrowScroll(ListView.java:2172)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.widget.ListView.commonKey(ListView.java:1977)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.widget.ListView.onKeyDown(ListView.java:1924)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.view.KeyEvent.dispatch(KeyEvent.java:893)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.view.View.dispatchKeyEvent(View.java:3647)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:744)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.widget.ListView.dispatchKeyEvent(ListView.java:1909)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> com.android.internal.policy.impl.PhoneWindow
> $DecorView.superDispatchKeyEvent(PhoneWindow.java:1708)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent
> (PhoneWindow.java:1197)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.app.Activity.dispatchKeyEvent(Activity.java:1967)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent
> (PhoneWindow.java:1684)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.widget.TabHost.dispatchKeyEvent(TabHost.java:272)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> com.android.internal.policy.impl.PhoneWindow
> $DecorView.superDispatchKeyEvent(PhoneWindow.java:1708)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent
> (PhoneWindow.java:1197)
> 09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
> android.app

[android-developers] You must supply a resource ID for a TextView

2009-09-18 Thread Wouter

Hey,

I have a weird problem. For days i have a working list with movie
details i get from an xml rpc source. It loads the list very well and
I tried it again today and when i scroll down, always at the same list
item it gives me this error. I don't know what the problem is. It
shows my list items very good and now not anymore. If you want i can
give you my source code too! And it worked a few days ago and now
suddenty not :(

09-18 11:50:00.940: ERROR/ArrayAdapter(1561): You must supply a
resource ID for a TextView
09-18 11:50:00.950: DEBUG/AndroidRuntime(1561): Shutting down VM
09-18 11:50:00.950: WARN/dalvikvm(1561): threadid=3: thread exiting
with uncaught exception (group=0x4001aa28)
09-18 11:50:00.950: ERROR/AndroidRuntime(1561): Uncaught handler:
thread main exiting due to uncaught exception
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):
java.lang.IllegalStateException: ArrayAdapter requires the resource ID
to be a TextView
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:
347)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.widget.ArrayAdapter.getView(ArrayAdapter.java:323)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
com.android.moviemeter.SeparatedListAdapter.getView
(SeparatedListAdapter.java:93)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.widget.AbsListView.obtainView(AbsListView.java:1255)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.widget.ListView.addViewBelow(ListView.java:2795)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.widget.ListView.scrollListItemsBy(ListView.java:2725)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.widget.ListView.arrowScrollImpl(ListView.java:2225)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.widget.ListView.arrowScroll(ListView.java:2172)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.widget.ListView.commonKey(ListView.java:1977)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.widget.ListView.onKeyDown(ListView.java:1924)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.view.KeyEvent.dispatch(KeyEvent.java:893)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.view.View.dispatchKeyEvent(View.java:3647)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:744)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.widget.ListView.dispatchKeyEvent(ListView.java:1909)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.superDispatchKeyEvent(PhoneWindow.java:1708)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent
(PhoneWindow.java:1197)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.app.Activity.dispatchKeyEvent(Activity.java:1967)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent
(PhoneWindow.java:1684)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.widget.TabHost.dispatchKeyEvent(TabHost.java:272)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.superDispatchKeyEvent(PhoneWindow.java:1708)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent
(PhoneWindow.java:1197)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.app.Activity.dispatchKeyEvent(Activity.java:1967)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent
(PhoneWindow.java:1684)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.view.ViewRoot.deliverKeyEventToViewHierarchy(ViewRoot.java:
2329)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.view.ViewRoot.handleFinishedEvent(ViewRoot.java:2299)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1621)
09-18 11:50:00.990: ERROR/Androi

[android-developers] Re: How do I start a new activity inside a tab? TabSpec.setContent(Intent) doesn't appear to work

2009-09-18 Thread Wouter

And can you post the source code from this and your other example
please?

On 17 sep, 23:50, "nEx.Software"  wrote:
> It just worked for me...
>
> That being said, I have also copied all of the relevant code from the
> Android Open Source Project, added a replaceContent(Intent intent)
> method, and done the same thing as before but without the switching to
> a new tab first... Again, I am almost positive that this is not the
> correct way to do this so I hesitate to recommend it. I can't say
> exactly what happens to the Activity, to be honest. It may be hanging
> out in limbo.
>
> On Sep 17, 2:44 pm, Wouter  wrote:
>
> > But i want to show this new activity in the same active tab. now it
> > opens in a new activity without showing my 3 tabs..
>
> > On 17 sep, 23:28, "nEx.Software"  wrote:
>
> > > It seems you cannot change the Activity of the current tab using
> > > setContent(); That being said... Doing something you really probably
> > > should not do, you can get this to work: Programmatically switch to
> > > another tab (something like getTabHost().setCurrentTab(1);), then do
> > > MainTabActivity.projectTab.setContent(i);, then go back to the
> > > original tab (something like getTabHost().setCurrentTab(0);). Like I
> > > said though... this is probably not something you should do.
>
> > > On Sep 17, 1:52 pm, Wouter  wrote:
>
> > > > Does someone has found an easy solution for this? I have the same
> > > > issue. I have 3 tabs and I want to show a new activity in one of these
> > > > tabs!
>
> > > > Wouter
>
> > > > On Aug 12, 3:47 pm, Sena  wrote:
>
> > > > > Thanks for the pointers Mark.
> > > > > S
>
> > > > > On Aug 12, 3:16 pm, Mark Murphy  wrote:
>
> > > > > > Sena Gbeckor-Kove wrote:
> > > > > > > Thanks for the tip. Can you point me at what I need to be looking 
> > > > > > > up to
> > > > > > > find the documentation about changing the viewinsidetheTab?
>
> > > > > > You don't change the Viewinsideof atab. You cause the existing View
> > > > > > to show something else (e.g., use FrameLayout and make one layer 
> > > > > > VISIBLE
> > > > > > and another layer GONE, or use ViewFlipper to swap between 
> > > > > > contents).
>
> > > > > > You *might* be able to get setContent() to replace the current View 
> > > > > > by
> > > > > > passing in another layout ID or TabContentFactory, but I'm skeptical
> > > > > > this will work.
>
> > > > > > Thetabwidget framework in Android is designed for simple stuff. You
> > > > > > may wish to grab the source code for the relevant classes out of 
> > > > > > Android
> > > > > > and make your own version that handles your own scenario.
>
> > > > > > --
> > > > > > Mark Murphy (a Commons 
> > > > > > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > > > > > Warescription: Three Android Books, Plus Updates, $35/Year
--~--~-~--~~~---~--~~
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] Re: How do I start a new activity inside a tab? TabSpec.setContent(Intent) doesn't appear to work

2009-09-17 Thread Wouter

But i want to show this new activity in the same active tab. now it
opens in a new activity without showing my 3 tabs..

On 17 sep, 23:28, "nEx.Software"  wrote:
> It seems you cannot change the Activity of the current tab using
> setContent(); That being said... Doing something you really probably
> should not do, you can get this to work: Programmatically switch to
> another tab (something like getTabHost().setCurrentTab(1);), then do
> MainTabActivity.projectTab.setContent(i);, then go back to the
> original tab (something like getTabHost().setCurrentTab(0);). Like I
> said though... this is probably not something you should do.
>
> On Sep 17, 1:52 pm, Wouter  wrote:
>
> > Does someone has found an easy solution for this? I have the same
> > issue. I have 3 tabs and I want to show a new activity in one of these
> > tabs!
>
> > Wouter
>
> > On Aug 12, 3:47 pm, Sena  wrote:
>
> > > Thanks for the pointers Mark.
> > > S
>
> > > On Aug 12, 3:16 pm, Mark Murphy  wrote:
>
> > > > Sena Gbeckor-Kove wrote:
> > > > > Thanks for the tip. Can you point me at what I need to be looking up 
> > > > > to
> > > > > find the documentation about changing the viewinsidetheTab?
>
> > > > You don't change the Viewinsideof atab. You cause the existing View
> > > > to show something else (e.g., use FrameLayout and make one layer VISIBLE
> > > > and another layer GONE, or use ViewFlipper to swap between contents).
>
> > > > You *might* be able to get setContent() to replace the current View by
> > > > passing in another layout ID or TabContentFactory, but I'm skeptical
> > > > this will work.
>
> > > > Thetabwidget framework in Android is designed for simple stuff. You
> > > > may wish to grab the source code for the relevant classes out of Android
> > > > and make your own version that handles your own scenario.
>
> > > > --
> > > > Mark Murphy (a Commons 
> > > > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > > > Warescription: Three Android Books, Plus Updates, $35/Year
--~--~-~--~~~---~--~~
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] Re: How do I start a new activity inside a tab? TabSpec.setContent(Intent) doesn't appear to work

2009-09-17 Thread Wouter

Does someone has found an easy solution for this? I have the same
issue. I have 3 tabs and I want to show a new activity in one of these
tabs!

Wouter

On Aug 12, 3:47 pm, Sena  wrote:
> Thanks for the pointers Mark.
> S
>
> On Aug 12, 3:16 pm, Mark Murphy  wrote:
>
> > Sena Gbeckor-Kove wrote:
> > > Thanks for the tip. Can you point me at what I need to be looking up to
> > > find the documentation about changing the viewinsidetheTab?
>
> > You don't change the Viewinsideof atab. You cause the existing View
> > to show something else (e.g., use FrameLayout and make one layer VISIBLE
> > and another layer GONE, or use ViewFlipper to swap between contents).
>
> > You *might* be able to get setContent() to replace the current View by
> > passing in another layout ID or TabContentFactory, but I'm skeptical
> > this will work.
>
> > Thetabwidget framework in Android is designed for simple stuff. You
> > may wish to grab the source code for the relevant classes out of Android
> > and make your own version that handles your own scenario.
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > Warescription: Three Android Books, Plus Updates, $35/Year
--~--~-~--~~~---~--~~
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] Re: tabs iphone style

2009-09-17 Thread Wouter

So what do I have to use? Someone has an example for me?

On 17 sep, 17:30, "nEx.Software"  wrote:
> I had actually copied the sources for TabActivity, TabHost, and
> TabWidget from the Open Source Project yesterday, I didn't realize
> that this was a change actually until your response. I am not even
> using the 1.6 SDK yet... I am now going to peruse the diff report a
> little more closely.
>
> On Sep 17, 8:24 am, Mark Murphy  wrote:
>
> > nEx.Software wrote:
> > > Yes...http://developer.android.com/sdk/api_diff/4/changes/android.widget.Ta...
>
> > Ah, yes. setIndicator() used to just have the Drawable options, not the
> > whole View. I'll have to experiment with these.
>
> > Thanks for pointing this out!
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > Android App Developer Training:http://commonsware.com/training.html

--~--~-~--~~~---~--~~
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] Re: tabs iphone style

2009-09-16 Thread Wouter

Hey,

I am using tabs also now because the example didn't worked for me..

You can see my application:

http://i29.tinypic.com/254wjtg.png (dont mind the images in the tabs,
have to replace them ;) )

But when i click on a item in my list i open an activity FilmDetail
but here the tabs are not visible.. So i have to press return button
to see my tabs again. How can i open this new activity in this
tabcontent so i can see the tabs and the filmdetail Activity?

Wouter

On 16 sep, 15:17, "nEx.Software"  wrote:
> I have done custom tabs in my application (BarTor) using a modified
> version of the TabHost and TabActivity that i got from the Android
> Open Source Project. Granted, I leave the tabs at the top, but there
> is nothing really stopping me from putting them at the bottom or the
> the sides... I'd suggest trying that route, if you don't mind a little
> extra work. Perhaps the example you posted is doing the same, I
> haven't yet looked at it.
>
> On Sep 16, 5:36 am, Wouter  wrote:
>
> > I see that there are android apps with this style of tabs:
>
> >http://www.mobilecrunch.com/wp-content/uploads/2009/02/myspace-androi...
>
> > It must be possible..
>
> > On 16 sep, 14:32, Wouter  wrote:
>
> > > I have tried this but without success!
>
> > > The example on anddev.org is taken 
> > > fromhttp://code.google.com/p/undroid/source/browse/trunk/src/com/bitsette...
>
> > > i have tried that example because they also work with different
> > > activities per tab, but I got nullpointerexception in my layout file
> > > and dont see the footer..
>
> > > Wouter
>
> > > On 16 sep, 07:03, Desu Vinod Kumar  wrote:
>
> > > > HI
>
> > > >http://www.anddev.org/generalized_file_manager_2_-_gfm20-t397.html
> > > > see this this may helpful to you...
> > > > to make like iphone
>
> > > > On Tue, Sep 15, 2009 at 8:54 PM, Mark Murphy 
> > > > wrote:
>
> > > > > > How can i make something like this:
>
> > > > > >http://www.appsstore.nl/apps/fml/fmlscreen1.jpg
>
> > > > > > So i mean the tabs at the bottom of the screen. It has to be present
> > > > > > on every activity and every tab shows and other activity
> > > > > > (listactivity).
>
> > > > > > How can i do this?
>
> > > > > With a lot of work. There is no BottomTabsLikeIPhoneHas widget.
>
> > > > > Having a bar of ImageButtons is easy. Giving them the proper 
> > > > > transparent
> > > > > background (so a sliver of the underlying ListView, as in your 
> > > > > screenshot)
> > > > > is the job of a graphic designer. Having the buttons change the 
> > > > > contents
> > > > > of the list could be done any number of ways, though I would start 
> > > > > with a
> > > > > ViewFlipper.
>
> > > > > --
> > > > > Mark Murphy (a Commons Guy)
> > > > >http://commonsware.com
> > > > > Android App Developer Books:http://commonsware.com/books.html
>
> > > > --
> > > > Regards
> > > > ---
> > > > Desu Vinod Kumar
> > > > vinny.s...@gmail.com
> > > > 09176147148
--~--~-~--~~~---~--~~
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] Re: tabs iphone style

2009-09-16 Thread Wouter

I see that there are android apps with this style of tabs:

http://www.mobilecrunch.com/wp-content/uploads/2009/02/myspace-android.gif

It must be possible..

On 16 sep, 14:32, Wouter  wrote:
> I have tried this but without success!
>
> The example on anddev.org is taken 
> fromhttp://code.google.com/p/undroid/source/browse/trunk/src/com/bitsette...
>
> i have tried that example because they also work with different
> activities per tab, but I got nullpointerexception in my layout file
> and dont see the footer..
>
> Wouter
>
> On 16 sep, 07:03, Desu Vinod Kumar  wrote:
>
> > HI
>
> >http://www.anddev.org/generalized_file_manager_2_-_gfm20-t397.html
> > see this this may helpful to you...
> > to make like iphone
>
> > On Tue, Sep 15, 2009 at 8:54 PM, Mark Murphy wrote:
>
> > > > How can i make something like this:
>
> > > >http://www.appsstore.nl/apps/fml/fmlscreen1.jpg
>
> > > > So i mean the tabs at the bottom of the screen. It has to be present
> > > > on every activity and every tab shows and other activity
> > > > (listactivity).
>
> > > > How can i do this?
>
> > > With a lot of work. There is no BottomTabsLikeIPhoneHas widget.
>
> > > Having a bar of ImageButtons is easy. Giving them the proper transparent
> > > background (so a sliver of the underlying ListView, as in your screenshot)
> > > is the job of a graphic designer. Having the buttons change the contents
> > > of the list could be done any number of ways, though I would start with a
> > > ViewFlipper.
>
> > > --
> > > Mark Murphy (a Commons Guy)
> > >http://commonsware.com
> > > Android App Developer Books:http://commonsware.com/books.html
>
> > --
> > Regards
> > ---
> > Desu Vinod Kumar
> > vinny.s...@gmail.com
> > 09176147148
--~--~-~--~~~---~--~~
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] Re: tabs iphone style

2009-09-16 Thread Wouter

I have tried this but without success!

The example on anddev.org is taken from
http://code.google.com/p/undroid/source/browse/trunk/src/com/bitsetters/undroid/common/Footer.java

i have tried that example because they also work with different
activities per tab, but I got nullpointerexception in my layout file
and dont see the footer..

Wouter

On 16 sep, 07:03, Desu Vinod Kumar  wrote:
> HI
>
> http://www.anddev.org/generalized_file_manager_2_-_gfm20-t397.html
> see this this may helpful to you...
> to make like iphone
>
> On Tue, Sep 15, 2009 at 8:54 PM, Mark Murphy wrote:
>
>
>
>
>
> > > How can i make something like this:
>
> > >http://www.appsstore.nl/apps/fml/fmlscreen1.jpg
>
> > > So i mean the tabs at the bottom of the screen. It has to be present
> > > on every activity and every tab shows and other activity
> > > (listactivity).
>
> > > How can i do this?
>
> > With a lot of work. There is no BottomTabsLikeIPhoneHas widget.
>
> > Having a bar of ImageButtons is easy. Giving them the proper transparent
> > background (so a sliver of the underlying ListView, as in your screenshot)
> > is the job of a graphic designer. Having the buttons change the contents
> > of the list could be done any number of ways, though I would start with a
> > ViewFlipper.
>
> > --
> > Mark Murphy (a Commons Guy)
> >http://commonsware.com
> > Android App Developer Books:http://commonsware.com/books.html
>
> --
> Regards
> ---
> Desu Vinod Kumar
> vinny.s...@gmail.com
> 09176147148
--~--~-~--~~~---~--~~
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] tabs iphone style

2009-09-15 Thread Wouter

Hey,

How can i make something like this:

http://www.appsstore.nl/apps/fml/fmlscreen1.jpg

So i mean the tabs at the bottom of the screen. It has to be present
on every activity and every tab shows and other activity
(listactivity).

How can i do this?

Wouter
--~--~-~--~~~---~--~~
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] Re: XML-RPC

2009-09-11 Thread Wouter

Ok it get all the dates with response.keySet();

response:

[2009-09-03, 2009-08-27, 2009-09-09, 2009-08-19, 2009-09-10,
2009-08-20]

But how can i loop every date now to get the Objects?

Wouter

On 11 sep, 17:34, Wouter  wrote:
> Hey,
>
> I get a nice solution from skink, thank you so much for it!
>
> Now i have another problem. I do a call with film.retrieveCinema (to
> get newest moviest in cinema).
>
> this is response:
>
> {2009-09-03=[Ljava.lang.Object;@43663720,
> 2009-08-27=[Ljava.lang.Object;@43599b60,
> 2009-09-09=[Ljava.lang.Object;@435f4260,
> 2009-08-19=[Ljava.lang.Object;@435c0950,
> 2009-09-10=[Ljava.lang.Object;@43675de0,
> 2009-08-20=[Ljava.lang.Object;@43606178}
>
> But theses dates in front of the object will change when there are new
> movies. How can I determine which dates are in the response? I know I
> can get the object of the date like this response.get("2009-09-03")
> but how can i know which dates are in my response?
>
> Thank you,
>
> Wouter
>
> On 9 sep, 18:23, Wouter  wrote:
>
> > yes i have the latest version from the svn but it is still a known
> > issue:http://code.google.com/p/android-xmlrpc/issues/detail?id=8
>
> > really need to get this fixed, cant do anything without this..
>
> > On 9 sep, 18:19, skink  wrote:
>
> > > On Sep 9, 6:08 pm, Wouter  wrote:
>
> > > > Nobody knows a solution for this?
>
> > > > Wouter
>
> > > is you svn of xmlrpc up to date?
--~--~-~--~~~---~--~~
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] Re: XML-RPC

2009-09-11 Thread Wouter

Hey,

I get a nice solution from skink, thank you so much for it!

Now i have another problem. I do a call with film.retrieveCinema (to
get newest moviest in cinema).

this is response:

{2009-09-03=[Ljava.lang.Object;@43663720,
2009-08-27=[Ljava.lang.Object;@43599b60,
2009-09-09=[Ljava.lang.Object;@435f4260,
2009-08-19=[Ljava.lang.Object;@435c0950,
2009-09-10=[Ljava.lang.Object;@43675de0,
2009-08-20=[Ljava.lang.Object;@43606178}

But theses dates in front of the object will change when there are new
movies. How can I determine which dates are in the response? I know I
can get the object of the date like this response.get("2009-09-03")
but how can i know which dates are in my response?

Thank you,

Wouter

On 9 sep, 18:23, Wouter  wrote:
> yes i have the latest version from the svn but it is still a known
> issue:http://code.google.com/p/android-xmlrpc/issues/detail?id=8
>
> really need to get this fixed, cant do anything without this..
>
> On 9 sep, 18:19, skink  wrote:
>
> > On Sep 9, 6:08 pm, Wouter  wrote:
>
> > > Nobody knows a solution for this?
>
> > > Wouter
>
> > is you svn of xmlrpc up to date?
--~--~-~--~~~---~--~~
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] Re: XML-RPC

2009-09-09 Thread Wouter

yes i have the latest version from the svn but it is still a known
issue: http://code.google.com/p/android-xmlrpc/issues/detail?id=8

really need to get this fixed, cant do anything without this..

On 9 sep, 18:19, skink  wrote:
> On Sep 9, 6:08 pm, Wouter  wrote:
>
> > Nobody knows a solution for this?
>
> > Wouter
>
> is you svn of xmlrpc up to date?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



  1   2   >