how to move a button from one position to another?

by srajpal » Sun, 01 Feb 2009 12:34:19 GMT


Sponsored Links
 i cannot seem to figure out how to move a button
something like button.setTop(10);

there are gets for the top and left but no sets?

anybody have any ideas how to dynamically and programmatically move a
button around the screen?
--~--~---------~--~----~------------~-------~--~----~



how to move a button from one position to another?

by scrat...@gmail.com » Fri, 06 Mar 2009 05:23:43 GMT


 I'm needing to know the same thing.





--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


how to move a button from one position to another?

by TAKEphONE » Sun, 08 Mar 2009 17:16:06 GMT


 Hi,

I am calling on my gallery widget, and it does not move it.

The widget is set at y=0 in the layout XML,
and calling the function does not move it...

At what stage do I call it ?

TIA




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Loading database file error after decrypting

I am currently working on a project which encrypts a SQLite database
file before uploading to a fileserver. It uses "AES/CBC/NoPadding"
algorithm in encrypting and decrypting binary input through a user's
secretKey.

After downloading (InputStream) the data and decrypting it, loading
the database is successful sometimes. However, I don't get it why most
of the times, it encounters error which says:


06-18 15:02:42.989: ERROR/Database(1701): SELECT locale FROM
android_metadata failed
06-18 15:02:42.999: ERROR/Database(1701): Failed to setLocale() when
constructing, closing the database
06-18 15:02:42.999: ERROR/Database(1701):
android.database.sqlite.SQLiteException: SQL logic error or missing
database
06-18 15:02:42.999: ERROR/Database(1701):     at
android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
06-18 15:02:42.999: ERROR/Database(1701):     at
android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:
1637)
06-18 15:02:42.999: ERROR/Database(1701):     at
android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:
1587)
06-18 15:02:42.999: ERROR/Database(1701):     at
android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:
638)
06-18 15:02:42.999: ERROR/Database(1701):     at
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:
659)
06-18 15:02:42.999: ERROR/Database(1701):     at
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:
652)
06-18 15:02:42.999: ERROR/Database(1701):     at
android.app.ApplicationContext.openOrCreateDatabase(ApplicationContext.java:
482)
06-18 15:02:42.999: ERROR/Database(1701):     at
android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:
193)
06-18 15:02:42.999: ERROR/Database(1701):     at
android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:
98)
06-18 15:02:42.999: ERROR/Database(1701):     at
com.cyscorpions.secretphonebook.DBContacts.open(DBContacts.java:86)
06-18 15:02:42.999: ERROR/Database(1701):     at
com.cyscorpions.secretphonebook.LView.onWindowFocusChanged(LView.java:
71)
06-18 15:02:42.999: ERROR/Database(1701):     at
com.android.internal.policy.impl.PhoneWindow
$DecorView.onWindowFocusChanged(PhoneWindow.java:2027)
06-18 15:02:42.999: ERROR/Database(1701):     at
android.view.View.dispatchWindowFocusChanged(View.java:3694)
06-18 15:02:42.999: ERROR/Database(1701):     at
android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:655)
06-18 15:02:42.999: ERROR/Database(1701):     at
android.view.ViewRoot.handleMessage(ViewRoot.java:1782)
06-18 15:02:42.999: ERROR/Database(1701):     at
android.os.Handler.dispatchMessage(Handler.java:99)
06-18 15:02:42.999: ERROR/Database(1701):     at
android.os.Looper.loop(Looper.java:123)
06-18 15:02:42.999: ERROR/Database(1701):     at
android.app.ActivityThread.main(ActivityThread.java:4203)
06-18 15:02:42.999: ERROR/Database(1701):     at
java.lang.reflect.Method.invokeNative(Native Method)
06-18 15:02:42.999: ERROR/Database(1701):     at
java.lang.reflect.Method.invoke(Method.java:521)
06-18 15:02:42.999: ERROR/Database(1701):     at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:791)
06-18 15:02:42.999: ERROR/Database(1701):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
06-18 15:02:42.999: ERROR/Database(1701):     at
dalvik.system.NativeStart.main(Native Method)
06-18 15:02:43.019: DEBUG/AndroidRuntime(1701): Shutting down VM
06-18 15:02:43.019: WARN/dalvikvm(1701): threadid=3: thread exiting
with uncaught exception (group=0x4001da28)
06-18 15:02:43.019: ERROR/AndroidRuntime(1701): Uncaught handler:
thread main exiting due to uncaught exception
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):
android.database.sqlite.SQLiteException: SQL logic error or missing
database
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:
1637)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:
1587)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:
638)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:
659)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:
652)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
android.app.ApplicationContext.openOrCreateDatabase(ApplicationContext.java:
482)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:
193)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:
98)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
com.cyscorpions.secretphonebook.DBContacts.open(DBContacts.java:86)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
com.cyscorpions.secretphonebook.LView.onWindowFocusChanged(LView.java:
71)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
com.android.internal.policy.impl.PhoneWindow
$DecorView.onWindowFocusChanged(PhoneWindow.java:2027)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
android.view.View.dispatchWindowFocusChanged(View.java:3694)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:655)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
android.view.ViewRoot.handleMessage(ViewRoot.java:1782)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
android.os.Handler.dispatchMessage(Handler.java:99)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
android.os.Looper.loop(Looper.java:123)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
android.app.ActivityThread.main(ActivityThread.java:4203)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
java.lang.reflect.Method.invokeNative(Native Method)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
java.lang.reflect.Method.invoke(Method.java:521)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:791)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
06-18 15:02:43.039: ERROR/AndroidRuntime(1701):     at
dalvik.system.NativeStart.main(Native Method)


Do you have any idea what's wrong? Thank you in advance for answers or
suggestions.

-- 

2. Smooth Image Rotation with Gesture Control, UI Setup, Help

I'm trying to figure out the best way to make an image rotate along
with a user's finger dragging it left or right.  I want to try and
match the rate a user's finger is moving with the rate the image is
rotating.

I've got the basic setup for my application going, with the menus and
whatnot I want to have, and that's all running great on the emulator,
I'm just not sure how to approach this part.

I can code all the logic I need for my app, I'm just not doing to well
designing the UI, I have a picture in mind, I've actually made a
couple mock images of it, I just can't figure out how to get it going
in Android, and any help would be appreciated.

-- 

3. Set picture as wallpaper

4. Horay dapat juga doc to go full gratisan

5. Avoid non-static inner classes in an activity?

6. Tampilan di Galaxy Spica

7. review singkat samdroidkitchen beta3