1

android repo 中的壁纸选择器源代码在哪里。任何人都可以提供路径吗?

4

1 回答 1

9

AOSP 启动器 ( )的位置(路径)Launcher2packages/apps/Launcher2/src/com/android/launcher2/

所以完整路径是:packages/apps/Launcher2/src/com/android/launcher2/.

这些文件是WallpaperChooser.javaWallpaperChooserDialogFragment.java

编辑:
您需要以下资源(来自res)文件夹:

/res/drawable

  • wallpaper_gallery_background.xml
  • 壁纸库项目.xml

/res/drawable/drawable-hdpi(和-mdpi-xhdpi):

  • grid_focused.9.png
  • grid_pressed.9.png
  • grid_selected.9.png

/res/drawable/

  • 任何壁纸都进入这里。

/res/drawable-sw720dp-nodpi

  • 高分辨率(720p)壁纸进入这里。

/res/layout/

  • 壁纸选择器.xml
  • wallpaper_chooser_base.xml
  • 墙纸项目.xml

/res/layout-sw720dp

  • 墙纸项目.xml
  • 如果你想要 720p 壁纸,请使用wallpapers.xml

尺寸.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>

样式.xml

  • <style name="Theme" parent="android:Theme.Holo.Wallpaper.NoTitleBar">
  • <item name="android:windowActionModeOverlay">true</item>
  • <style>

/res/values

  • extra_wallpapers.xml
  • 壁纸.xml

样式.xml

  • <style name="Theme.WallpaperPicker" parent="@android:style/Theme.Holo.NoActionBar"/>

字符串.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

  • wallpaper_picker_preview.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>
于 2013-03-17T16:41:19.207 回答