टेक्स्ट व्यू अदृश्य क्यों नहीं होता है? यहाँएक दृश्य के बाद दृश्यता कार्य क्यों सेट नहीं किया गया है एनिमेटेड है?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/tvRotate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Rotate Me"
/>
</LinearLayout>
..और मेरे गतिविधि है:
यहाँ मेरी लेआउट एक्सएमएल है
public class RotateMeActivity extends Activity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
TextView tvRotate = (TextView) findViewById(R.id.tvRotate);
RotateAnimation r = new RotateAnimation(0, 180, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
r.setDuration(0);
r.setFillAfter(true);
tvRotate.startAnimation(r);
tvRotate.setVisibility(View.INVISIBLE);
}
}
मेरा लक्ष्य एक दृश्य को घुमाने और फिर छिपाने के लिए और कोड में यह दिखाने के लिए सक्षम होने के लिए है सेट दृश्यता सेट करके। निम्नलिखित काम करता है, लेकिन setRotation केवल API स्तर में उपलब्ध है 11. मैं 10.
tvRotate.setRotation(180);//instead of the RotateAnimation, only works in API Level 11
tvRotate.setVisibility(View.INVISIBLE);
तो, बी को छिपाने का कोई तरीका है घुमावदार के बाद बनी रहती है? – ZippyFerguson
एक ही समस्या ... – SunnySonic