在我的條形碼xml結果文件兩個文本視圖顯示結果在samre位置和重疊彼此如何讓他們之間的空間?我嘗試android_layout比重=中心或左rightr是不行的只有這個工作的android:layout_gravity =「CENTER_HORIZONTAL」這兩個textview顯示值在同一個位置我如何改變或他們之間的空間?
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<SurfaceView android:id="@+id/preview_view"
android:layout_width="fill_parent"
android:layout_gravity="center"
android:layout_height="fill_parent"
android:layout_centerInParent="true"/>
<com.zijunlin.Zxing.Demo.view.ViewfinderView
android:id="@+id/viewfinder_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/transparent"/>
<TextView android:id="@+id/txtResult"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="hello"
android:textSize="14sp"/>
<TextView
android:id="@+id/txtResult2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="aaaa" />
<Button
android:id="@+id/button1"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="25dip"
android:layout_marginRight="30dip"
android:text="View Detail" />
</FrameLayout>
我嘗試它第二測試圖像這樣 –
現在在屏幕頂部右側GOS但太多的空間中TET視圖 textvie11之間---- ------------------- textview2 我如何移除空格 它們之間? –
請發表您的完整代碼。上面的代碼 – Guna