use of com.nightonke.boommenu.BoomMenuButton in project BoomMenu by Nightonke.
the class ListViewActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_list_view);
ListView listView = (ListView) findViewById(R.id.list_view);
assert listView != null;
listView.setAdapter(new MyAdapter());
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
BoomMenuButton bmb = (BoomMenuButton) view.findViewById(R.id.bmb1);
bmb.boom();
}
});
}
use of com.nightonke.boommenu.BoomMenuButton in project BoomMenu by Nightonke.
the class ActionBarActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_action_bar);
ActionBar mActionBar = getSupportActionBar();
assert mActionBar != null;
mActionBar.setDisplayShowHomeEnabled(false);
mActionBar.setDisplayShowTitleEnabled(false);
LayoutInflater mInflater = LayoutInflater.from(this);
View actionBar = mInflater.inflate(R.layout.custom_actionbar, null);
TextView mTitleTextView = (TextView) actionBar.findViewById(R.id.title_text);
mTitleTextView.setText(R.string.app_name);
mActionBar.setCustomView(actionBar);
mActionBar.setDisplayShowCustomEnabled(true);
((Toolbar) actionBar.getParent()).setContentInsetsAbsolute(0, 0);
BoomMenuButton leftBmb = (BoomMenuButton) actionBar.findViewById(R.id.action_bar_left_bmb);
BoomMenuButton rightBmb = (BoomMenuButton) actionBar.findViewById(R.id.action_bar_right_bmb);
leftBmb.setButtonEnum(ButtonEnum.TextOutsideCircle);
leftBmb.setPiecePlaceEnum(PiecePlaceEnum.DOT_9_1);
leftBmb.setButtonPlaceEnum(ButtonPlaceEnum.SC_9_1);
for (int i = 0; i < leftBmb.getPiecePlaceEnum().pieceNumber(); i++) leftBmb.addBuilder(BuilderManager.getTextOutsideCircleButtonBuilderWithDifferentPieceColor());
rightBmb.setButtonEnum(ButtonEnum.Ham);
rightBmb.setPiecePlaceEnum(PiecePlaceEnum.HAM_4);
rightBmb.setButtonPlaceEnum(ButtonPlaceEnum.HAM_4);
for (int i = 0; i < rightBmb.getPiecePlaceEnum().pieceNumber(); i++) rightBmb.addBuilder(BuilderManager.getHamButtonBuilderWithDifferentPieceColor());
}
use of com.nightonke.boommenu.BoomMenuButton in project BoomMenu by Nightonke.
the class BMBFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View fragment = inflater.inflate(R.layout.fragment_bmb, container, false);
TextView text = (TextView) fragment.findViewById(R.id.text);
text.setText(String.valueOf(position));
BoomMenuButton bmb1 = (BoomMenuButton) fragment.findViewById(R.id.bmb1);
for (int i = 0; i < bmb1.getPiecePlaceEnum().pieceNumber(); i++) bmb1.addBuilder(BuilderManager.getSimpleCircleButtonBuilder());
BoomMenuButton bmb2 = (BoomMenuButton) fragment.findViewById(R.id.bmb2);
for (int i = 0; i < bmb2.getPiecePlaceEnum().pieceNumber(); i++) bmb2.addBuilder(BuilderManager.getSimpleCircleButtonBuilder());
return fragment;
}
Aggregations