[android-developers] Error on using ksoap2-android with the example from Falafel

2010-09-27 Thread sonic
Hey guys,

I try to build just a simple soap test its same as example from
farvale
http://vimeo.com/9633556
but what's the matter, it doesn't work for me ... ;(

I'm using eclipse 3.6.0 with latest add-in
coding for 1.5  --  testing on 1.5 virtual and real phone,
it basically should work with 1.5, too but there's a java class
missing...!?

mycode is not a huge thing:
(  the problem is: request.addProperty(Celsius, 32);   )
 
package com.linckhvt.soap;

import java.io.IOException;

import android.app.Activity;
import android.os.Bundle;

// import android.app.Activity;
// import android.os.Bundle;
import android.widget.TextView; /** for viewing text */

/** imports for soap */
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapPrimitive;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.AndroidHttpTransport;
import org.ksoap2.transport.HttpTransportSE;
import org.xmlpull.v1.XmlPullParserException;


public class Soap extends Activity {
/** Called when the activity is first created. */

private static final String SOAP_ACTION = http://tempuri.org/
CelsiusToFahrenheit;
private static final String METHOD_NAME = CelsiusToFahrenheit;
private static final String NAMESPACE = http://tempuri.org/;;  //
where xmlns=
private static final String URL = http://www.w3schools.com/
webservices/tempconvert.asmx; // where the service is

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView txt = new TextView(this);
txt.setText(Hello World - LIHE is here);
setContentView(txt);

try {
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty(Celsius, 32);  // heres the error

SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);

AndroidHttpTransport aht = new AndroidHttpTransport(URL);
aht.call(SOAP_ACTION, envelope);

//HttpTransportSE androidHttpTransport = new
HttpTransportSE(URL);
//androidHttpTransport.call(SOAP_ACTION, envelope);

SoapPrimitive resultString =
(SoapPrimitive)envelope.getResponse();
txt.setText(resultString.toString());

} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (XmlPullParserException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
 

Error debug:

09-27 06:23:49.104: ERROR/dalvikvm(723): Could not find class
'java.awt.Frame', referenced from method
com.trend.iwss.jscan.runtime.Session.getContainingFrame
09-27 06:23:49.104: WARN/dalvikvm(723): VFY: unable to resolve
instanceof 68 (Ljava/awt/Frame;) in Lcom/trend/iwss/jscan/runtime/
Session;
09-27 06:23:49.104: WARN/dalvikvm(723): VFY:  rejecting opcode 0x20 at
0x0004
09-27 06:23:49.104: WARN/dalvikvm(723): VFY:  rejected Lcom/trend/iwss/
jscan/runtime/Session;.getContainingFrame (Ljava/awt/Container;)Ljava/
awt/Frame;
09-27 06:23:49.104: WARN/dalvikvm(723): Verifier rejected class Lcom/
trend/iwss/jscan/runtime/Session;
09-27 06:28:52.829: WARN/dalvikvm(723): Exception Ljava/lang/
VerifyError; thrown during Lorg/ksoap2/serialization/
PropertyInfo;.clinit


PLEASE 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] Key Injection INJECT_EVENTS

2010-05-14 Thread Sonic..
Hello,

I am trying to develop an application to provide remote of my Android
phone onto a desktop. Now I am able to send the pointer and key events
to the listening thread, but when I try to use the WindowManager API's
injectKeyEvent  injectPointerEvent, then I receive an error for
Permission denied.

I even tried to use the permission INJECT_EVENTS but I am unable to
grant this permission to my application. I tried googling it and found
out, that we cannot send events from one application to any other
application. So is there any way I could do so? I want to use the
above mentioned API's to do the action that was performed on the
desktop.

Thanks in advance

-- 
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] desktop remote on phone

2010-05-03 Thread Sonic..
Hello,

I wanted to create an application that can be used to take the remote
connection of an android phone, on a desktop running Windows, using a
USB connection. So all the activity that can be performed on the
handset, should be visible on the desktop. Also, If the user interacts
with the PC window (e.g., type a key or use the mouse click), it
should be conveyed to the phone via the same remote mechanism.

