当前位置: 首页>>代码示例>>Java>>正文


Java DrawerArrowDrawable.setProgress方法代码示例

本文整理汇总了Java中android.support.v7.graphics.drawable.DrawerArrowDrawable.setProgress方法的典型用法代码示例。如果您正苦于以下问题:Java DrawerArrowDrawable.setProgress方法的具体用法?Java DrawerArrowDrawable.setProgress怎么用?Java DrawerArrowDrawable.setProgress使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.support.v7.graphics.drawable.DrawerArrowDrawable的用法示例。


在下文中一共展示了DrawerArrowDrawable.setProgress方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: openMenuDrawable

import android.support.v7.graphics.drawable.DrawerArrowDrawable; //导入方法依赖的package包/类
private void openMenuDrawable(final DrawerArrowDrawable drawerArrowDrawable, boolean withAnim) {
    if (withAnim) {
        ValueAnimator anim = ValueAnimator.ofFloat(0.0f, 1.0f);
        anim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator animation) {

                float value = (Float) animation.getAnimatedValue();
                drawerArrowDrawable.setProgress(value);
            }
        });
        anim.setDuration(MENU_ICON_ANIM_DURATION);
        anim.start();
    } else {
        drawerArrowDrawable.setProgress(1.0f);
    }
}
 
开发者ID:JasonChow1989,项目名称:Floatingsearchview-master,代码行数:18,代码来源:FloatingSearchView.java

示例2: closeMenuDrawable

import android.support.v7.graphics.drawable.DrawerArrowDrawable; //导入方法依赖的package包/类
private void closeMenuDrawable(final DrawerArrowDrawable drawerArrowDrawable, boolean withAnim) {
    if (withAnim) {
        ValueAnimator anim = ValueAnimator.ofFloat(1.0f, 0.0f);
        anim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator animation) {

                float value = (Float) animation.getAnimatedValue();
                drawerArrowDrawable.setProgress(value);
            }
        });
        anim.setDuration(MENU_ICON_ANIM_DURATION);
        anim.start();
    } else {
        drawerArrowDrawable.setProgress(0.0f);
    }
}
 
开发者ID:JasonChow1989,项目名称:Floatingsearchview-master,代码行数:18,代码来源:FloatingSearchView.java

示例3: onCreate

import android.support.v7.graphics.drawable.DrawerArrowDrawable; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    gimbal = new Gimbal(this);
    gimbal.lock();
    setContentView(R.layout.activity_about);
    ButterKnife.bind(this);
    toolbar.setTitle(R.string.app_name);
    DrawerArrowDrawable drawerArrowDrawable = new DrawerArrowDrawable(this);
    drawerArrowDrawable.setProgress(1.0f);
    toolbar.setNavigationIcon(drawerArrowDrawable);
    toolbar.setNavigationOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            onBackPressed();
        }
    });
    sensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
    gravitySensor = sensorManager.getDefaultSensor(Sensor.TYPE_GRAVITY);
    GithubClient.instance().contributors(REPO_USER, REPO_NAME, contributorResponseCallback);
}
 
开发者ID:Jawnnypoo,项目名称:PhysicsLayout,代码行数:22,代码来源:AboutActivity.java

示例4: onCreate

import android.support.v7.graphics.drawable.DrawerArrowDrawable; //导入方法依赖的package包/类
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    String name = getIntent().getStringExtra(EXTRA_FILE_NAME);
    mPath = getIntent().getStringExtra(EXTRA_FILE_PATH);

    setContentView(R.layout.activity_view_text_file);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    DrawerArrowDrawable drawerDrawable = new DrawerArrowDrawable(this);
    drawerDrawable.setColor(getResources().getColor(android.R.color.white));
    drawerDrawable.setProgress(1f);
    toolbar.setNavigationIcon(drawerDrawable);

    setSupportActionBar(toolbar);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    getSupportActionBar().setTitle(name);
    getSupportActionBar().setHomeButtonEnabled(true);

    mContentView = (TextView) findViewById(R.id.content);
    mStorage = new Storage(this);
    byte[] bytes = mStorage.readFile(mPath);
    mContentView.setText(new String(bytes));
}
 
开发者ID:snatik,项目名称:android-storage,代码行数:24,代码来源:ViewTextActivity.java

示例5: onCreate

import android.support.v7.graphics.drawable.DrawerArrowDrawable; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    /* 返回按钮图标 */
    btnReturnIcon = new DrawerArrowDrawable(this);
    btnReturnIcon.setColor(getResources().getColor(R.color.white));
    btnReturnIcon.setProgress(1f);

    receiver = new DownloadReceiver();
}
 
开发者ID:PureDark,项目名称:H-Viewer,代码行数:12,代码来源:BaseActivity.java


注:本文中的android.support.v7.graphics.drawable.DrawerArrowDrawable.setProgress方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。