0
FirstFragment
이 Activity
이고 다른 것이 SecondFragment
입니다.뒤로 버튼과 로고가있는 조각 모음의 ActionBar
나는 나의 FirstFragment
이 갖고 싶어 그리고 내 SecondFragment
이 갖고 싶어하지만 지금은 둘 다이있어 ...
어떻게하면됩니까? 에서
FirstFragment
이 Activity
이고 다른 것이 SecondFragment
입니다.뒤로 버튼과 로고가있는 조각 모음의 ActionBar
나는 나의 FirstFragment
이 갖고 싶어 그리고 내 SecondFragment
이 갖고 싶어하지만 지금은 둘 다이있어 ...
어떻게하면됩니까? 에서
당신의 Activity
:
toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setIcon(R.mipmap.ic_launcher); //for example
당신의 FirstFragment
:
((ActionBarActivity)getActivity()).getSupportActionBar().setDisplayHomeAsUpEnabled(true);
하지만 다른 화살표 스타일을 얻을, 응용 프로그램 이름을 내 로고를 가지고 : 당신의
SecondFragment
에서왼쪽에 여백 (40dp 어쩌면)이 있으며 클릭 할 수 없습니다 : / – y07k2