当前位置: 首页>>代码示例>>Java>>正文


Java Callback类代码示例

本文整理汇总了Java中android.support.v7.view.ActionMode.Callback的典型用法代码示例。如果您正苦于以下问题:Java Callback类的具体用法?Java Callback怎么用?Java Callback使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Callback类属于android.support.v7.view.ActionMode包,在下文中一共展示了Callback类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: startActionMode

import android.support.v7.view.ActionMode.Callback; //导入依赖的package包/类
public ActionMode startActionMode(Callback callback) {
    if (this.mActionMode != null) {
        this.mActionMode.finish();
    }
    this.mOverlayLayout.setHideOnContentScrollEnabled(false);
    this.mContextView.killMode();
    ActionModeImpl mode = new ActionModeImpl(this.mContextView.getContext(), callback);
    if (!mode.dispatchOnCreate()) {
        return null;
    }
    mode.invalidate();
    this.mContextView.initForMode(mode);
    animateToMode(true);
    this.mContextView.sendAccessibilityEvent(32);
    this.mActionMode = mode;
    return mode;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:18,代码来源:WindowDecorActionBar.java

示例2: startActionMode

import android.support.v7.view.ActionMode.Callback; //导入依赖的package包/类
public final ActionMode startActionMode(ActionMode.Callback paramCallback)
{
  if (this.mActionMode != null) {
    this.mActionMode.finish();
  }
  this.mOverlayLayout.setHideOnContentScrollEnabled(false);
  this.mContextView.killMode();
  ActionModeImpl localActionModeImpl = new ActionModeImpl(this.mContextView.getContext(), paramCallback);
  if (localActionModeImpl.dispatchOnCreate())
  {
    localActionModeImpl.invalidate();
    this.mContextView.initForMode(localActionModeImpl);
    animateToMode(true);
    this.mContextView.sendAccessibilityEvent(32);
    this.mActionMode = localActionModeImpl;
    return localActionModeImpl;
  }
  return null;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:20,代码来源:WindowDecorActionBar.java

示例3: StandaloneActionMode

import android.support.v7.view.ActionMode.Callback; //导入依赖的package包/类
public StandaloneActionMode(Context paramContext, ActionBarContextView paramActionBarContextView, ActionMode.Callback paramCallback, boolean paramBoolean)
{
  this.mContext = paramContext;
  this.mContextView = paramActionBarContextView;
  this.mCallback = paramCallback;
  MenuBuilder localMenuBuilder = new MenuBuilder(paramActionBarContextView.getContext());
  localMenuBuilder.mDefaultShowAsAction = 1;
  this.mMenu = localMenuBuilder;
  this.mMenu.setCallback(this);
  this.mFocusable = paramBoolean;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:12,代码来源:StandaloneActionMode.java

示例4: ActionModeImpl

import android.support.v7.view.ActionMode.Callback; //导入依赖的package包/类
public ActionModeImpl(Context paramContext, ActionMode.Callback paramCallback)
{
  this.mActionModeContext = paramContext;
  this.mCallback = paramCallback;
  MenuBuilder localMenuBuilder = new MenuBuilder(paramContext);
  localMenuBuilder.mDefaultShowAsAction = 1;
  this.mMenu = localMenuBuilder;
  this.mMenu.setCallback(this);
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:10,代码来源:WindowDecorActionBar.java

示例5: handleContentTV

import android.support.v7.view.ActionMode.Callback; //导入依赖的package包/类
@SuppressWarnings("static-access")
public static void handleContentTV(WebView contentTV,
                                   final NonameReadBody row, int position, int bgColor, final Context context, final Callback mActionModeCallback, WebViewClient client) {
    contentTV.setBackgroundColor(0);
    contentTV.setFocusableInTouchMode(false);
    contentTV.setFocusable(false);
    contentTV.setLongClickable(false);
    if (mActionModeCallback != null) {
        contentTV.setOnLongClickListener(new OnLongClickListener() {

            @Override
            public boolean onLongClick(View v) {
                // TODO Auto-generated method stub
                ((AppCompatActivity) context)
                        .startSupportActionMode(mActionModeCallback);
                return true;
            }

        });
    }
    WebSettings setting = contentTV.getSettings();
    setting.setUserAgentString(context.getString(R.string.clientua) + ((NgaClientApp) ((Activity) context).getApplication()).version);
    setting.setDefaultFontSize(PhoneConfiguration.getInstance()
            .getWebSize());
    setting.setJavaScriptEnabled(false);
    contentTV.setWebViewClient(client);
    contentTV.setTag(row.floor);
    setting.setDefaultFontSize(PhoneConfiguration.getInstance()
            .getWebSize());
    setting.setJavaScriptEnabled(false);
    contentTV.loadDataWithBaseURL(null, fillFormated_html_data(row, position, context),
            "text/html", "utf-8", null);
}
 
开发者ID:ymback,项目名称:NGA-CLIENT-VER-OPEN-SOURCE,代码行数:34,代码来源:FunctionUtils.java

示例6: onCreateView

import android.support.v7.view.ActionMode.Callback; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    listview = new ListView(this.getActivity());

    listview.setBackgroundResource(ThemeManager.getInstance()
            .getBackgroundColor());
    listview.setDivider(null);

    activeActionMode();
    listview.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
    listview.setOnItemLongClickListener(new OnItemLongClickListener() {

        @TargetApi(11)
        @Override
        public boolean onItemLongClick(AdapterView<?> parent, View view,
                                       int position, long id) {
            ListView lv = (ListView) parent;
            lv.setItemChecked(position, true);
            if (mActionModeCallback != null) {
                ((AppCompatActivity) getActivity())
                        .startSupportActionMode((Callback) mActionModeCallback);
                return true;
            }
            return false;
        }

    });

    listview.setDescendantFocusability(ListView.FOCUS_AFTER_DESCENDANTS);

    return listview;
}
 
开发者ID:ymback,项目名称:NGA-CLIENT-VER-OPEN-SOURCE,代码行数:34,代码来源:NonameArticleListFragment.java

示例7: activeActionMode

import android.support.v7.view.ActionMode.Callback; //导入依赖的package包/类
@TargetApi(11)
private void activeActionMode() {
    mActionModeCallback = new ActionMode.Callback() {

        @Override
        public boolean onCreateActionMode(ActionMode mode, Menu menu) {
            MenuInflater inflater = mode.getMenuInflater();
            inflater.inflate(R.menu.nonamearticlelist_context_menu, menu);

            return true;
        }

        @Override
        public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
            return false;
        }

        @Override
        public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
            onContextItemSelected(item);
            mode.finish();
            return true;
        }

        @Override
        public void onDestroyActionMode(ActionMode mode) {
            // int position = listview.getCheckedItemPosition();
            // listview.setItemChecked(position, false);

        }

    };
}
 
开发者ID:ymback,项目名称:NGA-CLIENT-VER-OPEN-SOURCE,代码行数:34,代码来源:NonameArticleListFragment.java

示例8: startActionMode

import android.support.v7.view.ActionMode.Callback; //导入依赖的package包/类
private void startActionMode() {
    if (!(adapterView.getContext() instanceof ActionBarActivity)) {
        throw new IllegalStateException("Context must be an ActionBarActivity");
    }
    if (!(baseAdapter instanceof Callback)) {
        throw new IllegalStateException("Adapter must implement ActionMode.Callback");
    }

    ActionBarActivity activity = (ActionBarActivity) adapterView.getContext();
    actionMode = activity.startSupportActionMode((ActionMode.Callback) baseAdapter);
}
 
开发者ID:remelpugh,项目名称:android-shared,代码行数:12,代码来源:CheckableAdapterHelper.java

示例9: CallbackWrapper

import android.support.v7.view.ActionMode.Callback; //导入依赖的package包/类
public CallbackWrapper(Context context, ActionMode.Callback supportCallback) {
    this.mContext = context;
    this.mWrappedCallback = supportCallback;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:5,代码来源:SupportActionModeWrapper.java

示例10: startSupportActionMode

import android.support.v7.view.ActionMode.Callback; //导入依赖的package包/类
@Nullable
public abstract ActionMode startSupportActionMode(@NonNull Callback callback);
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:3,代码来源:AppCompatDelegate.java

示例11: ActionModeImpl

import android.support.v7.view.ActionMode.Callback; //导入依赖的package包/类
public ActionModeImpl(Context context, Callback callback) {
    this.mActionModeContext = context;
    this.mCallback = callback;
    this.mMenu = new MenuBuilder(context).setDefaultShowAsAction(1);
    this.mMenu.setCallback(this);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:7,代码来源:WindowDecorActionBar.java

示例12: startActionMode

import android.support.v7.view.ActionMode.Callback; //导入依赖的package包/类
public ActionMode startActionMode(Callback callback) {
    return null;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:ActionBar.java

示例13: onWindowStartingSupportActionMode

import android.support.v7.view.ActionMode.Callback; //导入依赖的package包/类
@Nullable
public ActionMode onWindowStartingSupportActionMode(@NonNull Callback callback) {
    return null;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:5,代码来源:AppCompatActivity.java

示例14: startSupportActionMode

import android.support.v7.view.ActionMode.Callback; //导入依赖的package包/类
@Nullable
public ActionMode startSupportActionMode(@NonNull Callback callback) {
    return getDelegate().startSupportActionMode(callback);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:5,代码来源:AppCompatActivity.java

示例15: onWindowStartingSupportActionMode

import android.support.v7.view.ActionMode.Callback; //导入依赖的package包/类
@Nullable
public ActionMode onWindowStartingSupportActionMode(Callback callback) {
    return null;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:5,代码来源:AppCompatDialog.java


注:本文中的android.support.v7.view.ActionMode.Callback类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。