How to change android Activity label

前端 未结 10 1696
心在旅途
心在旅途 2021-02-05 02:53

I have created an Activity and declared in Manifest file. But I would like to re-use the same Activity for other purpose.

 

        
10条回答
  •  情歌与酒
    2021-02-05 03:08

    public class YourActivity extends Activity {
      @Override
      public void onCreate(Bundle savedInstanceState) {
          setTitle(R.string.your_title);
          setContentView(R.layout.main);
      }
    }
    

提交回复
热议问题