[android-developers] Re: Two buttons side by side to fill width of screen?

2010-09-06 Thread HIRAK
CHeck the layout orientation property and use it alongwith the weight
property in a LinearLayout

On Sep 6, 1:52 pm, Droid rod...@gmail.com wrote:
 With LinearLayout I believe I cannot two get buttons side by side?

 On Sep 6, 7:35 pm, OldSkoolMark m...@sublimeslime.com wrote:



  Consider LinearLayout. You can use layout_weight to achieve
  proportional sizing.

  On Sep 6, 12:26 am, Droid rod...@gmail.com wrote:

   I have 2 buttons side by side in RelativeLayout (170dip each) but in
   landscape view, they are too narrow - I want to increase their widths
   automatically for landscape.

   I need a 'fill_parent' for two buttons at once kinda thing.

   Can anyone point me in the right direction.

   Here is my layout:

   ?xml version=1.0 encoding=utf-8?
   RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
   android
       android:layout_width=fill_parent
       android:background=#00
       android:layout_height=fill_parent

   Button android:text=@string/get_answer
   android:id=@+id/Button02
   android:layout_centerHorizontal=true
   android:layout_width=170dip
   android:layout_alignParentLeft=true
   android:layout_height=wrap_content/Button

   Button android:text=@string/speak_answer
   android:id=@+id/Button03
   android:layout_centerHorizontal=true
   android:layout_width=170dip
   android:layout_toRightOf=@id/Button02
   android:layout_alignTop=@id/Button02
   android:layout_height=wrap_content/Button

   TextView android:text=  android:id=@+id/TextView01
   android:layout_below=@+id/Button03    android:textColor=#ff
   android:textStyle=bold android:textSize=1dip
   android:layout_width=wrap_content android:layout_height=1dip/
   TextView
   TextView android:text=  android:id=@+id/TextView02
   android:layout_below=@+id/TextView01 android:textColor=#00
   android:textStyle=bold android:textSize=20dip
   android:layout_width=wrap_content
   android:layout_height=wrap_content/TextView
   TextView android:text=  android:id=@+id/TextView03
   android:layout_below=@+id/TextView02  android:textColor=#ff00ff
   android:textStyle=bold android:textSize=20dip
   android:layout_width=wrap_content
   android:layout_height=wrap_content/TextView
   TextView android:text=  android:id=@+id/TextView04
   android:layout_below=@+id/TextView03  android:textColor=#ff
   android:textStyle=bold android:textSize=20dip
   android:layout_width=wrap_content
   android:layout_height=wrap_content/TextView
   TextView android:text=  android:id=@+id/TextView05
   android:layout_below=@+id/TextView04
   android:layout_width=wrap_content
   android:layout_height=wrap_content/TextView
   TextView android:text=  android:id=@+id/TextView06
   android:layout_below=@+id/TextView05
   android:layout_width=wrap_content
   android:layout_height=wrap_content/TextView
   TextView android:text=  android:id=@+id/TextView07
   android:layout_below=@+id/TextView06
   android:layout_width=wrap_content
   android:layout_height=wrap_content/TextView
   TextView android:text=   android:id=@+id/TextView08
   android:layout_below=@+id/TextView07
   android:layout_width=wrap_content
   android:layout_height=wrap_content/TextView

   /RelativeLayout

-- 
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 State does not toggle automatically!! Help!

2010-08-26 Thread HIRAK
Did you try invalidate ?

On Aug 26, 7:00 am, Abhi abhishek.r.sha...@gmail.com wrote:
 guys,

 I have had no luck yet with getting this to work... any help would be
 appreciated

 thanks

 On Aug 23, 1:40 am, Marian Raafat mar...@extremesolution.com
 wrote:



  Hi,

  Trybutton.setEnabled(false);button.setEnabled(true);

  I hope that would help :)

  Marian

  -Original Message-
  From: android-developers@googlegroups.com

  [mailto:android-develop...@googlegroups.com] On Behalf OfAbhi
  Sent: Monday, August 23, 2010 4:30 AM
  To: Android Developers
  Subject: [android-developers]ButtonState does not toggle
  automatically!! Help!

  Guys,

  I am trying to get thebuttonin my layout to have focus as I am
  programmatically changing its state. My application is a video player
  using VideoView. I am toggling the state of thebuttonbased on where
  my video is. So basically, I am doing videoview.getCurrentPosition()
  and if it is in a certain window, I want to toggle myButtonstate
  (enabled to disabled and vice versa). The layout is LinearLayout and I
  have the VideoView andButtonlayed horizontally. When I first had the
  MediaController in my Video, thebuttonwould change focus on touching
  the videoview (which is when the MediaController would pop up). I
  later removed the controller because I didn't want thebuttonstate to
  change when the user touches the screen. I want it to change
  automatically.

  I tried all sorts of combinations 
  possible.button.setFocusable(),button.requestFocus(),button.bringToFront() 
  and so on. But none of
  them seem to work.

  Is there any way I can make it toggle programatically and without user
  intervention through touch? or is it impossible to do it with the
  VideoView?

  Thanks,

  Abhi

  --
  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] Re: App download too less