So if anyone could tell me, in which direction does one should proceed
in order to do the above task.

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: Moving two views together

2010-04-18 Thread Sonic..
Hey, if you could please give me more details for the same. I'm still
a starter in android development.

On Apr 13, 6:34 pm, social hub shubem...@gmail.com wrote:
 hack into onmove onscroll onfling methods and pass them to  other view

 On Tue, Apr 13, 2010 at 6:25 AM, Sonic.. abhishek.bansal1...@gmail.comwrote:

  Hello,

  I currently have one Scrollview which contains a table layout and one
  list in my activity. Now my problem is that I wanted to move both of
  them(Scrollview and list) together and with proper synchronization...
  So if scrollview is being scrolled then listview should also scroll
  with the same distance, and vice versa...

  Thanks in advance..

  Abhishek

  --
  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.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

  To unsubscribe, reply using remove me as the subject.

-- 
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: Moving two views together

2010-04-18 Thread Sonic..
I'll reframe my question. I'm not using a scrollview anymore. I have
two lists being displayed in my activity. I heard that using a
listview within a scrollview causes issues. So I need a way where in I
can scroll both the lists simultaneously. Does that mean I need to
override some functions of a listview. I tried to do something with
the OnScrollListener but couldn't find much help. Can I use the
OnScrollListener and using the view given I can scroll both the lists.

On Apr 19, 10:50 am, Sonic.. abhishek.bansal1...@gmail.com wrote:
 Hey, if you could please give me more details for the same. I'm still
 a starter in android development.

 On Apr 13, 6:34 pm, social hub shubem...@gmail.com wrote:

  hack into onmove onscroll onfling methods and pass them to  other view

  On Tue, Apr 13, 2010 at 6:25 AM, Sonic.. 
  abhishek.bansal1...@gmail.comwrote:

   Hello,

   I currently have one Scrollview which contains a table layout and one
   list in my activity. Now my problem is that I wanted to move both of
   them(Scrollview and list) together and with proper synchronization...
   So if scrollview is being scrolled then listview should also scroll
   with the same distance, and vice versa...

   Thanks in advance..

   Abhishek

   --
   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.comandroid-developers%2bunsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

   To unsubscribe, reply using remove me as the subject.

 --
 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 
 athttp://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] Moving two views together

2010-04-13 Thread Sonic..
Hello,

I currently have one Scrollview which contains a table layout and one
list in my activity. Now my problem is that I wanted to move both of
them(Scrollview and list) together and with proper synchronization...
So if scrollview is being scrolled then listview should also scroll
with the same distance, and vice versa...

Thanks in advance..

Abhishek

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Applying animation to all the items in the list at once

2010-04-05 Thread Sonic..
Hello,

I have a list view, wherein I need to apply an animation of sliding
the list items to the left in case of a horizontal fling. Now I need
to apply this animation to all the list items at once.

I tried Google it, and I believe I could use setLayoutAnimation for
each list item. and that animation will be applied when the list item
layout is first created or refreshed. But my problem is I wanted that
animation to be applied only to a particular layout for that list
item, and not the entire list item layout.

Can anyone guide me on how to apply animation to list items.

Thanks in advance...

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

To unsubscribe, reply using remove me as the subject.


[android-developers] SQL simple selection - urgent help needed

2010-03-29 Thread Sonic
Hi all,

I need urgent help with a simple selection I am having difficulty
with.

I am trying to return a value of a Double called startPosition, where
trackName is equal to a name of a string.

The query doesnt seem to be returning anything, here is the code from
my DbAdapter.

Java:

public Cursor getStartLatitude(String trackname) throws
SQLException {

Cursor mCursor =

mDb.query(true, DATABASE_TABLE3, new String[] {KEY_ROWID3,
KEY_TRACKNAME,
KEY_STARTPOSITION}, KEY_TRACKNAME + = +
'kingsav',
null, null, null, null, null);
if (mCursor != null) {
mCursor.moveToFirst();
}
return mCursor;

}



