2
public class ShortCurActivity extends Activity{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final Button button = (Button)findViewById(R.id.b_start);
if(button != null){
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View paramView) {
Intent i = new Intent(ShortCurActivity.this, ServiceWallpaper.class);
startService(i);
}
});
}
}
我只想知道我是否可以從活動啓動一個動態壁紙服務。我試圖使用意圖,但它不起作用。一些設計師要我做了動態壁紙的快捷方式,使用戶可以隨時進行更改,他們希望自己的:(動態壁紙從活動開始一個動態壁紙服務