getActionBar().setTitle(); Java.lang.Null Point異常解決策
687 ワード
getActionBar().setTitle(); Java.lang.Null Point例外解決策は、低バージョンでは直接取得がサポートされていないため、修正案:
もう1つのケースでは、低バージョンの場合、APIは11未満のソリューションです.
try changing your theme to this
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
and not the AppCompat Version
もう1つのケースでは、低バージョンの場合、APIは11未満のソリューションです.
It basically depends on whch api you are targeting.If it less than 14 use
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
and in your activity call your actionbar using this
getSupportActionBar().setDisplayHomeAsUpEnabled(true);