0
사용자 정의 제목 표시 줄을 만드는 데 많은 자습서 중 하나를 사용하면 나머지 테마가 변경되는 것 같습니다.일반 제목을 사용하는 동안 사용자 정의 제목 표시 줄 사용
어떻게 확인 그래서 그것을 알아 냈다
//mainactivity.java
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.activity_main);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.customtitlebar);
//manifest.
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name="com.MediocreFireworks.cheapchug.MainActivity"
android:label="@string/app_name"
android:theme="@style/CustomTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
//style.xml
<style name="CustomWindowTitleBackground">
<item name="android:background">#323331</item>
</style>
<style name="CustomTheme" parent="android:Theme.Light">
<item name="android:windowTitleSize">35dip</item>
<item name="android:windowTitleBackgroundStyle">@style/CustomWindowTitleBackground</item>
괜찮습니까? 직접 제거하고 직접 만드시겠습니까? –
제목 표시 줄을 제거한 다음 화면 상단에 레이아웃을 추가하여 제목 표시 줄로 사용한다는 의미입니까? – Thomas
예. 또한 버튼을 추가 할 수 있습니다. 그게 네가 원하는지 모르겠다. –