本文整理汇总了Java中com.sa90.materialarcmenu.ArcMenu类的典型用法代码示例。如果您正苦于以下问题:Java ArcMenu类的具体用法?Java ArcMenu怎么用?Java ArcMenu使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ArcMenu类属于com.sa90.materialarcmenu包,在下文中一共展示了ArcMenu类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.sa90.materialarcmenu.ArcMenu; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
arcMenu = (ArcMenu) findViewById(R.id.arcMenu);
arcMenu.setRadius(getResources().getDimension(R.dimen.radius));
arcMenu.setStateChangeListener(new StateChangeListener() {
@Override
public void onMenuOpened() {
Snackbar.make(arcMenu, "Menu Opened", Snackbar.LENGTH_SHORT).show();
}
@Override
public void onMenuClosed() {
Snackbar.make(arcMenu, "Menu Closed", Snackbar.LENGTH_SHORT).show();
}
});
findViewById(R.id.fab1).setOnClickListener(subMenuClickListener);
findViewById(R.id.tvNext).setOnClickListener(mNextClickListener);
findViewById(R.id.tvAnimationDemo).setOnClickListener(mAnimationTimeDemoClickListener);
}
示例2: onCreate
import com.sa90.materialarcmenu.ArcMenu; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_animation_time);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
arcMenu = (ArcMenu) findViewById(R.id.arcMenu);
btnSet = (Button) findViewById(R.id.btnSet);
etAnimationTime = (EditText) findViewById(R.id.etAnimationTime);
btnSet.setOnClickListener(mSetClickListener);
}
示例3: shakeToClean
import com.sa90.materialarcmenu.ArcMenu; //导入依赖的package包/类
/**
* Triggered when a shake to clean event has been thrown
*/
@Override
public void shakeToClean() {
// Check if the shake to clean option is enabled
if (PreferenceManager.getDefaultSharedPreferences(this)
.getBoolean(SettingsActivity.PREF_KEY_SHAKE_TO_CLEAN, Config.DEFAULT_SHAKE_TO_CLEAN)) {
Toast.makeText(this, getString(R.string.message_reinit_config), Toast.LENGTH_SHORT).show();
initDefaultValues();
ArcMenu fabAction = (ArcMenu) findViewById(R.id.fabAction);
if ( fabAction.isMenuOpened() ) fabAction.toggleMenu();
}
}
示例4: onCreate
import com.sa90.materialarcmenu.ArcMenu; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
arcMenu = (ArcMenu) findViewById(R.id.arcMenu);
arcMenu.setRadius(getResources().getDimension(R.dimen.radius));
arcMenu.setStateChangeListener(new StateChangeListener() {
@Override
public void onMenuOpened() {
Snackbar.make(arcMenu, "Menu Opened", Snackbar.LENGTH_SHORT).show();
}
@Override
public void onMenuClosed() {
Snackbar.make(arcMenu, "Menu Closed", Snackbar.LENGTH_SHORT).show();
}
});
findViewById(R.id.fab1).setOnClickListener(subMenuClickListener);
findViewById(R.id.tvNext).setOnClickListener(mNextClickListener);
findViewById(R.id.tvAnimationDemo).setOnClickListener(mAnimationTimeDemoClickListener);
findViewById(R.id.tvTopPlacement).setOnClickListener(mTopPlacementClickListener);
}