I'm having a very hard time getting the 2 buttons in the 2nd child linearlayout to display as I want them to... I want them centered, on the same row but they appear left-aligned and on the same row. Can anyone help me with this?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@color/black"
    android:orientation="vertical">
  <LinearLayout
      android:id="@+id/splash"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical">
    <ImageView
      android:id="@+id/imageLogo1"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:adjustViewBounds="true"
      android:cropToPadding="true"
      android:scaleType="fitXY"
      android:src="@drawable/isi_logo"
      android:paddingLeft="50sp"
      android:paddingRight="50sp"
      android:paddingTop="20sp"/>
    开发者_C百科<ImageView
      android:id="@+id/imageLogo2"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:adjustViewBounds="true"
      android:cropToPadding="true"
      android:scaleType="fitXY"
      android:src="@drawable/sa_logo"
      android:paddingLeft="100sp"
      android:paddingRight="100sp"
      android:paddingBottom="20sp"/>
  </LinearLayout>
  <LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:layout_gravity="center">
    <Button  
      android:id="@+id/buttonScores"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:width="100sp"
      android:text="@string/scores"/>
    <Button
      android:id="@+id/buttonStart"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:width="100sp"
      android:text="@string/test"/>
  </LinearLayout>
</LinearLayout>
Try using android:gravity="center" instead of android:layout_gravity="center"
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论