And here is my code from the Java code that passes in the value and
reads it to a textview. Note above, I have used a static value for
testing purposes.


Java:
private void loadTrackInfo()
 {
  Cursor b = mDbHelper.getStartLatitude(TrackName);
 if(b.moveToFirst())
 {

  Double startLocation =
b.getDouble(b.getColumnIndex(mDbHelper.KEY_STARTPOSITION));

  selectedTracktv.setText(Active Track: +startLocation);

 }



 }

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Raw sound file as ringtone

2010-03-11 Thread Sonic
Hi all,

I am using the following code trying to pull an .mp3 or .ogg file from
my raw directory and saving it to the sd card and activating it as a
ringtone. Although, it keeps failing for some reason or another and
doesnt actually copy the new file to the sdcard.

Any ideas please?

public boolean saveas(int ressound){
 byte[] buffer=null;
 InputStream fIn =
getBaseContext().getResources().openRawResource(ressound);
 int size=0;

 try {
  size = fIn.available();
  buffer = new byte[size];
  fIn.read(buffer);
  fIn.close();
 } catch (IOException e) {
  // TODO Auto-generated catch block
  return false;
 }

 String path=/sdcard/media/audio/ringtones/;
 String filename=priceringtone+.ogg;

 boolean exists = (new File(path)).exists();
 if (!exists){new File(path).mkdirs();}

 FileOutputStream save;
 try {
  save = new FileOutputStream(path+filename);
  save.write(buffer);
  save.flush();
  save.close();
 } catch (FileNotFoundException e) {
  // TODO Auto-generated catch block
  return false;
 } catch (IOException e) {
  // TODO Auto-generated catch block
  return false;
 }

 sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE,
Uri.parse(file://+path+filename)));

 File k = new File(path, filename);

 ContentValues values = new ContentValues();
 values.put(MediaStore.MediaColumns.DATA, k.getAbsolutePath());
 values.put(MediaStore.MediaColumns.TITLE, exampletitle);
 values.put(MediaStore.MediaColumns.MIME_TYPE, audio/ogg);
 values.put(MediaStore.Audio.Media.ARTIST, cssounds );
 values.put(MediaStore.Audio.Media.IS_RINGTONE, true);
 values.put(MediaStore.Audio.Media.IS_NOTIFICATION, true);
 values.put(MediaStore.Audio.Media.IS_ALARM, true);
 values.put(MediaStore.Audio.Media.IS_MUSIC, false);

 //Insert it into the database
 
this.getContentResolver().insert(MediaStore.Audio.Media.getContentUriForPath(k.getAbsolutePath()),
values);

 return true;
}

-- 
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] Draw clock like minute hand

2010-02-04 Thread Sonic
Hi all.

Just a quick question, how would i go about implementing a clock like
hand that rotates around a centre point to different positions
depending on a value.

e.g. I send it a value of 3, and it points to the 3'o'clock position
of a circle.

protected void onDraw(Canvas canvas)
{
Paint line = new Paint();
line.setStrokeWidth(3);
line.setColor(Color.BLUE);
line.setStyle(Paint.Style.STROKE);
canvas.drawLine(55, 155, 125, 15, line);

}

I have the following fully working so it draws the line, but i dont
understand how i could get one end of the line to always rotate around
the centre fixed position.

Do you have any ideas?

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] Scrolling Programmatically in a table

2010-01-25 Thread Sonic..
Hello,

I have a table with a number of rows excedding beyond the screen size,
so I'll have to implement scrolling for them. But my problem is that I
don't have to use ScrollView Or HorizontalScrollView for this purpose.
I want to programmatically scroll the table both vertically and
horizontally.

I was unable to find any relevant info for the same in the google
developer site, so if anyone could give me some insight or an example
for the same.

Thanks in advance

-- 
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] Example on how to use Scroller in an activity

2010-01-21 Thread Sonic..
Hello

I tried googling for any example on how to use Scroller for doing
manual handling of scrolling, but couldn't came across one.

