I'm making a Twitter app on Android Studio, but when I run it on a real machine, I don't see the action bar where the title of the app should be displayed.
I don't think it's set to not display...
If you know how to solve this problem, please let me know.
The actual machine is Nexus 7.
AndroidManifest
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17"/>
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android: icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name="com.example.x_vvx18.twinicooo.MainActivity"
android: label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name = ".TweetActivity"
android:windowSoftInputMode="adjustResize"/>
<activity
android:name = ".TwitterOAuthActivity"
android: launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data
android: host="twitter"
android: scheme="zzzakiii"/>
</intent-filter>
</activity>
</application>
</manifest>
Layout xml
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"tools:context=".MainActivity">
<TextView android:text="@string/hello_world" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android: id="@+id/textView"/>
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/textView"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="179dp">/TableRow>
<LinearLayout
android: orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
</LinearLayout>
</FrameLayout>
// styles.xml
<!--Base application theme.-->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!--Customize your here.-->
</style>
When I changed Android: Theme from App Theme to Widget.AppCompat.ActionBar, which is set to default, ActionBar was displayed.
776 M2 Mac fails to install rbenv install 3.1.3 due to errors
856 Uncaught (inpromise) Error on Electron: An object could not be cloned
758 Error in x, y, and format string must not be None
1235 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
771 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2025 OneMinuteCode. All rights reserved.