[android-developers] Re: Slide Views ( like Google Scoreboard app )

2009-01-08 Thread Kavi

I tried creating something similar like a home screen a while back and
ended up using the View Flipper.
As you pointed out, you cannot view the next view while dragging the
screen. and thts why, i started writing
my own layout. I wasn't able to finish it but it can be done by
writing your own layout.
For example, If the width of the screen is 320, u can have three or
however many  linear layouts of 320px each in a horizontal linear
layout.
Then, all you need to do is implement the onToucListener and the
OnGestureListener . overwrite the ondown, onfling, onup , ontouch
methods to handle when the user starts to scroll left/right. do some
math to find out which view is the user on, and then perform the
necessary view transitions.

On Jan 8, 9:03 am, Al alcapw...@googlemail.com wrote:
 Does anyone know how they implemented the part where you can drag the
 current screen left/right and also view part of the next screen at the
 same time? Was it the same way as the Home screen or is there another
 method 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: Content Providers and Network Requests

2008-09-18 Thread Kavi

Thanks a lot for the response, Jeff. I'll try it 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Content Providers and Network Requests

2008-09-17 Thread Kavi

Hello,
As per the subject, i am making an app that is dependent on data that
comes from a network request.
I was using the UserTask class (Made by Mr. Romain Guy) to make the
network calls and get my data and everything worked.

But now, i want the data from this app to be available to other apps
as well and thus, the only way that data could be shared between
applications is by using a content provider (thats what i have read so
far).

My question was: Is it possible to use a thread or the UserTask class
inside a Content Provider and if yes, then since the request to the
server can take a long time, how do we change the query method of the
content provider to handle such a delay as it is suppose to return a
Cursor object.

In my initial approach, i was using a listener that took care of
updating the Application when the data was available but i am not
aware of a way to use a listener with a Content Provider.

Any help or ideas would be helpful.

Thanks

- Kavik
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Mouse Gesture for Navigation?

2008-09-12 Thread Kavi

ListView is a kind of View, so you should be able to attach the
GestureDetector to your ListView as well.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how to remove a view

2008-09-12 Thread Kavi

Look at the setVisibility method to change the visibility options for
the view.

http://code.google.com/android/reference/android/view/View.html#setVisibility(int)
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Layout like android's Home Screen

2008-09-11 Thread Kavi

Hello,

I am currently using a View Flipper to create views on the fly and
allow the user to move between views by performing a fling action on
the screen. But the way it currently works is that after the fling
action is performed, the changing of the view is triggered which uses
a move in and move out animation.

What i want to have is something like the home screen of android where
the user can see the new view while he is trying to drag/scroll the
screen.
I want a view that the user can just drag to either go to the right or
the left side and the views on either side can be a part of the
current view or can be new views that are inflated at runtime.

Does anybody know how to implement this?

Thoughts?

Thanks

- Kavik
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Mouse Gesture for Navigation?

2008-09-11 Thread Kavi

You can use the android.view.GestureDetector to detect gestures on a
view.

First, you can implement the GestureListener interface.
Second, you can create an instance of gesturedetector for your
activity, and in your activity's onTouch method, call the gesture
detector's instance's onTouchEvent method.
and That's it.

Then, you can detect all sorts of events like fling, scroll, touchDown
etc.

public class YourActivity implements OnTouchListener,
OnGestureListener
{

onCreate()
{
GestureDetector gd = new GestureDetector(this);

 // Set the ontouchListener for your View.
}

public boolean onTouch(View v, MotionEvent event)
{
return gd.onTouchEvent(event);
}

// You can write your code to do whatever whenever your view sees
anyone of the below events triggered on your view.

@Override
public boolean onDown(MotionEvent e)
{
// TODO Auto-generated method stub
return true;
}

@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float
velocityX,
float velocityY)
{

}

@Override
public void onLongPress(MotionEvent e)
{
// TODO Auto-generated method stub
}

@Override
public boolean onScroll(MotionEvent e1, MotionEvent e2, float
distanceX,
float distanceY)
{
// TODO Auto-generated method stub
// previous.setText(Scroll);
return false;
}

@Override
public void onShowPress(MotionEvent e)
{
// TODO Auto-generated method stub
}

