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


Java ActionButton.setButtonColorPressed方法代码示例

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


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

示例1: setupFAB

import com.software.shell.fab.ActionButton; //导入方法依赖的package包/类
private void setupFAB() {
    fab = (ActionButton) findViewById(R.id.action_button);
    fab.setType(ActionButton.Type.DEFAULT);
    fab.setButtonColor(getResources().getColor(R.color.orange));
    fab.setButtonColorPressed(getResources().getColor(R.color.orange_dark));
    fab.setImageResource(R.drawable.ic_pin_drop_white_24dp);

    fab.setShowAnimation(ActionButton.Animations.ROLL_FROM_DOWN);
    fab.setHideAnimation(ActionButton.Animations.ROLL_TO_DOWN);

    fab.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            ((ActionButton) v).hide();
            ((ActionButton) v).playHideAnimation();
            setSavePointMode();
        }
    });
}
 
开发者ID:katanagari7c1,项目名称:EE23_FastAndroid,代码行数:20,代码来源:Main.java

示例2: makeActionButton

import com.software.shell.fab.ActionButton; //导入方法依赖的package包/类
public ActionButton makeActionButton(ActionButton ab, int drawable) {
    // Creates, and sets ActionButtons
    ab.setButtonColor(getResources().getColor(R.color.primary_color));
    ab.setButtonColorPressed(getResources().getColor(R.color.dark_primary));
    ab.setImageDrawable(getResources().getDrawable(drawable));

    return ab;
}
 
开发者ID:DylanRedfield,项目名称:AutoAgend,代码行数:9,代码来源:ClassActivity.java

示例3: onCreate

import com.software.shell.fab.ActionButton; //导入方法依赖的package包/类
@Override
protected void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_maps);

    // Obtain the SupportMapFragment and get notified when the map is ready to be used.
    SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
            .findFragmentById(R.id.map);
    mapFragment.getMapAsync(this);
    SupportStreetViewPanoramaFragment streetViewPanoramaFragment =
            (SupportStreetViewPanoramaFragment)
                    getSupportFragmentManager().findFragmentById(R.id.streetviewpanorama);
    streetViewPanoramaFragment.getStreetViewPanoramaAsync(this);

    mAct = this;
    mRequestingLocationUpdates = true;

    final ActionButton ab = (ActionButton) findViewById(R.id.action_button);

    ab.setImageResource(R.drawable.ic_qr);
    ab.setShowAnimation(ActionButton.Animations.JUMP_FROM_DOWN);
    ab.setHideAnimation(ActionButton.Animations.JUMP_TO_DOWN);
    ab.setButtonColor(getResources().getColor(R.color.fab_material_amber_500));
    ab.setButtonColorPressed(getResources().getColor(R.color.fab_material_amber_900));

    ab.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            ab.hide();
            new IntentIntegrator(mAct).initiateScan();
            new Handler().postDelayed(new Runnable() {
                @Override
                public void run() {
                    ab.show();
                }
            }, 1000);
        }
    });

    mLocationReceiver = new BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {
            mPreviousLocation = mCurrentLocation;
            mCurrentLocation = intent.getParcelableExtra(LocationUpdaterService.COPA_MESSAGE);
            updateMap();
            mLocationsList.add(mCurrentLocation);

            if (BuildConfig.DEBUG) {
                Log.d(TAG, "LocationList size: " + mLocationsList.size());
            }
        }
    };

    mRequestLocationIntent = new Intent(this, LocationUpdaterService.class);
    startService(mRequestLocationIntent);

    // Update values using data stored in the Bundle.
    updateValuesFromBundle(savedInstanceState);
}
 
开发者ID:elbaulp,项目名称:grado_informatica_npi,代码行数:60,代码来源:MapsActivity.java

示例4: onCreate

import com.software.shell.fab.ActionButton; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_create_quote);

    toolbar = (Toolbar) findViewById(R.id.toolbar);

    if (toolbar != null) {
        setSupportActionBar(toolbar);
    }
    getSupportActionBar().setTitle("");
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    getSupportActionBar().setDisplayShowHomeEnabled(true);


    quote = (EditText) findViewById(R.id.quoteEt);
    author = (EditText) findViewById(R.id.authorEt);

    ActionButton actionButton = (ActionButton) findViewById(R.id.action_button);
    actionButton.setType(ActionButton.Type.DEFAULT);
    actionButton.setButtonColor(getResources().getColor(R.color.accent));

    actionButton.setButtonColorPressed(getResources().getColor(R.color.primary_dark));
    actionButton.setImageResource(R.drawable.send);
    actionButton.removeShadow();

    actionButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {


            if (quote.getText().toString().length()<1){
                YoYo.with(Techniques.Pulse)
                        .delay(10)
                        .duration(500)
                        .playOn(quote);

            }else if(author.getText().toString().length()<1 ){
                YoYo.with(Techniques.Pulse)
                        .delay(10)
                        .duration(500)
                        .playOn(author);

            }else {

                ParseObject gameScore = new ParseObject("Quote");
                gameScore.put("time", new Date().getTime());
                gameScore.put("quote", quote.getText().toString());
                gameScore.put("author", author.getText().toString());
                gameScore.put("user", ParseUser.getCurrentUser().getObjectId());
                gameScore.put("user_name", ParseUser.getCurrentUser().getUsername());
                gameScore.put("user_id", ParseUser.getCurrentUser().get("user_id"));
                gameScore.saveInBackground();
                Toast.makeText(CreateQuoteActivity.this, "Succesfully Posted", Toast.LENGTH_SHORT).show();
                finish();
            }
        }
    });



}
 
开发者ID:CompetentGroove,项目名称:quoteit_android,代码行数:63,代码来源:CreateQuoteActivity.java


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