Use "Scroll Left" instead of "Back Button&quo

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Use "Scroll Left" instead of "Back Button&quo

Postby darolla » Wed Nov 19, 2008 6:26 pm

Hi,

is there a way like in the G1 calendar to use touching scroll left instead of the back button?

It might feel more like iPhone :D.

Are there Events like "Scroll left" although I don't have anthing to scroll (e.g. fullsize imageview like splashscreen) ?

Can I trigger the back button somehow ?


Thanks,
DaRolla
User avatar
darolla
Master Developer
Master Developer
 
Posts: 273
Joined: Thu Sep 25, 2008 5:16 pm
Location: Dortmund, Germany

Top

Postby MrSnowflake » Wed Nov 19, 2008 6:35 pm

Sensing left fling can be done using GestureDetector in Android SDK.
Emulating the back button is just the same as calling finish(), or you could actually emulate the back button (which maybe is better) using the tut +- posted in the Tutorial forum.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby MrSnowflake » Wed Nov 19, 2008 7:56 pm

I thought this was a good idea, I actually don't know why I didn't this before. I made a framework kind a thing.
It has 2 Class extending Activity:
FlingActivity and FlingListActivity
just use that one of those to make your app to have left fling = back.

I've added it to SnowServices.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby darolla » Thu Nov 20, 2008 3:09 pm

dear mrsnowflake,

thank u very much for this !!!

It's working nicely :)

One question:

Where are the floats mMinDistance and mMinVelocity initialized ?

Greetings & Many Thanks !!!
Marco
User avatar
darolla
Master Developer
Master Developer
 
Posts: 273
Joined: Thu Sep 25, 2008 5:16 pm
Location: Dortmund, Germany

Postby darolla » Thu Nov 20, 2008 3:18 pm

btw: where can I find that plusminus back button emulate tutorial ?
User avatar
darolla
Master Developer
Master Developer
 
Posts: 273
Joined: Thu Sep 25, 2008 5:16 pm
Location: Dortmund, Germany

Postby MrSnowflake » Thu Nov 20, 2008 4:03 pm

The 2 vars are initialised in one of the constructors, forgot to make getters and setters...

+-'s doesn't work anymore, as it used interfaces not meant to be public.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 3 guests