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


Java WallpaperService类代码示例

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


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

示例1: LiveWallpaperListAdapter

import android.service.wallpaper.WallpaperService; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public LiveWallpaperListAdapter(Context context) {
    mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    mPackageManager = context.getPackageManager();

    List<ResolveInfo> list = mPackageManager.queryIntentServices(
            new Intent(WallpaperService.SERVICE_INTERFACE),
            PackageManager.GET_META_DATA);

    mWallpapers = new ArrayList<LiveWallpaperTile>();

    new LiveWallpaperEnumerator(context).execute(list);
}
 
开发者ID:Mr-lin930819,项目名称:SimplOS,代码行数:14,代码来源:LiveWallpaperListAdapter.java

示例2: onCreateEngine

import android.service.wallpaper.WallpaperService; //导入依赖的package包/类
@Override
public WallpaperService.Engine onCreateEngine() {
    if (engine!=null) {
       // engine.painting.stopPainting();
        Log.e(TAG, "DOUBLE ENGINEsss?");
        engine = null;
    }
    engine = new AwesomeWallpaperEngine();
    return engine;
}
 
开发者ID:vvolas,项目名称:Awesome-Live-Wallpaper,代码行数:11,代码来源:AwesomeWallpaperService.java

示例3: onSensorChanged

import android.service.wallpaper.WallpaperService; //导入依赖的package包/类
@Override
public void onSensorChanged(SensorEvent event) {
    if (event.sensor == mAccelerometer) {
        System.arraycopy(event.values, 0, mLastAccelerometer, 0, event.values.length);
        mLastAccelerometerSet = true;
    } else if (event.sensor == mMagnetometer) {
        System.arraycopy(event.values, 0, mLastMagnetometer, 0, event.values.length);
        mLastMagnetometerSet = true;
    }
    if (mLastAccelerometerSet && mLastMagnetometerSet) {
        SensorManager.getRotationMatrix(mR, null, mLastAccelerometer, mLastMagnetometer);

        try {
            mDisplay = ((WindowManager) ((WallpaperService) context).getApplication().getSystemService(Service.WINDOW_SERVICE))
                    .getDefaultDisplay();
        } catch (Exception ignored){}


        int rotation = Surface.ROTATION_0;
        if(mDisplay != null) {
            rotation = mDisplay.getRotation();
        }

        float[] mRremap = mR.clone();
        if(rotation == Surface.ROTATION_90){
            SensorManager.remapCoordinateSystem(mR, SensorManager.AXIS_Y, SensorManager.AXIS_MINUS_X, mRremap);
        }
        if(rotation == Surface.ROTATION_270){
            SensorManager.remapCoordinateSystem(mR, SensorManager.AXIS_MINUS_Y, SensorManager.AXIS_X, mRremap);
        }
        if(rotation == Surface.ROTATION_180){
            SensorManager.remapCoordinateSystem(mR, SensorManager.AXIS_MINUS_X, SensorManager.AXIS_MINUS_Y, mRremap);
        }

        SensorManager.getOrientation(mRremap, mOrientation);
    }
}
 
开发者ID:googlecreativelab,项目名称:meter,代码行数:38,代码来源:Drawer.java

示例4: onCreateEngine

import android.service.wallpaper.WallpaperService; //导入依赖的package包/类
@Override
public WallpaperService.Engine onCreateEngine()
{
	Log.v(LOG_TAG, "package_name: " + getPackageName());
	Defines.packageName = getPackageName();
	puvoWallpaperRenderer = new PuvoWallpaperRenderer();
	return new PuvoWallpaperEngine(puvoWallpaperRenderer);
}
 
开发者ID:divosolutions,项目名称:android-livewallpaper,代码行数:9,代码来源:PuvoWallpaperService.java

示例5: getEngine

import android.service.wallpaper.WallpaperService; //导入依赖的package包/类
public WallpaperService.Engine getEngine() {
    return mWallpaperEngine;
}
 
开发者ID:BitMastro,项目名称:PortalLW,代码行数:4,代码来源:RajawaliRenderer.java

示例6: setEngine

import android.service.wallpaper.WallpaperService; //导入依赖的package包/类
public void setEngine(WallpaperService.Engine engine) {
    this.mWallpaperEngine = engine;
}
 
开发者ID:BitMastro,项目名称:PortalLW,代码行数:4,代码来源:RajawaliRenderer.java

示例7: getEngine

import android.service.wallpaper.WallpaperService; //导入依赖的package包/类
public WallpaperService.Engine getEngine() {
	return mWallpaperEngine;
}
 
开发者ID:takyonxxx,项目名称:IRobot-Android,代码行数:4,代码来源:RajawaliRenderer.java

示例8: setEngine

import android.service.wallpaper.WallpaperService; //导入依赖的package包/类
public void setEngine(WallpaperService.Engine engine) {
	this.mWallpaperEngine = engine;
}
 
开发者ID:takyonxxx,项目名称:IRobot-Android,代码行数:4,代码来源:RajawaliRenderer.java

示例9: onCreateEngine

import android.service.wallpaper.WallpaperService; //导入依赖的package包/类
public WallpaperService.Engine onCreateEngine() {
    return new Wallpaper.Engine();
}
 
开发者ID:notriddle,项目名称:particles,代码行数:4,代码来源:Wallpaper.java

示例10: wallpaperService

import android.service.wallpaper.WallpaperService; //导入依赖的package包/类
public static WallpaperService wallpaperService() {
    return (WallpaperService) get(Context.WALLPAPER_SERVICE);
}
 
开发者ID:shkschneider,项目名称:android_Skeleton,代码行数:4,代码来源:SystemServices.java


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