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


Java KeyEventCompat.getKeyDispatcherState方法代码示例

本文整理汇总了Java中android.support.v4.view.KeyEventCompat.getKeyDispatcherState方法的典型用法代码示例。如果您正苦于以下问题:Java KeyEventCompat.getKeyDispatcherState方法的具体用法?Java KeyEventCompat.getKeyDispatcherState怎么用?Java KeyEventCompat.getKeyDispatcherState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.support.v4.view.KeyEventCompat的用法示例。


在下文中一共展示了KeyEventCompat.getKeyDispatcherState方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: TransportMediator

import android.support.v4.view.KeyEventCompat; //导入方法依赖的package包/类
private TransportMediator(Activity activity, View view, TransportPerformer callbacks) {
    mContext = activity != null ? activity : view.getContext();
    mCallbacks = callbacks;
    mAudioManager = (AudioManager)mContext.getSystemService(Context.AUDIO_SERVICE);
    mView = activity != null ? activity.getWindow().getDecorView() : view;
    mDispatcherState = KeyEventCompat.getKeyDispatcherState(mView);
    if (Build.VERSION.SDK_INT >= 18) { // JellyBean MR2
        mController = new TransportMediatorJellybeanMR2(mContext, mAudioManager,
                mView, mTransportKeyCallback);
    } else {
        mController = null;
    }
}
 
开发者ID:bestarandyan,项目名称:ShoppingMall,代码行数:14,代码来源:TransportMediator.java

示例2: TransportMediator

import android.support.v4.view.KeyEventCompat; //导入方法依赖的package包/类
private TransportMediator(Activity activity, View view, TransportPerformer transportperformer)
{
    g = new ArrayList();
    h = new a(this);
    i = new b(this);
    Object obj;
    if (activity != null)
    {
        obj = activity;
    } else
    {
        obj = view.getContext();
    }
    a = ((Context) (obj));
    b = transportperformer;
    c = (AudioManager)a.getSystemService("audio");
    if (activity != null)
    {
        view = activity.getWindow().getDecorView();
    }
    d = view;
    e = KeyEventCompat.getKeyDispatcherState(d);
    if (android.os.Build.VERSION.SDK_INT >= 18)
    {
        f = new d(a, c, d, h);
        return;
    } else
    {
        f = null;
        return;
    }
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:33,代码来源:TransportMediator.java


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