ListFragment does not show title bar in Android Studio -
why title bar not show in listfragment
?
i did not set fullscreen or other.please me
<application android:allowbackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsrtl="true" android:theme="@style/apptheme"> <activity android:name=".crimelistactivity"> <intent-filter> <action android:name="android.intent.action.main"/> <category android:name="android.intent.category.launcher"/> </intent-filter> </activity> <activity android:name=".crimepageractivity" android:label="@string/app_name"> </activity> </application>
crimelistfragment.java
public class crimelistfragment extends listfragment { private arraylist<crime> mcrimes; private static final string tag = "crimelistfragment"; private crime c; ... @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); sethasoptionsmenu(true); getactivity().settitle(r.string.crimes_title); mcrimes = crimelab.get(getactivity()).getcrimes(); crimeadapter adapter = new crimeadapter(mcrimes); setlistadapter(adapter); ... } }
check, if there isn't example "apptheme.noactionbar" app theme @ design, in fragment xml file.
Comments
Post a Comment