[android-developers] Re: display PNG images as icons

2014-06-20 Thread abhi
probably you can do it in Photoshop or Gimp tool itself, as you might only 
want to remove the white background

On Friday, June 20, 2014 9:34:07 AM UTC+5:30, prudhvi wrote:

 Hi Guys , 

  

  

 I am using grid view layout for home page display . For this  , I intend 
 to display an icon for each functionality (ex: home , print , people , 
 campus..etc).

  

 When I copy the image ICON  into drawable folder they are being converted 
 into PNG images . Is there any way to display those PNG Images as icons in 
 the gridview .

 I have to exclude the background of an  image(white color as shown in 
 figure)

  

  

 Thanks,

 NaGa

  

  


-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Bug with Animation on Android?

2014-06-20 Thread Rafa Firenze


this is quite difficult to explain, but here we go!

Ok, the transition until I get the Fragment where the Animation is placed 
would be:

MainActivity (extends Activity) - loginActivity (extendsActivity) - now I 
call:

Intent homeIntent = new Intent(loginActivity.this, HomeActivity.class);Bundle 
bundle = new Bundle();
bundle.putSerializable(risposta,(Serializable)risposta);
homeIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // read below 
homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK); // read below 
homeIntent.putExtras(bundle);
startActivity(homeIntent);

which starts *HomeActivity* which extends *FragmentActivity* and at the end 
of onCreateView() I add my Fragment *CircleFragment* that @Overrides this 
on onResume():

RotateAnimation rotateAnimation1 = new RotateAnimation(0, 360,
Animation.RELATIVE_TO_SELF, 0.5f,
Animation.RELATIVE_TO_SELF, 0.5f);
rotateAnimation1.setInterpolator(new LinearInterpolator());
rotateAnimation1.setDuration(4000);
rotateAnimation1.setRepeatCount(Animation.INFINITE);
radar.startAnimation(rotateAnimation1);

or XML (tried both):

?xml version=1.0 encoding=utf-8?rotate
  xmlns:android=http://schemas.android.com/apk/res/android;
  android:fromDegrees=0
  android:interpolator=@android:anim/linear_interpolator
  android:toDegrees=360
  android:pivotX=50%
  android:pivotY=25%
  android:duration=4000
  android:startOffset=0/

*WHAT HAPPENS?*

*SOMETIMES* it works bad (sometimes fine!): it starts arround ~(50%, 25%) 
(or 0.5, 0.25), not exactly (calculated) but if I let the screen go off and 
I resume it, everything works again :O

*WHY IS IT STRANGE?*

   1. do you see the two lines commented which cleans the task and start 
   the activity on top ? if I don't set that, everything is OK
   2. If I start it as MainActivity - HomeActivity and doing finish 
   (instead clearing tasks), it works as well fine.

What's happening?

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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.