I would be grateful if anyone could please help me out in this, on how
to use a Scroller in an activity.

Thanks in advance
-- 
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: Example on how to use Scroller in an activity

2010-01-21 Thread Sonic..
I know, but then I require to move two seperate layouts horizontally
simultaneously. and these layouts are not child of one parent, so it's
not possible to add them in a single HorizontalScrollView.

It is for this reason that I thought that I need to scroll them
programmatically using Scroller.
Any other way would be welcome.
Thanx

On Jan 21, 2:23 pm, Manoj linkex.ma...@gmail.com wrote:
 You can add scrollView to your layout and then add what you want to
 scroll as a single child to that scrollview.
-- 
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] Table Layout Fixed Header row

2010-01-19 Thread Sonic..

Okay, so I've got this TableLayout, and its full of data - with all of
the rows added programmatically. I've got the TableLayout inside of a
HorizontalScrollView, which in turn is inside a ScrollView - this
gives me scrolling both horizontally and vertically. What I'm trying
to do now is add a header row to it that will not scroll. I've tried
moving things around so that both of my scroll views were actually
inside of the TableLayout and adding the TableRows to the
HorizontalScrollView; my hope was to be able to then add the header
row outside of the scroll views.

The only other thing I can think of is having a second table layout
just for the header row, but getting the columns to line up seems like
it would be difficult, and also moving both the table rows
horizontally simultaneously is not feasible. Any ideas?

Thanks in advance
-- 
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] Binding Service to Activity

2009-12-16 Thread Sonic..
Hello,

I am working on an android application, where the activity binds to a
local service to perform certain tasks.

Now I am binding the service in the OnCreate method of the Activity,
after which the activity has to use the service object to invoke the
functionality defined in the servicein the OnStart method. The problem
here is that once a call bindservice has been made, we might not get
the serviceobject immediately, so my service object would be null till
that time. So i cannot invoke the service functions.

So is there a way to determine in the activity that the service has
been bound and the service object is valid and could be used now. For
reference i'm attaching a code snippet for the same.

@Override
public void onCreate(Bundle savedInstanceState)
{
Intent mServiceIntent ;
super.onCreate(savedInstanceState);
setContentView(R.layout.retrieve_guide_data);
bindService(new Intent(UIMain.this,
  CxService.class),
mConnection, Context.BIND_AUTO_CREATE);

}

@Override
protected void onStart()
{
super.onStart();
System.out.println(In OnStart of Activity---);

if(mBoundService != null)
{
int status = mBoundService.authenticate(9876543210);
if(status == 200)
{
AuthFunc();
}
}
}

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

2009-10-07 Thread Sonic

Hi, just a simple question which i'm unsure how would be implemented.
Say you have an int called X which is constantly changing, X could
equal 0, 10, 20, 30, 40, 50. Now when X is equal to 0, I want it to
draw a circle at the bottom if the screen, when X is equal to 50 it
will draw an circle at the top of screen, and the other values of X
would be the midpoints between. Any ideas how this could be
implemented or any examples I can have a look at?
--~--~-~--~~~---~--~~
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] Question regarding GPS

2009-10-03 Thread Sonic

Hi All,

I'm wondering how I would go about the following:

An int value is sent to a textview called X for example, the value of
X is constantly changing, so x could equal any int. Now what Im unsure
how to implement is, if we say X equals 10, I want to be able to time
how long it takes inbetween the time X would be equal to 40 for
example. The values of X = 10 and X = 40 are not going to be constant
it will be gradually increasing, so all as I want to do is time how
long it takes in seconds to reach a predefined value of X.

Any ideas chaps?
--~--~-~--~~~---~--~~
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: Question regarding GPS

2009-10-03 Thread Sonic

Thanks for that, but how would I get it to automatically watch the
textview values of x to automatically stop the timer after reaching a
specific value? Would I need to use some kind of listener?

Thanks in advance.

