How to launch an Activity without a UI?

后端 未结 11 1671
失恋的感觉
失恋的感觉 2020-11-30 17:48

Is it in any way possible to launch an activity from the main function without having a UI? i.e. is there a way to create a sort of \"wrapper\" around another activity, i.e.

11条回答
  •  甜味超标
    2020-11-30 18:39

    In your manifest add @android:style/Theme.Translucent.NoTitleBar" as mentioned in some of the answers above.

    Also remove the setContentView(R.layout.your_activity); line from your activity.java file.

提交回复
热议问题