Methods Summary |
---|
public void | finishActionMode()Finishes a possibly started action mode.
if (mActionMode != null) {
mActionMode.finish();
}
|
public boolean | isActionModeStarted()
return mActionMode != null;
|
public void | onFinishInflate()
super.onFinishInflate();
mExtractActionButton = (Button) findViewById(com.android.internal.R.id.inputExtractAction);
mEditButton = (Button) findViewById(com.android.internal.R.id.inputExtractEditButton);
mEditButton.setOnClickListener(new OnClickListener() {
public void onClick(View clicked) {
if (mActionMode != null) {
new MenuPopupHelper(getContext(), mActionMode.mMenu, clicked).show();
}
}
});
|
public android.view.ActionMode | startActionModeForChild(android.view.View sourceView, ActionMode.Callback cb)
final ExtractActionMode mode = new ExtractActionMode(cb);
if (mode.dispatchOnCreate()) {
mode.invalidate();
mExtractActionButton.setVisibility(INVISIBLE);
mEditButton.setVisibility(VISIBLE);
mActionMode = mode;
sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
return mode;
}
return null;
|