On Oct 3, 6:08 pm, Lance Nanek lna...@gmail.com wrote:
 When you first go above the start threshold then set a member variable
 to the time. When you go above the end threshold then subtract that
 from the current time to get the time elapsed.

 On Oct 3, 11:43 am, Sonic nitroussi...@googlemail.com wrote:



  Hi All,

  I'm wondering how I would go about the following:

  An int value is sent to a textview called X for example, the value of
  X is constantly changing, so x could equal any int. Now what Im unsure
  how to implement is, if we say X equals 10, I want to be able to time
  how long it takes inbetween the time X would be equal to 40 for
  example. The values of X = 10 and X = 40 are not going to be constant
  it will be gradually increasing, so all as I want to do is time how
  long it takes in seconds to reach a predefined value of X.

  Any ideas chaps?
--~--~-~--~~~---~--~~
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: Question regarding GPS

2009-10-03 Thread Sonic

Ok, I understand the principle behind this, but unsure how it would be
implemented.

How could you you get the current start time when the value of X is
greater than 30 for example, so it wouldnt start if it was below this.
Im unsure of how to pass in the value of x into this?

On Oct 3, 6:29 pm, RichardC richard.crit...@googlemail.com wrote:
 Doing simple linear from the 1st sample:

 When we start we will have:
 originalX at time originalTime

 When a sample arrives we will have:
 currentX at time currentTime

 Therefore the rate of change of X to now is given by:
 rateX = (currentX – originalX) / (currentTime – originalTime)

 So time needed to get to endX (your value 40) from currentX
 timeNeeded = (endX – currentX) * rateX

 However if currentX is fluctuating a large amount then so will
 timeNeeded.  You can use this approach with more points (taking their
 average) for a more stable approximation.

 On Oct 3, 6:08 pm, Lance Nanek lna...@gmail.com wrote:



  When you first go above the start threshold then set a member variable
  to the time. When you go above the end threshold then subtract that
  from the current time to get the time elapsed.

  On Oct 3, 11:43 am, Sonic nitroussi...@googlemail.com wrote:

   Hi All,

   I'm wondering how I would go about the following:

   An int value is sent to a textview called X for example, the value of
   X is constantly changing, so x could equal any int. Now what Im unsure
   how to implement is, if we say X equals 10, I want to be able to time
   how long it takes inbetween the time X would be equal to 40 for
   example. The values of X = 10 and X = 40 are not going to be constant
   it will be gradually increasing, so all as I want to do is time how
   long it takes in seconds to reach a predefined value of X.

   Any ideas chaps?
--~--~-~--~~~---~--~~
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: Two SurfaceViews in a FrameLayout

2009-09-17 Thread sonic

On 28 Jul., 11:18, Chris chrismc...@hotmail.com wrote:
 Now, I managed to use two SurfaceViews and making one transparent.

It would be very nice if you could post some code showing how you do
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Urgent: ListView icon problem

2009-08-29 Thread Sonic

Hi all,

I would be VERY greatful if you could help me with this one, its
literally driving me insane, been trying to do this for 2 days now.

I have a listview, now what I want to do it is, when a position in the
listview gets clicked on, it changes the icon for that position, to a
drawable named ok.png . Simple,

Below is the method I use to fill the ListView

Java:

private void fillData() {
// Get all of the notes from the database and create the item
list
Cursor c = mDbHelper.fetchAllNotes();
startManagingCursor(c);

//String[] from = new String[] { DbAdapter.KEY_TITLE };

int[] to = new int[] { R.id.text1 };

// Now create an array adapter and set it to display using our
row
SimpleCursorAdapter notes =
new SimpleCursorAdapter(this, R.layout.row, c, from, to);

setListAdapter(notes);




}



and the array that is first declared:

Java:

public class QuickList extends ListActivity implements
View.OnClickListener{
 //declares
 Button add;
 EditText input;
 private DbAdapter mDbHelper;
 private int mNoteNumber = 1;
private static final int DELETE_ID = Menu.FIRST;
String[] from = new String[] { DbAdapter.KEY_TITLE };



I would REALLY appreciate some help with this.

Thanks in advance.

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