android.R.anim may not have all constants?

by Hermes Pique » Fri, 20 Feb 2009 13:22:17 GMT


Sponsored Links
 Hi.

I'm using android-sdk-windows-1.1_r1.

I saw in some examples that android.R.anim has a lot of constants,
such as slide_in_right and push_down_in. However, in my android.jar I
can only see:

  // Field descriptor #8 I
  public static final int accelerate_decelerate_interpolator =
17432580;

  // Field descriptor #8 I
  public static final int accelerate_interpolator = 17432581;

  // Field descriptor #8 I
  public static final int decelerate_interpolator = 17432582;

  // Field descriptor #8 I
  public static final int fade_in = 17432576;

  // Field descriptor #8 I
  public static final int fade_out = 17432577;

  // Field descriptor #8 I
  public static final int slide_in_left = 17432578;

  // Field descriptor #8 I
  public static final int slide_out_right = 17432579;

If this is correct, how can I create a slide_in_right animation using
AnimationUtils.loadAnimation?

Thank you!

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



android.R.anim may not have all constants?

by Romain Guy » Fri, 20 Feb 2009 13:52:19 GMT


 Just use your own animation in your application. The ApiDemos show how
to create your own animation resources.






-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

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


Sponsored Links


Other Threads

1. SDK Emulator Question

How do I setup the emulator to act as a tablet instead of a phone?

-- 

2. UI Framework Bug?

I believe you have a case of view reusing.

The ArrayAdapter will reuse row views whenever possible to preserve
memory. So if you set a Bitmap to visible that might be what carries
it as visible on usually the row X+5. So that you would need to reset
everything on the view that was dynamically changed in the GetView.

For example :

@Override
    public View getView(int position, View convertView, ViewGroup
parent) {
                View v = convertView;
        if (v == null) {
            LayoutInflater vi =
(LayoutInflater)c.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            v = vi.inflate(R.layout.list_view_row, null);
        }
        TextView label = (TextView) v.findViewById(R.id.label);
        ImageView spinner = (ImageView) v.findViewById(R.id.spinner);
        MyContainer item = (MyContainer) items.get(position);

        label.setText(item.getText());
        spinner.setVisibility(View.INVISIBLE);

        if (item.isLoading()) {
                label.setText("***"+item.getText()+"***");
                spinner = (ImageView)v.findViewById(R.id.spinner);
                spinner.setVisibility(View.VISIBLE);
                Animation spinnerAnimation =
                AnimationUtils.loadAnimation(getContext(),
R.anim.rotate);
                spinner.startAnimation(spinnerAnimation);
        }

        return v;
        }

Not sure though.

Good luck.

Yahel

-- 

3. Background Task Running Implementation.

4. Passing unsigned char* from JNI/C++ to Java

5. Call an Activity or a service when phone is locked by clicking two times on the CALL button

6. Tutorial inject AHA di Xoom

7. AutoCompleteTextView with restricted input