I'm trying to animate an imageview in height, with a var that I'll receive from a database later on. Checked stack and other sites but did not find a suitable answer, do not want do it using xml. here is some code i already have:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<ImageView
android:id="@+id/background"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/enkelzijdig" />
<ImageView
android:id="@+id/bar1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="75dp"
android:layout_marginTop="150dp"
android:src="@drawable/animatiebalk" />
</RelativeLayout>
**than where the magic should happen:**
package com.example.grafiek;
import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.widget.ImageView;
public class MainActivity extends Activity{
ImageView balk1;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_main);
balk1 = (ImageView)findViewById(R.id.balk1);
}
public void ScaleAnimation (float fromX, float toX, float fromY, float toY){
no clue what to do
}
}