當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。