@Override
public boolean onSingleTapUp(MotionEvent e)
{
// TODO Auto-generated method stub
return false;
}


I hope it helps.

- Kavik

On Sep 11, 12:53 pm, Mark Hansen [EMAIL PROTECTED] wrote:
 I was wondering if this is easily implementable with the current
 SDK... basically I'd like to use a hold and drag left or right for
 navigation.

 So if the user wanted to change say a page they would hold their
 finger down and then push left or right.

 I know there's a Firefox extension that calls this mouse gestures, but
 didn't know if anything was built in that could handle this.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Layout like android's Home Screen

2008-09-11 Thread Kavi

 Wow.. I totally was not aware of VelocityTracker and Scroller. It
 looks very useful, and I guess this could have saved me a lot of
 headache.. Is there any (API) demo for how to use them?

You might want to have a look at the android.view.GestureDetector for
your Views.
You can detect all sorts of gestures on your views using this.


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Use dynamic string instead of Integer in findViewById

2008-09-04 Thread Kavi

Currently, findViewById uses a R.id.viewid which is an Integer to find
views.

Is it possible to give findViewById a string like R.id.field_1_text?

The reason i want to know this is then, i can use a loop and change
the values for fields like
R.id.field_1_text, R.id.field_2_text, R.id.field_3_text  rather
than setting all of them sequentially.

Is it possible to convert a string to a resource id before passing it
in to the findViewById method. I tried looking on the groups but
didn't find anything that could help me in this case.

Thanks
- Kavik
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Use dynamic string instead of Integer in findViewById

2008-09-04 Thread Kavi


I'll try both and see which one works better
Thanks Mark and Romain Guy.
.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Image Button?

2008-08-25 Thread Kavi

Is there a way to have the selector code for multiple ImageButtons in
one xml file.
So, if i have 10 buttons, i want to have all the code in one file and
not in 10 xml files to set the background for each button.

Is there a way to give each selector tag an ID? and then use different
selectors for different buttons but have them all together in one
location?

Kavik
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem with TableLayout

2008-08-22 Thread Kavi

How about telling the TableRows to evenly take the height from the
Table layout. Is that possible?
So, for example in my main.xml, the TableLayout is taking up the whole
screen. And all the table rows height is equal to what they need for
their content.
Thus, their is some extra space left at the bottom of the screen. I
want the rows to spread out so that the whole page is taken. Can that
be done using a TableLayout?


About using a Linearlayout, i have used that but i need to test it
with a TableLayout now. Also, would you have an idea in terns of the
rendering time for both LinearLayout and TableLayout. Which one is
faster and takes up less memory?
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem with TableLayout

2008-08-22 Thread Kavi



On Aug 22, 8:37 am, Kavi [EMAIL PROTECTED] wrote:
 How about telling the TableRows to evenly take the height from the
 Table layout. Is that possible?
 So, for example in my main.xml, the TableLayout is taking up the whole
 screen. And all the table rows height is equal to what they need for
 their content.
 Thus, their is some extra space left at the bottom of the screen. I
 want the rows to spread out so that the whole page is taken. Can that
 be done using a TableLayout?

Ok i found the answer to this one using layout_weight.

 About using a Linearlayout, i have used that but i need to test it
 with a TableLayout now. Also, would you have an idea in terns of the
 rendering time for both LinearLayout and TableLayout. Which one is
 faster and takes up less memory?

This one, i'll still like to know.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Problem with TableLayout

2008-08-21 Thread Kavi

I have two questions regarding the use of a TableLayout.

1) First of all, i am using a horizontal orientation.
The content of my TableLayout gets hidden at the bottom of the screen
if the title feature is not turned off.
if i use requestWindowFeature(Window.FEATURE_NO_TITLE);
then. all the contents fit well.

To me, it looks like it calculates the height needed for the
TableLayout and then just adds the title above it which pushes the
entire layout down and hence, some stuff gets hidden.
Is this an issue and if yes, was it there in the old SDK?
What would be a workaround?

2) My second question is regarding a TableRow. By default, the
layout_height for a table row and its children is set to WRAP_CONTENT.
If i need the row's layout_height property to be set to FILL_PARENT,
how can i do that?
Is it possible? or is there a possible workaround?

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
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---