layout-gravity पर टैग किए गए जवाब

5
एंड्रॉइड - सेंटर टेक्स्ट व्यू क्षैतिज रूप से रैखिकलेआउट में
मेरे पास निम्नलिखित मूल लेआउट हैं <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/title_bar_background"> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:textAppearance="?android:attr/textAppearanceLarge" android:padding="10dp" android:text="HELLO WORLD" /> </LinearLayout> <LinearLayout> ऐसा लगता है कि xml सही है लेकिन पाठ बाईं ओर संरेखित है। टेक्स्टव्यू माता-पिता की संपूर्ण चौड़ाई को लेता है और टेक्स्टव्यू …
हमारी साइट का प्रयोग करके, आप स्वीकार करते हैं कि आपने हमारी Cookie Policy और निजता नीति को पढ़ और समझा लिया है।
Licensed under cc by-sa 3.0 with attribution required.