![](http://img.bbs.csdn.net/upload/201508/18/1439874322_308919.png)
有前辈做过这个东西的布局吗? 怎么才能让里面的文字居中显示
这是一个自定义的dialog布局如下:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/dp7"
android:gravity="center"
android:background="@color/white"
android:orientation="horizontal">
<TextView
android:id="@+id/textview_copy"
android:layout_width="@dimen/dp58"
android:layout_height="match_parent"
android:background="@drawable/dialogleft"
android:gravity="center"
android:padding="@dimen/dp1"
android:text="复制"
android:textColor="#ffffffff" />
<ImageView
android:id="@+id/imageView_lineright"
android:layout_width="@dimen/dp1"
android:layout_height="match_parent"
android:background="@color/transparent"
/>
<TextView
android:id="@+id/textview_delete"
android:layout_width="@dimen/dp58"
android:layout_height="@dimen/dp36"
android:gravity="center"
android:padding="@dimen/dp1"
android:text="删除"
android:background="@drawable/dialogrights"
android:textColor="#ffffffff"
/>
</LinearLayout>
</LinearLayout>