제가 커스텀 토스트를 이용하여 상단에 토스트를 이용하여 상단에서 띄워주고,
애니메이션 효과는 위에서 아래로 나오게끔 하려고 합니다.
문제는 화면에 나오기는하는데 상태바랑 겹쳐지지가 않으며,
어떻게 위에서 아래로 에니메이션 효과를 넣을 수 있을지 의문입니다.
소스는 아래와 같이 되어있으며
액션은 버튼 클릭시 발생하는 형태입니다.
LayoutInflater inflater = getLayoutInflater();
View layout = inflater.inflate(R.layout.toast_custom, (ViewGroup) findViewById(R.id.toast_layout));
Toast toast = new Toast(getApplicationContext());
toast.setGravity(Gravity.TOP, 0, 0);
toast.setDuration(Toast.LENGTH_LONG);
toast.setView(layout);
toast.show();
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toast_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
style="@android:style/Theme.Holo"
android:orientation="horizontal">
<LinearLayout
android:layout_width="1280dp"
android:layout_height="65dp"
android:orientation="horizontal"
android:background="#FFEA4C"
android:gravity="center">
<ImageView
android:id="@+id/imageView1"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/img" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:textColor="#333333"
android:textSize="20dp"
android:text="알림발생."
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
</LinearLayout>