我在android中开发了一个Camera应用程序.它使用表面视图捕获图像.下面是我用来打开相机的代码
try {
// attempt to get a Front Camera instance
c = Camera.open(Camera.CameraInfo.CAMERA_FACING_FRONT);
} catch (Exception e) {
// TODO Auto-generated catch block
System.out
.println("fail to connect to Front Camera");
}
if (c == null) {
try {
// attempt to get a Back Camera instance
c = Camera.open(1);
} catch (Exception e) {
// TODO: handle exception
System.out
.println("fail to connect to Camera with id = 1");
}
}
if (c == null) {
try {
// attempt …Run Code Online (Sandbox Code Playgroud) 我想RadioGroup在图像中制作一个 .我希望一次只RadioButton检查一个.
这就是我做到这一点的原因.
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<RadioButton
android:id="@+id/radio1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/radio1" />
<RadioButton
android:id="@+id/radio2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/radio2" />
</RadioGroup>
<RadioGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<RadioButton
android:id="@+id/radio3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/radio3" />
<RadioButton
android:id="@+id/radio4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/radio4" />
</RadioGroup>
</RadioGroup>
Run Code Online (Sandbox Code Playgroud)
这是图像

但是通过使用它我可以从每一行中选择任何一个,即可以选择2个项目.像这样:

请帮我...
我正在制作一个Android应用程序,我希望它将是唯一运行的应用程序.我的应用程序运行时,没有其他应用程序可以运行 如何才能做到这一点?
提前致谢.