AOSP Launcher(Launcher2)的位置(路径)是packages/apps/Launcher2/然后src/com/android/launcher2/
完整的路径是:packages/apps/Launcher2/src/com/android/launcher2/.
这些文件是WallpaperChooser.java和WallpaperChooserDialogFragment.java.
编辑:
您需要以下资源(来自res)文件夹:
/res/drawable:
/res/drawable/drawable-hdpi(和-mdpi,-xhdpi):
/res/drawable/
/res/drawable-sw720dp-nodpi
/res/layout/
/res/layout-sw720dp
dimens.xml
<!-- dimensions for the wallpaper picker wallpaper thumbnail width
--><dimen name="wallpaper_chooser_grid_width">196dp</dimen><dimen name="wallpaper_chooser_grid_height">140dp</dimen>styles.xml
<style name="Theme"
parent="android:Theme.Holo.Wallpaper.NoTitleBar"><item name="android:windowActionModeOverlay">true</item><style>/res/values
styles.xml
<style name="Theme.WallpaperPicker"
parent="@android:style/Theme.Holo.NoActionBar"/>strings.xml中
<!-- Title of dialog that appears after user selects Wallpaper from
menu --><string name="chooser_wallpaper">Choose wallpaper from</string><!-- Button label on Wallpaper Gallery screen; user selects this
button to set a specific wallpaper --><string name="wallpaper_instructions">Set wallpaper</string>/res/xml
AndroidManifest.xml中
<uses-permission android:name="android.permission.SET_WALLPAPER" />
<uses-permission android:name="android.permission.SET_WALLPAPER_HINTS" />
<activity
android:name="com.android.launcher2.WallpaperChooser"
android:theme="@style/Theme.WallpaperPicker"
android:label="@string/pick_wallpaper"
android:icon="@mipmap/ic_launcher_wallpaper"
android:finishOnCloseSystemDialogs="true"
android:process=":wallpaper_chooser">
<intent-filter>
<action android:name="android.intent.action.SET_WALLPAPER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data android:name="android.wallpaper.preview"
android:resource="@xml/wallpaper_picker_preview" />
</activity>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2172 次 |
| 最近记录: |