English 中文(简体)
甲型六氯环己烷
原标题:android apply color to alpha animation

是否有办法对甲型六氯环己烷和甲型六氯环己烷进行图谱? 我知道如何使用<代码><alpha>要素,但希望甲型六氯环己烷和甲型六氯环己烷能够应用一种颜色和一种甲型六氯环己烷,这样一来就能够突出布局。 这是可能的。

最佳回答

www.un.org/Depts/DGACM/index_spanish.htm 估算中不能包括只有甲型六氯环己烷(甲型六氯环己烷)的颜色变化、轮换、比额表和翻译。

尽管如此,你仍可以通过把两种不同颜色的物体压在彼此之上,并在其中或外ding上。

也可以看TransitionDrawableTextSwitcher/,以达到类似目的。 我们希望,我们将能够在未来的更新中得到对彩色估算的充分支持。

问题回答

在这里,我的解决办法是评估屏幕的particular region(见下文)。 请注意,该守则针对的是>=AP9的装置。

“entergraph

Beginner, Just and Paste.

<>FadeAnimationColored.java

public class FadeAnimationColored {

private View view;
private float maxBrightness = 1.0f;
private float minBrightness = 0.0f;
private long duration = 400L;
private long startOffset = 0L;
private int color = android.R.color.white;

// Constructors...

public FadeAnimationColored(View view, String color, float maxBrightness, float minBrightness, long duration, long startOffset) {
    this.view = view;
    this.color = Color.parseColor(color);
    this.maxBrightness = maxBrightness;
    this.minBrightness = minBrightness;
    this.duration = duration;
    this.startOffset = startOffset;
    prepareView();
}


public void fadeOut() {
    this.view.setAlpha(1f);
    Animation anim = new AlphaAnimation(minBrightness, maxBrightness);
    anim.setDuration(duration);
    anim.setStartOffset(startOffset);
    anim.setFillEnabled(true);
    anim.setFillAfter(true);
    view.startAnimation(anim);
}


public void fadeIn() {
    Animation anim = new AlphaAnimation(maxBrightness, minBrightness);
    anim.setDuration(duration);
    anim.setStartOffset(startOffset);
    anim.setFillEnabled(true);
    anim.setFillAfter(true);
    view.startAnimation(anim);
}


private void prepareView() {
    this.view.setBackgroundColor(this.color);
    this.view.setAlpha(0f);
}
}

之后增加 您的布局,认为它是一种超支(我使用一个简单的<代码>FrameLayout,该编码为match_ 即)。

这里是一个幻灯片,它表明如何在你的活动或分裂中 an清:

FrameLayout interceptorFrame = (FrameLayout) mView.findViewById(R.id.fl_interceptor);

final FadeAnimationColored fadeAnimationLayout =
        new FadeAnimationColored(interceptorFrame, MaterialColor.GREY_800, 0.9f, 0.0f, 400L, 0);

mFabMenu.setOnMenuToggleListener(new FloatingActionMenu.OnMenuToggleListener() {
    @Override
    public void onMenuToggle(boolean opened) {
        if (opened) {
            fadeAnimationLayout.fadeOut();
        } else {
            fadeAnimationLayout.fadeIn();
        }
    }
});




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签