答案 0 :(得分:0)
在第一个单击集上,onClickListner会导致一个新活动,该活动只会显示黑色背景的图像(ImageView)。 在新活动中,确保它是全屏活动:
以编程方式:
public class ActivityName extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// remove title
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
//Here display your image with an ImageView
//Here set another onClickListner on the image or the background (the layout) that leads to the previous activity and finish() this one.
}
}
或者在AndroidManifest.xml中
<activity android:name=".ActivityName"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
如果是AppCompatActivity
<activity android:name=".ActivityName"
android:label="@string/app_name"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>