[android-beginners] Re: Simple Animation Code

2009-09-10 Thread Kingcrowley
ok...i have got a simple animation working in this.. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.frame_animations_layout); imgView = (ImageView)findViewById(R.id.imageView);

[android-beginners] Re: Simple Animation Code

2009-08-25 Thread Kingcrowley
ok been messing around with this for a while and still no luck... so here is the code in full (probably not great code being honest) public class StartInActivityMonitor extends Activity implements SensorEventListener{ /** Called when the activity is first created. */ public Sensor

[android-beginners] Re: Simple Animation Code

2009-08-21 Thread Breese Kay
thx.I will try it. 在 2009/8/21 02:23 時, skink 寫到: > > > > On Aug 20, 11:33 am, Kingcrowley wrote: >> Weirdly if i press the home button, and then switch back to my app it >> reopens and the animation is then shown as running! >> >> Thanks, >> >> David > > hi, start your animation when view is

[android-beginners] Re: Simple Animation Code

2009-08-21 Thread skink
Kingcrowley wrote: > the imgview is not set up in onCreate but later on, > hmm, so you setVisibke(View.VISIBLE) and start() your animation on some external event, right? did you try to start() your animation in post's Runnable? post(new Runnable() {...}) pskink --~--~-~--~~--

[android-beginners] Re: Simple Animation Code

2009-08-21 Thread Kingcrowley
Maybe i didn't explain it well enough.. The main.xml file is used already, so frame_animations_layout.xml is the layout for this, see below *** http://schemas.android.com/apk/res/ android" android:orientation="vertical" android:layout_width="fill_parent" android:layo

[android-beginners] Re: Simple Animation Code

2009-08-21 Thread skink
On Aug 20, 11:33 am, Kingcrowley wrote: > Weirdly if i press the home button, and then switch back to my app it > reopens and the animation is then shown as running! > > Thanks, > > David hi, start your animation when view is already visible (not in onCreate) --~--~-~--~~--

[android-beginners] Re: Simple Animation Code

2009-08-20 Thread Pruthvi Raj
Hi,In Oncreate method set the setContentView with main.xml file and use imageVeiw id which is defined in the main.xml in u r .java file. public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); // set its background to our AnimationDrawab