亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

android intent使用定義標(biāo)題

 更新時間:2012年11月23日 15:38:22   作者:  
本文將詳細介紹android怎樣自定義Intent選擇界面的標(biāo)題,提供相關(guān)參考方法
可以使用 Intent.createChooser() 的方法來創(chuàng)建 Intent,并傳入想要的 Sting 作為標(biāo)題。

以wallpaper 選擇框為例,當(dāng)在Launcher workspace的空白區(qū)域上長按,會彈出wallpaper的選擇框,選擇框的標(biāo)題為”Choose wallpaper from”,如下:
復(fù)制代碼 代碼如下:

private void startWallpaper() {
showWorkspace(true);
final Intent pickWallpaper = new Intent(Intent.ACTION_SET_WALLPAPER);
Intent chooser = Intent.createChooser(pickWallpaper, getText(R.string.chooser_wallpaper));
// NOTE: Adds a configure option to the chooser if the wallpaper supports it
startActivityForResult(chooser, REQUEST_PICK_WALLPAPER);
}

其中,R.string.chooser_wallpaper對應(yīng)的字串內(nèi)容就是”Choose wallpaper from”,定義在Launcher2的Strings.xml中

相關(guān)文章

最新評論