0

How to change manifest file label in center. I tried below way but i am not getting output i add an code in manifest file android:gravity="center and in style file i add center it is not working so give me a any other good solution ...!

Manifest Code

<uses-permission android:name="android.permission.INTERNET"></uses-
permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>

<supports-screens
    android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:xlargeScreens="true"></supports-screens>

<application
    android:allowBackup="true"
    android:configChanges="keyboardHidden|orientation|screenSize"
    android:largeHeap="true"
    android:gravity="center"
    android:label="See ME First"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name=".MainActivity"
        android:screenOrientation="portrait">
    <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity android:name=".Webview"
        android:configChanges="keyboardHidden|screenSize|orientation">
    </activity>
   </application>
    </manifest>

Style code

 <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="android:gravity">center</item>
 </style>

Should i add something into my code ...!

Adam
  • 4,445
  • 1
  • 31
  • 49
Lokesh GP Loki
  • 101
  • 2
  • 15
  • If your trying to set the title to center in the app bar (called in Java as `Toolbar` or `ActionBar`) then your doing it at the wrong place. Check this to set title in app bar to center: http://stackoverflow.com/a/30211080/1904141 – Akshay Chordiya May 10 '17 at 10:15
  • put your activity_main.xml here – Bhupat Bheda May 10 '17 at 10:22

0 Answers0