我正在創建一個簡單的壁紙應用程序,其中我有一個image_view和一個按鈕。圖像用壁紙打開應用程序
圖像視圖顯示的圖像,現在我想要的:我想打開圖像與按鈕點擊壁紙應用程序。
當我點擊按鈕,它應該顯示所有已安裝的壁紙應用程序,所以我可以選擇任何他們
更好地瞭解見截圖:當我點擊按鈕
這是發生這種情況我的代碼:
package com.example.wallpaper_test;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
public class WallpaperScreenActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.wallpaper_layout);
// image resource
ImageView img = (ImageView) findViewById(R.id.imageView1);
img.setImageResource(R.drawable.pop);
// call installed wallpaper app to set wallpaper on button click
Button b1 = (Button) findViewById(R.id.button1);
b1.setOnClickListener(new View.OnClickListener() {
public void onClick(View vx) {
}
});
}
}
是這裏有一個任誰可以幫我 – user3739970
[這可能是使用全到u,但你的形象是不是在現場壁紙列表中顯示,但它設置爲牆紙(HTTP://android-er.blogspot 。在/ 2011/03 /設置牆紙使用,wallpapermanager.html) – user2613464