• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ActionButton类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: onViewCreated

import com.software.shell.fab.ActionButton; //导入依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    getPresenter().onResponse();
    mRecyclerView = (RecyclerView) view.findViewById(R.id.recyclerView);
    mActionButton = (ActionButton) view.findViewById(R.id.actionButton_fragment_ad);
    RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getActivity());
    mRecyclerView.setLayoutManager(layoutManager);
    mRecyclerView.setHasFixedSize(true);
    mAdapter = new RecyclerViewMaterialAdapter(new AdAdapter(mContentItems, this));
    mRecyclerView.setAdapter(mAdapter);

    setScrollListener();

    MaterialViewPagerHelper.registerRecyclerView(getActivity(), mRecyclerView, null);
}
 
开发者ID:Fukago,项目名称:TravelBan,代码行数:17,代码来源:AdFragment.java


示例2: 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


示例3: animateActionButtonVisibility

import com.software.shell.fab.ActionButton; //导入依赖的package包/类
private void animateActionButtonVisibility(final boolean videoExist) {
    ActionButton videoBtn = binding.playVideoBtn;
    videoBtn.setEnabled(videoExist);
    Runnable r = () -> {
        // Button alpha may change during transition, we may have to wait until its end
        // to check its state.
        Timber.w("Action btn alpha: " + videoBtn.getAlpha());
        boolean actionBtnShouldAnimate = (videoExist && videoBtn.getAlpha() != 1) || (!videoExist && videoBtn.getAlpha() != 0);
        if (!actionBtnShouldAnimate) {
            return;
        }
        Animator alphaAnimator = AnimatorUtils.getAlphaAnimator(videoBtn, !videoExist);
        alphaAnimator.setDuration(600);
        alphaAnimator.start();
    };
    // Wait just in case transition is still in progress.
    videoBtn.postDelayed(r, ACTION_BUTTON_VISIBILITY_ANIM_DELAY);

}
 
开发者ID:byoutline,项目名称:kickmaterial,代码行数:20,代码来源:ProjectDetailsActivity.java


示例4: showFab

import com.software.shell.fab.ActionButton; //导入依赖的package包/类
private void showFab() {
      /*按钮动画
      fab.setShowAnimation(ActionButton.Animations.FADE_IN);
fab.setHideAnimation(ActionButton.Animations.FADE_OUT);
// 左右移动动画
fab.setShowAnimation(ActionButton.Animations.JUMP_FROM_RIGHT);
fab.setHideAnimation(ActionButton.Animations.JUMP_TO_RIGHT);*/
      // 上下移动动画
      fab.setShowAnimation(ActionButton.Animations.JUMP_FROM_DOWN);
      fab.setHideAnimation(ActionButton.Animations.JUMP_TO_DOWN);
      fab.show();
      new Handler().postDelayed(new Runnable() {
          @Override
          public void run() {
              fab.hide();
          }
      }, 2000);

  }
 
开发者ID:vihuela,项目名称:Lulu,代码行数:20,代码来源:MyFragment.java


示例5: declareActionButtons

import com.software.shell.fab.ActionButton; //导入依赖的package包/类
public void declareActionButtons() {
    mButtonClass = (ActionButton) findViewById(R.id.action_button);

    // Call to second helper method that sets properties
    makeActionButton(mButtonClass, R.drawable.ic_file_document_white_36dp);

    mButtonPicture = (ActionButton) findViewById(R.id.action_button_picture);
    makeActionButton(mButtonPicture, R.drawable.ic_camera_white_36dp);

    mButtonText = (ActionButton) findViewById(R.id.action_button_assignment);
    makeActionButton(mButtonText, R.drawable.ic_file_document_white_36dp);
}
 
开发者ID:DylanRedfield,项目名称:AutoAgend,代码行数:13,代码来源:ClassActivity.java


示例6: 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


示例7: declareActionButtons

import com.software.shell.fab.ActionButton; //导入依赖的package包/类
public void declareActionButtons() {
    mButtonClass = (ActionButton) findViewById(id.action_button);

    // Call to second helper method that sets properties
    makeActionButton(mButtonClass, R.drawable.ic_file_document_white_36dp);

    mButtonPicture = (ActionButton) findViewById(id.action_button_picture);
    makeActionButton(mButtonPicture, R.drawable.ic_camera_white_36dp);

    mButtonText = (ActionButton) findViewById(id.action_button_assignment);
    makeActionButton(mButtonText, R.drawable.ic_file_document_white_36dp);
}
 
开发者ID:DylanRedfield,项目名称:AutoAgend,代码行数:13,代码来源:MainActivity.java


示例8: addNewRemoteBookmark

import com.software.shell.fab.ActionButton; //导入依赖的package包/类
/**
 * Add new {@link Bookmark} to remote backend.
 *
 * @param newBookmark
 * 		A new {@link Bookmark}.
 * @param btn
 * 		{@link ActionButton} the button to fire the adding.
 * @param viewForSnack
 * 		{@link View} anchor for showing {@link Snackbar} messages.
 */
public void addNewRemoteBookmark( Bookmark newBookmark, ActionButton btn, View viewForSnack ) {
	//Same bookmark should not be added again.
	for( Bookmark cached : mCachedBookmarks ) {
		if( cached.equals( newBookmark ) ) {
			return;
		}
	}
	mCachedBookmarks.add( newBookmark );
	btn.setImageResource( R.drawable.ic_bookmarked );
	btn.setEnabled( false );
	addNewBookmarkInternal( newBookmark, btn, viewForSnack );
}
 
开发者ID:XinyueZ,项目名称:cusnews,代码行数:23,代码来源:BookmarksManager.java


示例9: removeRemoteBookmark

import com.software.shell.fab.ActionButton; //导入依赖的package包/类
/**
 * Remove  a {@link Bookmark} from remote backend.
 *
 * @param bookmark
 * 		An old {@link Bookmark}.
 * @param btn
 * 		{@link ActionButton} the button to fire the removing.
 * @param viewForSnack
 * 		{@link View} anchor for showing {@link Snackbar} messages.
 */
public void removeRemoteBookmark( Bookmark bookmark, ActionButton btn, View viewForSnack ) {
	for( Bookmark cached : mCachedBookmarks ) {
		if( cached.equals( bookmark ) ) {
			mCachedBookmarks.remove( cached );
			btn.setImageResource( R.drawable.ic_not_bookmarked );
			btn.setEnabled( false );
			removeBookmarkInternal( bookmark, btn, viewForSnack );
			break;
		}
	}
}
 
开发者ID:XinyueZ,项目名称:cusnews,代码行数:22,代码来源:BookmarksManager.java


示例10: 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


示例11: 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类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java QuadArray类代码示例发布时间:2022-05-22
下一篇:
Java NetworkAddressFactory类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap