2

I think this little square means something important but don't know what... It goes away if I double click on it, but doesn't show up on less complex layouts within my project... any ideas why it's showing or what it means?

Image with yellow square

<?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:background="@android:color/darker_gray"
android:orientation="vertical">

<android.support.v7.widget.Toolbar
    android:id="@+id/preferences_dialog_toolbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="?attr/actionBarSize"
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">


    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:text="Toolbar Title"
        android:textSize="30sp" />

</android.support.v7.widget.Toolbar>
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingTop="5dp"
    android:paddingBottom="5dp">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:text="Options:" />

    <RadioGroup
        android:id="@+id/dataInputPreferenceRadioGroup"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="2"
        android:gravity="center"
        android:orientation="horizontal">

        <RadioButton
            android:id="@+id/defaultUseInput"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:checked="false"
            android:text="Option1" />

        <RadioButton
            android:id="@+id/defaultUseTimeWidgets"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:checked="true"
            android:text="Option2"
            android:visibility="gone"/>
        <RadioButton
            android:id="@+id/defaultUseOption3"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:checked="true"
            android:text="Option3" />
    </RadioGroup>
</LinearLayout>
WM1
  • 451
  • 7
  • 14
  • it has nothing to do with the code. The dot is outside the phone screen. it is an android studio problem. And in future, if you are going to post code, do not put a screenshot. copy and paste the code so we can do something with it – ᴛʜᴇᴘᴀᴛᴇʟ May 07 '16 at 22:59
  • Thanks for the tip about the code, added it, and as Mike T described below, the yellow square is due to a field with visibility "gone" – WM1 May 22 '16 at 14:08

1 Answers1

1

I believe the little yellow square indicates a view that is hidden by being made invisible or gone.

Looking into this further, it only appears to indicate gone, not invisible.

MikeT
  • 51,415
  • 16
  • 49
  • 68
  • even a hidden or invisible view would be in the XML. And it has nothing to do with view cause its outside the phone screen preview. – ᴛʜᴇᴘᴀᴛᴇʟ May 07 '16 at 23:06
  • 1
    Do you have any reference material to show that it's an AS problem? Funny how I can introduce a little yellow square on demand and outside of the phone display area simply by setting visibility to gone. e,g. Of course outside of the screen appears to be quite a logical place to indicate that something is not visible. – MikeT May 07 '16 at 23:11
  • Just because it "appears" to be a quite logical place, doesn't mean that's how AS does it. If you go and try one out for yourself, you will see that AS actually hides it and there is no indication outside the screen notifying that it's hidden. The only indication is when you select that view, it appears on TOP LEFT inside the screen. – ᴛʜᴇᴘᴀᴛᴇʟ May 07 '16 at 23:17
  • 1
    Actually as I indicated I did try it. As I said above, on demand, I can introduce the yellow square by setting a view's visibility to gone. – MikeT May 07 '16 at 23:20
  • Actually i'm not seeing that and I am not finding any documentation on it. I tried it on two old projects and one sample project I just created. When I do `gone`, all I get is the following: http://i.imgur.com/GyhQKvL.png. it always stays inside the screen – ᴛʜᴇᴘᴀᴛᴇʟ May 07 '16 at 23:33