Hiện tại nó là hoạt động chính nhưng tôi muốn thay đổi nó thành hoạt động Danh mục. Đây có phải là vấn đề nằm ở đâu không?Làm cách nào để thay đổi cấp bậc gốc của một hoạt động?
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// This ID represents the Home or Up button. In the case of this
// activity, the Up button is shown. Use NavUtils to allow users
// to navigate up one level in the application structure. For
// more details, see the Navigation pattern on Android Design:
//
// http://developer.android.com/design/patterns/navigation.html#up-vs-back
//
NavUtils.navigateUpFromSameTask(this);
return true;
}
return super.onOptionsItemSelected(item);
Vấn đề chính xác là gì? – fiddler
Khi tôi đang hoạt động trong danh mục, ví dụ: thể thao, tôi muốn quay lại hoạt động danh mục chứ không phải hoạt động chính là hoạt động khởi chạy – user2229066