本文整理汇总了Java中com.gc.materialdesign.views.ButtonFloat类的典型用法代码示例。如果您正苦于以下问题:Java ButtonFloat类的具体用法?Java ButtonFloat怎么用?Java ButtonFloat使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ButtonFloat类属于com.gc.materialdesign.views包,在下文中一共展示了ButtonFloat类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: bindViews
import com.gc.materialdesign.views.ButtonFloat; //导入依赖的package包/类
void bindViews() {
drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
leftDrawerList = (ListView) findViewById(R.id.left_drawer_list);
rightDrawer = (LinearLayout) findViewById(R.id.right_drawer);
rightDrawerList = (ListView) findViewById(R.id.right_drawer_list);
toolbar = (Toolbar) findViewById(R.id.toolbar);
recyclerView = (RecyclerView) findViewById(R.id.recycler_view);
viewPager = (ViewPager) findViewById(R.id.full_image_container);
imageContainer = (FrameLayout) findViewById(R.id.image_container);
home = (ImageButton) findViewById(R.id.home);
history = (TextView) findViewById(R.id.history);
favorite = (TextView) findViewById(R.id.favorite);
floatSearch = (ButtonFloat) findViewById(R.id.float_search);
floatFavorite = (ButtonFloat) findViewById(R.id.float_favorite);
providerNames = getResources().getStringArray(R.array.provider_names);
providerValues = getResources().getStringArray(R.array.provider_values);
transparent = getResources().getColor(R.color.transparent);
black = getResources().getColor(R.color.black);
}
示例2: onCreateView
import com.gc.materialdesign.views.ButtonFloat; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_list, container, false);
fab = (ButtonFloat) view.findViewById(R.id.new_edit_fab);
fab.setOnClickListener(this);
recyclerView = (RecyclerView) view.findViewById(R.id.list_recyclerview);
initRecyclerView();
LogUtils.e("onCreateView");
return view;
}
示例3: onCreateView
import com.gc.materialdesign.views.ButtonFloat; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_content, container, false);
fab = (ButtonFloat) view.findViewById(R.id.new_edit_fab);
fab.setOnClickListener(this);
recyclerView = (RecyclerView) view.findViewById(R.id.content_recyclerview);
initRecyclerView();
LogUtils.e("onCreateView");
return view;
}
示例4: StateButtonManager
import com.gc.materialdesign.views.ButtonFloat; //导入依赖的package包/类
public StateButtonManager(Context context,
CustomProgressBarCircularIndeterminate progressBarCircularIndeterminate,
ButtonFloat button) {
mProgressBar = progressBarCircularIndeterminate;
mButton = button;
init();
mIsLoading = false;
mAnimationDuration = mProgressBar.getContext().getResources().getInteger(R.integer.animation_fade);
updateVisibility();
}
示例5: initViews
import com.gc.materialdesign.views.ButtonFloat; //导入依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
private void initViews(){
//绑定资源
etSearch=(EditText) findViewById(R.id.aty_list_et_search);
// menu=(SatelliteMenu) findViewById(R.id.menu);
bfButton=(ButtonFloat) findViewById(R.id.buttonFloat);
biButton=(ButtonIcon) findViewById(R.id.aty_list_btn_buttonIcon);
mListView=(SlideAndDragListView) findViewById(R.id.aty_list_listview);
//初始化监听器
bfButton.setOnClickListener(this);
biButton.setOnClickListener(this);
etSearch.addTextChangedListener(filterTextWatcher);
//初始化滑动删除部分
mMenu = new Menu((int) getResources().getDimension(R.dimen.slv_item_height), new ColorDrawable(Color.LTGRAY), false);
MenuItem builder1 = new MenuItem.Builder().setWidth((int) getResources().getDimension(R.dimen.slv_item_bg_btn_width)*2)
.setBackground(new ColorDrawable(Color.RED))
.setText("删除")
.setDirection(MenuItem.DIRECTION_RIGHT)
.setTextColor(Color.WHITE)
.setTextSize((int) getResources().getDimension(R.dimen.txt_size))
.build();
mMenu.addItem(builder1);
//初始化notesList和adapter,notesList从数据库里取
getAllDataFromDatabase();
adapter=new MyAdapter(this,notesList);
mListView.setMenu(mMenu);
mListView.setAdapter(adapter);
mListView.setOnSlideListener(this);
mListView.setOnListItemLongClickListener(this);
mListView.setOnListItemClickListener(this);
mListView.setOnMenuItemClickListener(this);
mListView.setOnItemDeleteListener(this);
}
示例6: onCreate
import com.gc.materialdesign.views.ButtonFloat; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
((TweetyHuntingApplication)getApplication()).sendScreenTracking(LOG_TAG);
setContentView(R.layout.activity_tweeting);
Log.d(LOG_TAG, "onCreate");
mDensity = getResources().getDisplayMetrics().density;
mClient = new OkHttpClient();
mImageView = (GifImageView) findViewById(R.id.catImageView);
mLoader = (CustomProgressBarCircularIndeterminate) findViewById(R.id.progressBar);
mShareButton = (ButtonFloat) findViewById(R.id.shareButton);
mStateButtonLayout = (ViewGroup) findViewById(R.id.stateButton);
mShareButtonLoader = (CustomProgressBarCircularIndeterminate) findViewById(R.id.stateButtonLoader);
mCardView = (CardView) findViewById(R.id.tweet_card);
mSwipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipe_container);
mTweetEditText = (MaterialEditText) findViewById(R.id.tweetEditText);
mEditTextLayout = (LinearLayout) findViewById(R.id.editTextLayout);
mTweetEditText.setMaxCharacters(140 - getString(R.string.tweet_sufix).length() -2);
new LoaderManager(mLoader, mImageView);
mStateButtonManager = new StateButtonManager(this, mShareButtonLoader,mShareButton);
mSwipeRefreshLayout.setOnRefreshListener(this);
updateAdvertisingId();
getACat();
mTwitterManager = new TwitterManager(this.getApplicationContext(), this);
mShareButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// close keyboard
InputMethodManager imm = (InputMethodManager) getSystemService(
Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mTweetEditText.getWindowToken(), 0);
requestTweetCat();
}
});
}