I've been playing around with XML trying to get buttons lined up by changing the int. values and then seeing how it looks on my phone. I've tried to get the XML to show up on my "Graphical Layout" tab on Eclipse with no success. Do I need to add something to the XML file to get it to display on the "Graphical Layout" tab or is this some kind of settings error on my eclipse?
我一直在玩XML,试图通过改变int来排列按钮。价值,然后看看它在我的手机上的样子。我试图让Eclipse显示在Eclipse上的“Graphical Layout”选项卡上但没有成功。我是否需要在XML文件中添加内容以使其显示在“图形布局”选项卡上,或者这是我的日食中的某种设置错误?
I've already tried all the solutions on @ this link: Graphical layout missing for Layout XML Files
我已经在@ this链接上尝试了所有解决方案:布局XML文件缺少图形布局
Here is the XML file in question and here is a screen shot of what I'm seeing: http://snag.gy/6H0v6.jpg
这是有问题的XML文件,这里是我看到的屏幕截图:http://snag.gy/6H0v6.jpg
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/persona_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="5dp" >
<TextView
android:id="@+id/persona_marquee"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:focusable="true"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:maxLines="1"
android:scrollHorizontally="true"
android:textColor="#f0f0f0f0"
android:textSize="26sp"
android:textStyle="bold"
android:visibility="gone" >
</TextView>
<ImageView
android:id="@+id/persona_img"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:keepScreenOn="true" >
</ImageView>
<TextView
android:id="@+id/persona_misctxt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone" >
</TextView>
<LinearLayout
android:id="@+id/persona_scorebox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:visibility="gone" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/your_score"
android:textSize="16sp"
android:textStyle="bold" >
</TextView>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/rate_star_big_on" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/rate_star_big_on" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/rate_star_big_on" />
<ImageView
android:id="@+id/persona_star4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/rate_star_big_on"
android:visibility="gone" />
<ImageView
android:id="@+id/persona_halfstar4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/rate_star_big_half"
android:visibility="gone" />
<ImageView
android:id="@+id/persona_star5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/rate_star_big_on"
android:visibility="gone" />
<ImageView
android:id="@+id/persona_halfstar5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/rate_star_big_half"
android:visibility="gone" />
<ImageView
android:id="@+id/persona_star5empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/rate_star_big_off"
android:visibility="gone" />
</LinearLayout>
<LinearLayout
android:id="@+id/textbox"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:gravity="center"
android:orientation="horizontal"
android:visibility="gone" >
<TextView
android:id="@+id/persona_nametxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingRight="7dp"
android:textSize="16sp"
android:textStyle="bold" >
</TextView>
<TextView
android:id="@+id/persona_desctxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:textSize="14sp" >
</TextView>
</LinearLayout>
<RelativeLayout
android:id="@+id/persona_statbars"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone" >
<TextView
android:id="@+id/statlabel1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginLeft="5dp"
android:ellipsize="end"
android:maxLines="1"
android:paddingLeft="20dp"
android:paddingRight="5dp"
android:paddingTop="5dp"
android:text="@string/statbar1" />
<ProgressBar
android:id="@+id/persona_statbar1"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_alignTop="@id/statlabel1"
android:layout_margin="1dp"
android:layout_toRightOf="@id/statlabel1"
android:indeterminate="false"
android:maxHeight="15dip"
android:minHeight="15dip"
android:paddingTop="5dp"
android:progress="100"
android:progressDrawable="@drawable/redprogress" />
<TextView
android:id="@+id/statlabel2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@id/statlabel1"
android:layout_below="@id/statlabel1"
android:ellipsize="end"
android:maxLines="1"
android:paddingRight="5dp"
android:paddingTop="5dp"
android:text="@string/statbar2" />
<ProgressBar
android:id="@+id/persona_statbar2"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignTop="@id/statlabel2"
android:layout_below="@id/persona_statbar1"
android:layout_margin="1dp"
android:layout_toRightOf="@id/statlabel2"
android:indeterminate="false"
android:maxHeight="15dip"
android:minHeight="15dip"
android:paddingTop="5dp"
android:progress="100"
android:progressDrawable="@drawable/redprogress" />
<TextView
android:id="@+id/statlabel3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@id/statlabel2"
android:layout_below="@id/statlabel2"
android:ellipsize="end"
android:maxLines="1"
android:paddingRight="5dp"
android:paddingTop="5dp"
android:text="@string/statbar3" />
<ProgressBar
android:id="@+id/persona_statbar3"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignTop="@id/statlabel3"
android:layout_below="@id/persona_statbar2"
android:layout_margin="1dp"
android:layout_toRightOf="@id/statlabel3"
android:indeterminate="false"
android:maxHeight="15dip"
android:minHeight="15dip"
android:paddingTop="5dp"
android:progress="100"
android:progressDrawable="@drawable/redprogress" />
</RelativeLayout>
<LinearLayout
android:id="@+id/progress_bar_container"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:gravity="center"
android:orientation="horizontal"
android:padding="16dp"
android:visibility="gone" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingRight="5dp"
android:text="@string/lovemeter"
android:textSize="20sp" >
</TextView>
<ProgressBar
android:id="@+id/ProgressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:indeterminate="false"
android:max="100"
android:maxHeight="35dip"
android:minHeight="35dip"
android:progress="1"
android:progressDrawable="@drawable/redprogress" >
</ProgressBar>
</LinearLayout>
<Button
android:id="@+id/again_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="1dp"
android:padding="10dp"
android:text="@string/again"
android:textColor="#f0f0f0f0"
android:visibility="gone"
android:layout_weight="1" >
</Button>
<com.hookedmediagroup.wasabi.TearRatingView
android:id="@+id/wasabi_tear_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:visibility="gone"
android:layout_weight="1" >
</com.hookedmediagroup.wasabi.TearRatingView>
2 个解决方案
#1
2
See my question and answer here: How to get the graphical layout Window back in Eclipse for Android Application Design?
请参阅我的问题和答案:如何在Eclipse for Android Application Design中获取图形布局窗口?
It will be the Sollution for your question.
这将是您的问题的Sollution。
Enjoy. :))
#2
0
edit the visibility line under TextView
as follows:
编辑TextView下的可见性行,如下所示:
android:visibility="visible"
Instead of
android:visibility="gone"
#1
2
See my question and answer here: How to get the graphical layout Window back in Eclipse for Android Application Design?
请参阅我的问题和答案:如何在Eclipse for Android Application Design中获取图形布局窗口?
It will be the Sollution for your question.
这将是您的问题的Sollution。
Enjoy. :))
#2
0
edit the visibility line under TextView
as follows:
编辑TextView下的可见性行,如下所示:
android:visibility="visible"
Instead of
android:visibility="gone"