题目内容

请选择合适的代码填入横线中,使得文本行水平居中显示。android:layout_gravity="center_horizontal"android:gravity="center_horizontal"代码如下:

查看答案
更多问题

请选择合适的代码填入横线中,使得点击开关按钮时,实现音频的播放和暂停。mediaplayer.pause()mediaplayer.start()代码如下:// 定义组件对象ToggleButton playButtoh = (ToggleButton) findViewById(R.id.play);// 创建一个MediaPlayer实例final MediaPlayer mediaplayer = MediaPlayer.create(this, R.raw.test);// 设置循环播放mediaplayer.setLooping(true);// 播放/暂停 按钮事件处理playButtoh.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {public void onCheckedChanged(CompoundButton compoundButton, boolean b) {if(mediaplayer.isPlaying()){;}else{;}}});

请在横线中填入合适的布局,使得图片居中显示。代码如下:< xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"tools:context=".MainActivity"android:orientation="vertical"android:padding="10dp">

请在横线中填入合适的代码,使得点击网址时能打开对应的超链接。代码如下:

请补充代码,使得执行该动画时,动画总共运行3次,每次都从头开始。代码如下:

答案查题题库