У меня следующий экран:
http://i54.tinypic.com/1zlw28i.png
И я пытаюсь повернуть текст, а затем установить текст на этой кнопке.
Для этого у меня есть следующий макет:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_width="fill_parent"
android:orientation="horizontal"
android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"
>
<SurfaceView android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/surface_camera" />
<FrameLayout
android:layout_width="60dip"
android:layout_height="fill_parent"
>
<Button android:layout_width="60dip"
android:id="@+id/btnPhoto"
android:layout_height="fill_parent"/>
<TextView
android:layout_width="60dip"
android:id="@+id/textview"
android:textColor="#000000"
android:layout_height="fill_parent"
/>
</FrameLayout>
</RelativeLayout>
И затем я пытаюсь использовать анимацию для поворота моего текста:
Файл: res/anim/myanim:
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:toDegrees="-90"
android:pivotX="50%"
android:pivotY="50%"
android:duration="0" />
А потом я делаю в onCreate()
:
te = (TextView) findViewById(R.id.textview);
te.setText(t);
RotateAnimation ranim = (RotateAnimation)AnimationUtils.loadAnimation(this, R.anim.myanim);
ranim.setFillAfter(true);
te.setAnimation(ranim);
Но, к сожалению, на моей кнопке нет текста. Есть идеи?