本文整理汇总了Java中net.i2p.android.ext.floatingactionbutton.FloatingActionButton类的典型用法代码示例。如果您正苦于以下问题:Java FloatingActionButton类的具体用法?Java FloatingActionButton怎么用?Java FloatingActionButton使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FloatingActionButton类属于net.i2p.android.ext.floatingactionbutton包,在下文中一共展示了FloatingActionButton类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setUpInnerLayout
import net.i2p.android.ext.floatingactionbutton.FloatingActionButton; //导入依赖的package包/类
@Override
public void setUpInnerLayout(View view) {
nameText = (TextView) view.findViewById(R.id.name);
descriptionText = (TextView) view.findViewById(R.id.description);
changelogText = (TextView) view.findViewById(R.id.changelog_text);
downloadButton = (FloatingActionButton) view.findViewById(R.id.download_button);
}
开发者ID:yoinx,项目名称:kernel_adiutor,代码行数:8,代码来源:DownloadCardView.java
示例2: startView
import net.i2p.android.ext.floatingactionbutton.FloatingActionButton; //导入依赖的package包/类
private void startView(){
/* Initialize a frame layout with a hole */
mFrameLayout = new FrameLayoutWithHole(mActivity, mHighlightedView, mMotionType, mOverlay);
/* handle click disable */
handleDisableClicking(mFrameLayout);
/* setup floating action button */
if (mPointer != null) {
FloatingActionButton fab = setupAndAddFABToFrameLayout(mFrameLayout);
performAnimationOn(fab);
}
setupFrameLayout();
/* setup tooltip view */
setupToolTip();
}
开发者ID:worker8,项目名称:TourGuide,代码行数:16,代码来源:TourGuide.java
示例3: setupAndAddFABToFrameLayout
import net.i2p.android.ext.floatingactionbutton.FloatingActionButton; //导入依赖的package包/类
private FloatingActionButton setupAndAddFABToFrameLayout(final FrameLayoutWithHole frameLayoutWithHole){
// invisFab is invisible, and it's only used for getting the width and height
final FloatingActionButton invisFab = new FloatingActionButton(mActivity);
invisFab.setSize(FloatingActionButton.SIZE_MINI);
invisFab.setVisibility(View.INVISIBLE);
((ViewGroup)mActivity.getWindow().getDecorView()).addView(invisFab);
// fab is the real fab that is going to be added
final FloatingActionButton fab = new FloatingActionButton(mActivity);
fab.setBackgroundColor(Color.BLUE);
fab.setSize(FloatingActionButton.SIZE_MINI);
fab.setColorNormal(mPointer.mColor);
fab.setStrokeVisible(false);
fab.setClickable(false);
// When invisFab is layouted, it's width and height can be used to calculate the correct position of fab
invisFab.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
// make sure this only run once
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
//noinspection deprecation
invisFab.getViewTreeObserver().removeGlobalOnLayoutListener(this);
} else {
invisFab.getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
final FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
frameLayoutWithHole.addView(fab, params);
// measure size of image to be placed
params.setMargins(getXBasedOnGravity(invisFab.getWidth()), getYBasedOnGravity(invisFab.getHeight()), 0, 0);
}
});
return fab;
}
开发者ID:worker8,项目名称:TourGuide,代码行数:38,代码来源:TourGuide.java
示例4: initFAB
import net.i2p.android.ext.floatingactionbutton.FloatingActionButton; //导入依赖的package包/类
private void initFAB() {
sendFloatingActionsMenu = (FloatingActionsMenu) findViewById(R.id.sendFloatingActionsMenu);
actionSendSMS = (FloatingActionButton) findViewById(R.id.actionSendSMS);
actionSendSMS.setOnClickListener(this);
actionShare = (FloatingActionButton) findViewById(R.id.actionShare);
actionShare.setOnClickListener(this);
}
开发者ID:mirhoseini,项目名称:doostjoo,代码行数:8,代码来源:BlinkerActivity.java
注:本文中的net.i2p.android.ext.floatingactionbutton.FloatingActionButton类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论