2010-08-15 Thread HIRAK
My young brothers idea. I just tried to create something for him.
Though the name must be cheesy, but it took me solid efforts to create
the jigsaw puzzle logic.
So, please don't judge the book from its cover. I promise to create
similar games with nice names and nice images of cars, cats etc.

On Aug 14, 10:07 am, TreKing treking...@gmail.com wrote:
 On Sat, Aug 14, 2010 at 3:44 AM, HIRAK hirak1...@gmail.com wrote:
  I created a image puzzle app named Sexy Image Puzzle

  But the app has too less downloads so far.

  Could anyone use this app and let me know, what is going wrong?

 Creating an app with sexy in the title is probably the first thing putting
 people off.

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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: App download too less

2010-08-15 Thread HIRAK
Yes, you are absolutely right and I am not uploading anything before I
create something more interesting and well tested.

But it took some solid efforts to create this puzzle. The theme may be
cheesy, but the app is not a spam or a junk.
Unless there is some issue loading the images or the execution of the
app in phones, the app is quite interesting ( though I know it is
subjective).

Now, as there is still half a month, before I can afford buying the
dev phone, I needed somebody to let me know what are the errors users
get while using it in their phones.

But thanks anyways, for the replies and the suggestions. Agree and
appreciate all of it.


On Aug 14, 11:54 am, DanH danhi...@ieee.org wrote:
 Maybe you should wait until you learn how to program before you upload
 apps.  Uploading crummy apps is a good way to build a bad reputation.

 The app store isn't intended as a place for amateurs to display their
 first efforts, and when you do that you degrade the value of the app
 store to everyone.

 On Aug 14, 3:44 am, HIRAK hirak1...@gmail.com wrote:



  Hi,
  I am a newcomer to android development.
  I created a image puzzle app named Sexy Image Puzzle
  It is a simple jigsaw puzzle.
  As I have just started developing for android, I didn't buy the dev
  phone yet. I tested the application in Emulator.

  I was planning to create similar puzzles for Cars too. But the app has
  too less downloads so far.

  Could anyone use this app and let me know, what is going wrong?
  It is a free application, so there is no payment involved. I just want
  to know some feedbacks, what is going wrong.

  This is a small help, I need from you guys, till the time I buy my dev
  phone (probably starting september)

-- 
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] App download too less

2010-08-14 Thread HIRAK
Hi,
I am a newcomer to android development.
I created a image puzzle app named Sexy Image Puzzle
It is a simple jigsaw puzzle.
As I have just started developing for android, I didn't buy the dev
phone yet. I tested the application in Emulator.

I was planning to create similar puzzles for Cars too. But the app has
too less downloads so far.

Could anyone use this app and let me know, what is going wrong?
It is a free application, so there is no payment involved. I just want
to know some feedbacks, what is going wrong.

This is a small help, I need from you guys, till the time I buy my dev
phone (probably starting september)

-- 
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: Error after publishing

2010-08-09 Thread HIRAK
This is the stacktrace I received, when I published the app.
Now, nowhere in the stacktrace, my classes are mentioned.
So I am not able to understand, where the code is breaking.
So I thought, if anybody can give me some hint, about how to go
forward with solving this issue.



On Aug 8, 2:52 am, TreKing treking...@gmail.com wrote:
 On Sat, Aug 7, 2010 at 5:22 PM, HIRAK hirak1...@gmail.com wrote:
  Could somebody please help me?

 I'm sorry, but how exactly do you expect people to help you?
 That stack trace you posted shows nothing other than the obvious fact that
 you have a NullPointer somewhere.
 We know nothing about your app or what is causing your error. If you don't
 know what the problem is, how would we?

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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] Error after publishing

2010-08-07 Thread HIRAK
My application runs fine when locally testing.
But after publishing it, i am seeing the following error in my
developer console page.
Could somebody please help me?

java.lang.NullPointerException:
  at android.app.ActivityThread.handleStopActivity(ActivityThread.java:
3269)
  at android.app.ActivityThread.access$2500(ActivityThread.java:119)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
