相关疑难解决方法(0)

在更改图像资源时在ImageView上创建动画

ImageView我的布局中只有一个,当检测到gasture事件时,我正在更改其资源.我只想在更改ImageView的资源时显示动画.我可以使用ViewFlipperoneImageView的?

android

20
推荐指数
3
解决办法
4万
查看次数

在android中为imageview做出平滑的淡出

我设法在10秒后使imageView消失(我的mainActivity上的教程图像).但我希望能够顺利淡出,因为这样看起来并不好看,任何人都可以向我推荐任何好的教程

     img=(ImageView)findViewById(R.id.ImageTutorial);
    if(getIntent()!=null)
    {

        Bundle extras = getIntent().getExtras();
        String TutorialDemo=extras !=null? extras.getString("TutorialDemo"):"false";

        if(TutorialDemo.equals("true"))
        {
            Runnable mRunnable;
            Handler mHandler=new Handler();

            mRunnable=new Runnable() {

                        @Override
                        public void run() {

                            img.setVisibility(View.GONE); //This will remove the View. and free s the space occupied by the View    
                        }
                    };
                    mHandler.postDelayed(mRunnable,10*900);
        }
        else
        {
            img.setVisibility(View.GONE);
        }
         }
Run Code Online (Sandbox Code Playgroud)

这是图像视图xml

  <?xml version="1.0" encoding="utf-8"?>
  <ScrollView 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" 
 android:id="@+id/fullview"
>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_margin="10dp"
    android:orientation="vertical" >

      .
      .
      .
      .

    <ImageView
        android:contentDescription="tutorial"
        android:id="@+id/ImageTutorial"
        android:layout_width="match_parent"
        android:layout_height="120dp"
        android:layout_alignParentBottom="true"
        android:background="@drawable/tutorial"
        android:layout_marginTop="40dp" …
Run Code Online (Sandbox Code Playgroud)

android fadeout

16
推荐指数
2
解决办法
2万
查看次数

我们完成后如何淡出活动?

我有Activity一个按钮.如果用户点击Button,我启动服务并完成此操作Activity.我希望淡出它.怎么做?我试过一些方法,但似乎没有用.

android fadeout android-activity

-2
推荐指数
2
解决办法
2878
查看次数

标签 统计

android ×3

fadeout ×2

android-activity ×1