user1181977
user1181977

Reputation: 117

Trying to view my XML in "Graphical Layout" Tab

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?

I've already tried all the solutions on @ this link: Graphical layout missing for Layout XML Files

Here is the XML file in question and here is a screen shot of what I'm seeing: 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>

Upvotes: 4

Views: 1325

Answers (2)

proximas7
proximas7

Reputation: 1

edit the visibility line under TextView as follows:

android:visibility="visible"

Instead of

android:visibility="gone"

Upvotes: 0

Shreyash Mahajan
Shreyash Mahajan

Reputation: 23596

See my question and answer here: How to get the graphical layout Window back in Eclipse for Android Application Design?

It will be the Sollution for your question.

Enjoy. :))

Upvotes: 2

Related Questions