1880)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:123)
  at android.app.ActivityThread.main(ActivityThread.java:4363)
  at java.lang.reflect.Method.invokeNative(Method.java:-2)
  at java.lang.reflect.Method.invoke(Method.java:521)
  at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:860)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
  at dalvik.system.NativeStart.main(NativeStart.java:-2)

-- 
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] Persist a variable value

2010-08-06 Thread HIRAK
Hi,
I am creating a gallery. User can use Next/Prev button to browse
through the images.
Now when user is done with browsing, (s)he will kill the app.
Next time he opens the app, it should take him/her to the last viewed
image.

Obviously I have to store the last index somewhere. Just for one
index, I dont want to have a DB module.
Is there any simple way to store the value?

-- 
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: Persist a variable value

2010-08-06 Thread HIRAK
SharedPreferences should help me. (I just started reading about them).

Based on my above requirement, shall I use onDestroy method for the
saving purposes?

Please forgive my ignorance :(

On Aug 5, 11:25 pm, Ivan iwan.mem...@gmail.com wrote:
 Try shared preferences.

 On Aug 6, 9:08 am, Martins Streņģis martin...@draugiem.lv wrote:



  db is simple  :)

  but if you dont want db you could try files

-- 
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: Persist a variable value

2010-08-06 Thread HIRAK
Nevermind,
I am saving the latest value, everytime user clicks on prev or next.
That's perfectly working fine.
You guys rock :)

On Aug 5, 11:39 pm, HIRAK hirak1...@gmail.com wrote:
 SharedPreferences should help me. (I just started reading about them).

 Based on my above requirement, shall I use onDestroy method for the
 saving purposes?

 Please forgive my ignorance :(

 On Aug 5, 11:25 pm, Ivan iwan.mem...@gmail.com wrote:



  Try shared preferences.

  On Aug 6, 9:08 am, Martins Streņģis martin...@draugiem.lv wrote:

   db is simple  :)

   but if you dont want db you could try files

-- 
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: Jigsaw puzzle image source

2010-08-02 Thread HIRAK
Thanks guys. I am currently checking the sites.
Can I ask for another suggestion?

Do you think it would be good idea to load images from internet
directly?
I mean, I dont want to increase the size of the application, by
storing images into the phone. Loading it from the web seemed good
idea.
But then I am not sure if users would be having lower bandwidths,
which might impact the downloading of images, or maybe they have to
incur extra cost based on their data plan.

What should be the best practice in this case?

Thanks
Hirak

On Aug 1, 6:49 am, Tudor tudo...@gmail.com wrote:
 Take a look athttp://creativecommons.org/ and you will a find a good
 source of images that should meet your needs and are licensed for such
 a use, in many cases you will need to add a credit citing the source
 of the image, but that's all.

 On Jul 30, 2:23 am, HIRAK hirak1...@gmail.com wrote:



  I guys,

  I am creating a basic jigsaw puzzle for android.
  The code is almost ready but I am facing problem in finding images for
  the puzzle.

  The User should be able to get new image every time they click Next.
  Upon selecting an image, the application will create puzzle for the
  selected image.

  For this requirement, I need a constant source of public images.
  Can someone please help me find such image source that can be used in
  the app?

  My app will be free, so I think it can be considered as Non-Comercial
  usage of images.

  Thanks
  H.C

-- 
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: WAnt to break an image into pieces...........

2010-07-31 Thread HIRAK
Dividing into pieces of same size is easy.
You have to write your own logic, to divide it into pieces of
different size.

But anyways, you need to read about the Bitmap api and also
BitmapDrawable.

On Jun 1, 11:32 am, TreKing treking...@gmail.com wrote:
 On Tue, Jun 1, 2010 at 1:16 PM, Dixit Wadhwani dixitwadhw...@gmail.comwrote:

  I want to develop a Jigsaw puzzle game ,  so i need to know how can i break
  images into matrices of varying sizes.

 This is a very broad and generic question. Have you tried anything so far?
 If not, starting with documentation on Images and Bitmaps and seeing what
 you can do with them would be a good thing to do.

 --- 
 --
 TreKing - Chicago transit tracking app for Android-powered 
 deviceshttp://sites.google.com/site/rezmobileapps/treking

-- 
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] Jigsaw puzzle image source

2010-07-31 Thread HIRAK
I guys,

I am creating a basic jigsaw puzzle for android.
The code is almost ready but I am facing problem in finding images for
the puzzle.

The User should be able to get new image every time they click Next.
Upon selecting an image, the application will create puzzle for the
selected image.

For this requirement, I need a constant source of public images.
Can someone please help me find such image source that can be used in
the app?

My app will be free, so I think it can be considered as Non-Comercial
usage of images.


Thanks
H.C

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