android - Root LinearLayout does not allign center -


nexus 5 emulator image

the root code below:

<?xml version="1.0" encoding="utf-8"?>  <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/satranc" android:layout_width="fill_parent" android:layout_height="@dimen/boy" android:gravity="center_horizontal" android:orientation="vertical" tools:context=".mainactivity"> 

the root tag closed. can help? thank in advance

well tried william's solution , did not work. following earlier comment used android:gravity="center_horizontal" in nested linearlayouts horizontal orientation , voila! worked. regards , thank contributors...


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -