本文整理汇总了Java中com.gc.materialdesign.views.ButtonRectangle类的典型用法代码示例。如果您正苦于以下问题:Java ButtonRectangle类的具体用法?Java ButtonRectangle怎么用?Java ButtonRectangle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ButtonRectangle类属于com.gc.materialdesign.views包,在下文中一共展示了ButtonRectangle类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.gc.materialdesign.views.ButtonRectangle; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_register);
toolbar = (Toolbar) findViewById(R.id.toolbar_register);
et_account = (EditText) findViewById(R.id.et_register_account);
et_password = (EditText) findViewById(R.id.et_register_password);
bt_register = (ButtonRectangle) findViewById(R.id.bt_register);
toolbar.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
toolbar.setTitle("注册");
toolbar.setTitleTextColor(getResources().getColor(R.color.white));
bt_register.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
register();
}
});
}
开发者ID:JianxunRao,项目名称:FangYanShuo,代码行数:24,代码来源:RegisterActivity.java
示例2: initView
import com.gc.materialdesign.views.ButtonRectangle; //导入依赖的package包/类
private void initView()
{
llGeneralJournal = (LinearLayout) findViewById(R.id.ll_general_journal);
llEnchashment = (LinearLayout) findViewById(R.id.ll_enchashment);
llAssetsAnalysis = (LinearLayout) findViewById(R.id.ll_assets_analysis);
llGeneralJournal.setOnClickListener(this);
llEnchashment.setOnClickListener(this);
llAssetsAnalysis.setOnClickListener(this);
etBuyNumber = (MyEditText) findViewById(R.id.et_buy_number);
btnBuy = (ButtonRectangle) findViewById(R.id.btn_buy);
etGetNumber = (MyEditText) findViewById(R.id.et_get_number);
btnGet = (ButtonRectangle) findViewById(R.id.btn_get);
btnGet.setOnClickListener(this);
btnBuy.setOnClickListener(this);
tvBalance = (TextView) findViewById(R.id.tv_balance);
}
开发者ID:ChenAt,项目名称:Translation,代码行数:18,代码来源:TradeActivity.java
示例3: onCreateView
import com.gc.materialdesign.views.ButtonRectangle; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
View view = inflater.inflate(R.layout.dialog_composition, container, false);
ButtonRectangle createGame = (ButtonRectangle) view.findViewById(R.id.btn_create_game);
ButtonRectangle joinGame = (ButtonRectangle) view.findViewById(R.id.btn_join_game);
ButtonRectangle cancel = (ButtonRectangle) view.findViewById(R.id.btn_cancel);
createGame.setOnClickListener(this);
joinGame.setOnClickListener(this);
cancel.setOnClickListener(this);
return view;
}
开发者ID:uin3566,项目名称:GoBang,代码行数:17,代码来源:CompositionDialog.java
示例4: onCreateView
import com.gc.materialdesign.views.ButtonRectangle; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);
View view = inflater.inflate(R.layout.dialog_peer_list, container, false);
mListView = (ListView) view.findViewById(R.id.lv_peers);
mAdapter = new DeviceAdapter();
mListView.setAdapter(mAdapter);
mProgressBar = (ProgressBarCircularIndeterminate) view.findViewById(R.id.progressBarCircular);
ButtonRectangle cancel = (ButtonRectangle) view.findViewById(R.id.btn_cancel);
cancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
BusProvider.getInstance().post(new WifiCancelPeerEvent());
mSalutDevices.clear();
mBlueToothDevices.clear();
}
});
return view;
}
开发者ID:uin3566,项目名称:GoBang,代码行数:25,代码来源:PeersDialog.java
示例5: initView
import com.gc.materialdesign.views.ButtonRectangle; //导入依赖的package包/类
private void initView(View view) {
mGoBangBoard = (GoBangBoard) view.findViewById(R.id.go_bang_board);
mGoBangBoard.setOnTouchListener(this);
mGoBangBoard.setPutChessListener(this);
mCurrentWhite = mIsWhiteFirst;
mStartGame = (ButtonRectangle) view.findViewById(R.id.btn_start_game);
mStartGame.setOnClickListener(this);
mStartFirst = (ButtonRectangle) view.findViewById(R.id.btn_start_first);
mStartFirst.setOnClickListener(this);
ButtonRectangle exitGame = (ButtonRectangle) view.findViewById(R.id.btn_exit_game);
exitGame.setOnClickListener(this);
}
开发者ID:uin3566,项目名称:GoBang,代码行数:17,代码来源:CoupleGameFragment.java
示例6: addAboutLibrariesActivity
import com.gc.materialdesign.views.ButtonRectangle; //导入依赖的package包/类
private void addAboutLibrariesActivity() {
ButtonRectangle button = (ButtonRectangle) this.findViewById(R.id.about_libraries);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
new LibsBuilder()
.withActivityTitle(ActivityHomepage.this.getString(R.string.app_name))
.withAboutIconShown(true)
.withAboutVersionShown(true)
.withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
.start(ActivityHomepage.this);
}
});
}
开发者ID:edsilfer,项目名称:marvel-characters,代码行数:15,代码来源:ActivityHomepage.java
示例7: initView
import com.gc.materialdesign.views.ButtonRectangle; //导入依赖的package包/类
private void initView(View root){
ButtonRectangle coupeTextView = (ButtonRectangle) root.findViewById(R.id.tv_coupe_mode);
ButtonRectangle wifiTextView = (ButtonRectangle) root.findViewById(R.id.tv_wifi_mode);
ButtonRectangle blueToothTextView = (ButtonRectangle) root.findViewById(R.id.tv_blue_tooth_mode);
coupeTextView.setOnClickListener(this);
wifiTextView.setOnClickListener(this);
blueToothTextView.setOnClickListener(this);
}
开发者ID:uin3566,项目名称:GoBang,代码行数:10,代码来源:MainFragment.java
示例8: initView
import com.gc.materialdesign.views.ButtonRectangle; //导入依赖的package包/类
private void initView(View view) {
mBoard = (GoBangBoard) view.findViewById(R.id.go_bang_board);
mBoard.setOnTouchListener(this);
mBoard.setPutChessListener(this);
ButtonRectangle restart = (ButtonRectangle) view.findViewById(R.id.btn_restart);
restart.setOnClickListener(this);
ButtonRectangle exitGame = (ButtonRectangle) view.findViewById(R.id.btn_exit);
exitGame.setOnClickListener(this);
mMoveBack = (ButtonRectangle) view.findViewById(R.id.btn_move_back);
mMoveBack.setOnClickListener(this);
mMoveBack.setText(makeMoveBackString());
}
开发者ID:uin3566,项目名称:GoBang,代码行数:16,代码来源:NetGameFragment.java
示例9: ItemViewHolder
import com.gc.materialdesign.views.ButtonRectangle; //导入依赖的package包/类
public ItemViewHolder(View view) {
imgTranslate = ButtonRectangle.class.cast(view.findViewById(R.id.iv_translate));
tvSubtitle = TextView.class.cast(view.findViewById(R.id.tvSubtitle));
}
开发者ID:DuongNTdev,项目名称:StudyMovie,代码行数:5,代码来源:SubtitleListViewAdapter.java
示例10: showDetails
import com.gc.materialdesign.views.ButtonRectangle; //导入依赖的package包/类
void showDetails() {
Image image = currentImage;
if (mDataSource.getCachedDetail(image.getFileUrl()) != null) {
image = mDataSource.getCachedDetail(image.getFileUrl());
}
View detailsView = getLayoutInflater().inflate(R.layout.details,
(ViewGroup) findViewById(android.R.id.content), false);
final TextView name = (TextView) detailsView.findViewById(R.id.name);
final TextView resolution = (TextView) detailsView.findViewById(R.id.resolution);
final TextView size = (TextView) detailsView.findViewById(R.id.size);
final TextView type = (TextView) detailsView.findViewById(R.id.type);
final TextView count = (TextView) detailsView.findViewById(R.id.count);
final TextView user = (TextView) detailsView.findViewById(R.id.user);
final FlowLayout tagsView = (FlowLayout) detailsView.findViewById(R.id.tags);
View.OnClickListener clickListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
hideImage();
hideFavorite();
tags = (String) v.getTag();
dialog.cancel();
reload();
}
};
if (image.getTagList().size() > 0) {
for (String s : image.getTagList()) {
// FlowLayout.LayoutParams params =
// new FlowLayout.LayoutParams(FlowLayout.LayoutParams.WRAP_CONTENT,
// FlowLayout.LayoutParams.WRAP_CONTENT);
// params.setMargins(0, 0, 20, 20);
ButtonRectangle button = (ButtonRectangle) getLayoutInflater().
inflate(R.layout.tag_button, tagsView, false);
button.setText(s.replace('_', ' '));
button.setTag(s);
button.setOnClickListener(clickListener);
tagsView.addView(button/*, params*/);
tagsView.invalidate();
button.setBackgroundColor(Utils.String2Color(s));
}
} else {
((View) tagsView.getParent()).setVisibility(View.GONE);
}
name.setText(image.getName());
resolution.setText("" + image.getWidth() + "x" + image.getHeight());
if (image.getSize() > 0) {
size.setText(Utils.humanReadableByteCount(image.getSize(), true));
} else {
((View) size.getParent()).setVisibility(View.GONE);
}
type.setText(image.getType());
if (image.getCount() > 0) {
count.setText("" + image.getCount());
} else {
((View) count.getParent()).setVisibility(View.GONE);
}
if (!image.getUser().isEmpty()) {
user.setText(image.getUser());
} else {
((View) user.getParent()).setVisibility(View.GONE);
}
AlertDialog.Builder builder = new AlertDialog.Builder(this)
.setTitle(R.string.info)
.setView(detailsView)
.setPositiveButton(android.R.string.ok, null);
dialog = builder.create();
dialog.show();
}
开发者ID:kurumi-moe,项目名称:MoeGallery,代码行数:82,代码来源:MainActivity.java
注:本文中的com.gc.materialdesign.views.ButtonRectangle类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论