मेरे ऐप में मैं अपने आकार के लगभग 120% तक विस्तारित आइकन को एनिमेट करना चाहता हूं। समस्या यह है कि जब मैं ऐसा करता हूं तो ImageView की सामग्री काट दिया जाता है। क्या ऐसा करने के लिए वैसे भी है ताकि ऐसा न हो?ImageView स्केल अप एनीमेशन कट ऑफ छवि
एनीमेशन के बुला:
Animation sgAnimation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.highlight);
charm.startAnimation(sgAnimation);
एनीमेशन ही:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true"
android:fillBefore="true"
android:interpolator="@android:anim/accelerate_interpolator"
android:shareInterpolator="true" >
<scale
android:duration="100"
android:pivotX="50%"
android:pivotY="50%"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:toXScale="1.5"
android:toYScale="1.5" />
</set>
और imageView से संबंधित लेआउट अनुभाग:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/over_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<RelativeLayout
android:id="@+id/charms_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="15dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp" >
<ImageView
android:id="@+id/charm_phone"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:alpha=".75"
android:contentDescription="@string/account_image_description"
android:src="@drawable/ic_phone_white_24dp" />
<ImageView
android:id="@+id/charm_lock"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:contentDescription="@string/account_image_description"
android:src="@drawable/ic_qs_lock_screen_off" />
<ImageView
android:id="@+id/charm_camera"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:alpha=".75"
android:contentDescription="@string/account_image_description"
android:src="@drawable/ic_camera_white_24dp" />
नोट: मैं पहले से ही wrap_content साथ 24dp की जगह की कोशिश की है, लेकिन वह
कोई पासा दुर्भाग्य से अभी भी क्लिप – BionicSheep
आप अपने लेआउट पोस्ट कर सकते हैं करें:
एक छवि को ध्यान में रखते? – AlexBalo
ने कंटेनर जोड़ा और खुद को मूल पोस्ट – BionicSheep