Java 如何从应用程序I';我在发展
我正在开发一个作业应用程序。当我启动我的应用程序时,我配置了4个按钮,其中一个是日历。 我想要的是当我点击Java 如何从应用程序I';我在发展,java,android,calendar,Java,Android,Calendar,我正在开发一个作业应用程序。当我启动我的应用程序时,我配置了4个按钮,其中一个是日历。 我想要的是当我点击日历,打开谷歌日历;或者如果我没有安装,带你去谷歌游戏 其他按钮是同一应用程序中的活动,但这些都已解决 主要活动: public class MainActivity extends Activity { @Override protected void onCreate (Bundle savedInstanceState){ super.onCreate
日历
,打开谷歌日历;或者如果我没有安装,带你去谷歌游戏
其他按钮是同一应用程序中的活动,但这些都已解决
主要活动:
public class MainActivity extends Activity {
@Override
protected void onCreate (Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
entrarboton();
}
private void entrarboton() {
ImageButton accionentrar = (ImageButton) findViewById(R.id.imageButton0);
accionentrar.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(MainActivity.this,Calendari.class));
}
});
ImageButton accionentrar2 = (ImageButton)findViewById(R.id.imageButton3);
accionentrar2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(MainActivity.this,Notes.class));
}
});
ImageButton accionentrar3 = (ImageButton)findViewById(R.id.imageButton2);
accionentrar3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(MainActivity.this,Apunts.class));
}
});
ImageButton accionentrar4 = (ImageButton)findViewById(R.id.imageButton4);
accionentrar4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(MainActivity.this,Altres.class));
}
});
}
}
问之前你有没有寻找答案?这些是相似的;是的,帕特里克,但我没能解决:(