Why does my button not showing in the layout?












0














I've been making a tabbed activity with a list view in it. I've been trying to put a button under the list view, but when i run on my phone, the button doesn't show up.



My Fragment layout



<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.siscaproject.sisca.Fragment.RegisterFragment">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="7dp">

<RelativeLayout
android:id="@+id/rl_total_data"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorRedPrimary"
android:padding="8dp">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:text="@string/item_detected"
android:textColor="#fff" />

<TextView
android:id="@+id/tv_total_data"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginEnd="7dp"
android:hint="10 items detected"
android:textColor="#fff" />
</RelativeLayout>

<RelativeLayout
android:id="@+id/rl_data"
android:layout_below="@id/rl_total_data"
android:layout_width="match_parent"
android:layout_height="match_parent">

<ListView
android:id="@+id/lv_data"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true" />

</RelativeLayout>

<Button
android:id="@+id/btn_register"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:background="@color/colorRedPrimary"
android:text="@string/register_all_item"
android:textAllCaps="false"
android:textColor="#fff" />

</RelativeLayout>

</FrameLayout>


My layout preview in my android studio



The Layout preview in my android studio



The layout when i run it on my phone (I'm using an Asus Zenfone 5)



When i run it on my phone



I'm not sure where i did wrong, i actually have change the button into the floating button, but only half of the button shows in the layout. (Plus i can't scroll the layout)



Update
I have resolved it, the problem is in the tabbed activity layout.
I use a constraint layout as the parent, i've changed it to Relative layout and it works perfectly










share|improve this question





























    0














    I've been making a tabbed activity with a list view in it. I've been trying to put a button under the list view, but when i run on my phone, the button doesn't show up.



    My Fragment layout



    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.siscaproject.sisca.Fragment.RegisterFragment">

    <RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_marginTop="7dp">

    <RelativeLayout
    android:id="@+id/rl_total_data"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/colorRedPrimary"
    android:padding="8dp">

    <TextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginLeft="5dp"
    android:text="@string/item_detected"
    android:textColor="#fff" />

    <TextView
    android:id="@+id/tv_total_data"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentEnd="true"
    android:layout_alignParentRight="true"
    android:layout_marginEnd="7dp"
    android:hint="10 items detected"
    android:textColor="#fff" />
    </RelativeLayout>

    <RelativeLayout
    android:id="@+id/rl_data"
    android:layout_below="@id/rl_total_data"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ListView
    android:id="@+id/lv_data"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_alignParentStart="true"
    android:layout_alignParentTop="true" />

    </RelativeLayout>

    <Button
    android:id="@+id/btn_register"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentStart="true"
    android:background="@color/colorRedPrimary"
    android:text="@string/register_all_item"
    android:textAllCaps="false"
    android:textColor="#fff" />

    </RelativeLayout>

    </FrameLayout>


    My layout preview in my android studio



    The Layout preview in my android studio



    The layout when i run it on my phone (I'm using an Asus Zenfone 5)



    When i run it on my phone



    I'm not sure where i did wrong, i actually have change the button into the floating button, but only half of the button shows in the layout. (Plus i can't scroll the layout)



    Update
    I have resolved it, the problem is in the tabbed activity layout.
    I use a constraint layout as the parent, i've changed it to Relative layout and it works perfectly










    share|improve this question



























      0












      0








      0







      I've been making a tabbed activity with a list view in it. I've been trying to put a button under the list view, but when i run on my phone, the button doesn't show up.



      My Fragment layout



      <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context="com.siscaproject.sisca.Fragment.RegisterFragment">

      <RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_marginTop="7dp">

      <RelativeLayout
      android:id="@+id/rl_total_data"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:background="@color/colorRedPrimary"
      android:padding="8dp">

      <TextView
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginLeft="5dp"
      android:text="@string/item_detected"
      android:textColor="#fff" />

      <TextView
      android:id="@+id/tv_total_data"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentEnd="true"
      android:layout_alignParentRight="true"
      android:layout_marginEnd="7dp"
      android:hint="10 items detected"
      android:textColor="#fff" />
      </RelativeLayout>

      <RelativeLayout
      android:id="@+id/rl_data"
      android:layout_below="@id/rl_total_data"
      android:layout_width="match_parent"
      android:layout_height="match_parent">

      <ListView
      android:id="@+id/lv_data"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_alignParentStart="true"
      android:layout_alignParentTop="true" />

      </RelativeLayout>

      <Button
      android:id="@+id/btn_register"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_alignParentStart="true"
      android:background="@color/colorRedPrimary"
      android:text="@string/register_all_item"
      android:textAllCaps="false"
      android:textColor="#fff" />

      </RelativeLayout>

      </FrameLayout>


      My layout preview in my android studio



      The Layout preview in my android studio



      The layout when i run it on my phone (I'm using an Asus Zenfone 5)



      When i run it on my phone



      I'm not sure where i did wrong, i actually have change the button into the floating button, but only half of the button shows in the layout. (Plus i can't scroll the layout)



      Update
      I have resolved it, the problem is in the tabbed activity layout.
      I use a constraint layout as the parent, i've changed it to Relative layout and it works perfectly










      share|improve this question















      I've been making a tabbed activity with a list view in it. I've been trying to put a button under the list view, but when i run on my phone, the button doesn't show up.



      My Fragment layout



      <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context="com.siscaproject.sisca.Fragment.RegisterFragment">

      <RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_marginTop="7dp">

      <RelativeLayout
      android:id="@+id/rl_total_data"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:background="@color/colorRedPrimary"
      android:padding="8dp">

      <TextView
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginLeft="5dp"
      android:text="@string/item_detected"
      android:textColor="#fff" />

      <TextView
      android:id="@+id/tv_total_data"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentEnd="true"
      android:layout_alignParentRight="true"
      android:layout_marginEnd="7dp"
      android:hint="10 items detected"
      android:textColor="#fff" />
      </RelativeLayout>

      <RelativeLayout
      android:id="@+id/rl_data"
      android:layout_below="@id/rl_total_data"
      android:layout_width="match_parent"
      android:layout_height="match_parent">

      <ListView
      android:id="@+id/lv_data"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_alignParentStart="true"
      android:layout_alignParentTop="true" />

      </RelativeLayout>

      <Button
      android:id="@+id/btn_register"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_alignParentStart="true"
      android:background="@color/colorRedPrimary"
      android:text="@string/register_all_item"
      android:textAllCaps="false"
      android:textColor="#fff" />

      </RelativeLayout>

      </FrameLayout>


      My layout preview in my android studio



      The Layout preview in my android studio



      The layout when i run it on my phone (I'm using an Asus Zenfone 5)



      When i run it on my phone



      I'm not sure where i did wrong, i actually have change the button into the floating button, but only half of the button shows in the layout. (Plus i can't scroll the layout)



      Update
      I have resolved it, the problem is in the tabbed activity layout.
      I use a constraint layout as the parent, i've changed it to Relative layout and it works perfectly







      android android-layout






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 23 at 7:23

























      asked Nov 23 at 6:29









      llehcram

      256




      256
























          5 Answers
          5






          active

          oldest

          votes


















          1














          Try this



          change color according to you!



          <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          >

          <RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="7dp">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorAccent"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff"
          android:layout_marginRight="7dp" />
          </RelativeLayout>

          <RelativeLayout
          android:id="@+id/rl_data"
          android:layout_below="@id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent">

          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true"
          android:layout_alignParentLeft="true" />

          </RelativeLayout>

          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentStart="true"
          android:background="@color/colorPrimary"
          android:text="helo"
          android:textAllCaps="false"
          android:textColor="#fff"
          android:layout_alignParentLeft="true" />

          </RelativeLayout>

          </FrameLayout>





          share|improve this answer





















          • unfortunately i doesn't work as well
            – llehcram
            Nov 23 at 7:14



















          1














          Try this code..



          <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context="com.siscaproject.sisca.Fragment.RegisterFragment">

          <RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="7dp">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorRedPrimary"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="@string/item_detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff" />
          </RelativeLayout>

          <RelativeLayout
          android:id="@+id/rl_data"
          android:layout_below="@id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent">

          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true"
          android:layout_above="@+id/btn_register" />

          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentStart="true"
          android:background="@color/colorAccent"
          android:text="submit"
          android:textAllCaps="false"
          android:textColor="#fff" />

          </RelativeLayout>


          </RelativeLayout>







          share|improve this answer























          • Still has the same output unfortunately
            – llehcram
            Nov 23 at 6:36










          • it is runtime issue.
            – Android Team
            Nov 23 at 6:40










          • pass this line into listview android:layout_above="@+id/btn_register"
            – Android Team
            Nov 23 at 6:42










          • i update listview xml code and add above comment line code
            – Android Team
            Nov 23 at 6:44










          • still doesn't work as well, maybe you may need my tabbed activity layout?
            – llehcram
            Nov 23 at 6:54



















          0














          Try with this code



          <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginTop="7dp">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorPrimary"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="Items Detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff" />
          </RelativeLayout>



          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_above="@+id/btn_register"
          android:layout_below="@+id/rl_total_data"/>


          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:background="@color/colorAccent"
          android:text="Register"
          android:textAllCaps="false"
          android:textColor="#fff" />







          share|improve this answer





















          • still has the same output
            – llehcram
            Nov 23 at 7:14










          • can you show your activity layout. Because just this fragment layout is working fine in device for me
            – Vivek Mishra
            Nov 23 at 7:25










          • i have resolved it, turns out my activity layout used coordinator layout instead of relative layout. i have changed it and i works fine now. thank you for your answer!
            – llehcram
            Nov 23 at 7:30



















          0














          Try this



          <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context="com.siscaproject.sisca.Fragment.RegisterFragment">

          <LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="7dp"
          android:orientation="vertical">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorRedPrimary"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="@string/item_detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff" />
          </RelativeLayout>

          <RelativeLayout
          android:id="@+id/rl_data"
          android:layout_below="@id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="0dp"
          android:layout_weight="1">

          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true" />

          </RelativeLayout>
          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentStart="true"
          android:background="@color/colorRedPrimary"
          android:text="@string/register_all_item"
          android:textAllCaps="false"
          android:textColor="#fff" />
          </LinearLayout>







          share|improve this answer





















          • i have resolved it, the problem is in my tabbed activity layout. you should see my update message above. thanks for your answer!
            – llehcram
            Nov 23 at 7:24










          • @llehcram I was also curious about the activity layout but i'm late. thanks for your inform about update.
            – Mia
            Nov 23 at 8:18



















          0














          This is because of the "match parent" attribute that is in a view above your button.Your button therefore is not shown because a view on top of it has been set to occupy all the space of the parent.



          SEE BELOW CODE modification



          <FrameLayout 
          xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context="com.siscaproject.sisca.Fragment.RegisterFragment">

          <RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="7dp">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorRedPrimary"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="@string/item_detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff" />
          </RelativeLayout>

          <RelativeLayout
          android:id="@+id/rl_data"
          android:layout_below="@id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content">

          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true" />

          </RelativeLayout>

          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentStart="true"
          android:background="@color/colorRedPrimary"
          android:text="@string/register_all_item"
          android:textAllCaps="false"
          android:textColor="#fff" />

          </RelativeLayout>

          </FrameLayout>


          You could try to use weightSum as explained in this post.What is android:weightSum in android, and how does it work?
          It give much more control in division of your parent layout






          share|improve this answer























          • still has the same output
            – llehcram
            Nov 23 at 7:14










          • see amended code, the list view also should not match parent
            – Mushirih
            Nov 23 at 7:29











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53441599%2fwhy-does-my-button-not-showing-in-the-layout%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          5 Answers
          5






          active

          oldest

          votes








          5 Answers
          5






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Try this



          change color according to you!



          <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          >

          <RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="7dp">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorAccent"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff"
          android:layout_marginRight="7dp" />
          </RelativeLayout>

          <RelativeLayout
          android:id="@+id/rl_data"
          android:layout_below="@id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent">

          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true"
          android:layout_alignParentLeft="true" />

          </RelativeLayout>

          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentStart="true"
          android:background="@color/colorPrimary"
          android:text="helo"
          android:textAllCaps="false"
          android:textColor="#fff"
          android:layout_alignParentLeft="true" />

          </RelativeLayout>

          </FrameLayout>





          share|improve this answer





















          • unfortunately i doesn't work as well
            – llehcram
            Nov 23 at 7:14
















          1














          Try this



          change color according to you!



          <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          >

          <RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="7dp">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorAccent"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff"
          android:layout_marginRight="7dp" />
          </RelativeLayout>

          <RelativeLayout
          android:id="@+id/rl_data"
          android:layout_below="@id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent">

          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true"
          android:layout_alignParentLeft="true" />

          </RelativeLayout>

          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentStart="true"
          android:background="@color/colorPrimary"
          android:text="helo"
          android:textAllCaps="false"
          android:textColor="#fff"
          android:layout_alignParentLeft="true" />

          </RelativeLayout>

          </FrameLayout>





          share|improve this answer





















          • unfortunately i doesn't work as well
            – llehcram
            Nov 23 at 7:14














          1












          1








          1






          Try this



          change color according to you!



          <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          >

          <RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="7dp">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorAccent"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff"
          android:layout_marginRight="7dp" />
          </RelativeLayout>

          <RelativeLayout
          android:id="@+id/rl_data"
          android:layout_below="@id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent">

          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true"
          android:layout_alignParentLeft="true" />

          </RelativeLayout>

          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentStart="true"
          android:background="@color/colorPrimary"
          android:text="helo"
          android:textAllCaps="false"
          android:textColor="#fff"
          android:layout_alignParentLeft="true" />

          </RelativeLayout>

          </FrameLayout>





          share|improve this answer












          Try this



          change color according to you!



          <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          >

          <RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="7dp">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorAccent"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff"
          android:layout_marginRight="7dp" />
          </RelativeLayout>

          <RelativeLayout
          android:id="@+id/rl_data"
          android:layout_below="@id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent">

          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true"
          android:layout_alignParentLeft="true" />

          </RelativeLayout>

          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentStart="true"
          android:background="@color/colorPrimary"
          android:text="helo"
          android:textAllCaps="false"
          android:textColor="#fff"
          android:layout_alignParentLeft="true" />

          </RelativeLayout>

          </FrameLayout>






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 23 at 6:41









          kanhaiyalal sonar

          113




          113












          • unfortunately i doesn't work as well
            – llehcram
            Nov 23 at 7:14


















          • unfortunately i doesn't work as well
            – llehcram
            Nov 23 at 7:14
















          unfortunately i doesn't work as well
          – llehcram
          Nov 23 at 7:14




          unfortunately i doesn't work as well
          – llehcram
          Nov 23 at 7:14













          1














          Try this code..



          <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context="com.siscaproject.sisca.Fragment.RegisterFragment">

          <RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="7dp">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorRedPrimary"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="@string/item_detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff" />
          </RelativeLayout>

          <RelativeLayout
          android:id="@+id/rl_data"
          android:layout_below="@id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent">

          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true"
          android:layout_above="@+id/btn_register" />

          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentStart="true"
          android:background="@color/colorAccent"
          android:text="submit"
          android:textAllCaps="false"
          android:textColor="#fff" />

          </RelativeLayout>


          </RelativeLayout>







          share|improve this answer























          • Still has the same output unfortunately
            – llehcram
            Nov 23 at 6:36










          • it is runtime issue.
            – Android Team
            Nov 23 at 6:40










          • pass this line into listview android:layout_above="@+id/btn_register"
            – Android Team
            Nov 23 at 6:42










          • i update listview xml code and add above comment line code
            – Android Team
            Nov 23 at 6:44










          • still doesn't work as well, maybe you may need my tabbed activity layout?
            – llehcram
            Nov 23 at 6:54
















          1














          Try this code..



          <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context="com.siscaproject.sisca.Fragment.RegisterFragment">

          <RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="7dp">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorRedPrimary"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="@string/item_detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff" />
          </RelativeLayout>

          <RelativeLayout
          android:id="@+id/rl_data"
          android:layout_below="@id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent">

          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true"
          android:layout_above="@+id/btn_register" />

          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentStart="true"
          android:background="@color/colorAccent"
          android:text="submit"
          android:textAllCaps="false"
          android:textColor="#fff" />

          </RelativeLayout>


          </RelativeLayout>







          share|improve this answer























          • Still has the same output unfortunately
            – llehcram
            Nov 23 at 6:36










          • it is runtime issue.
            – Android Team
            Nov 23 at 6:40










          • pass this line into listview android:layout_above="@+id/btn_register"
            – Android Team
            Nov 23 at 6:42










          • i update listview xml code and add above comment line code
            – Android Team
            Nov 23 at 6:44










          • still doesn't work as well, maybe you may need my tabbed activity layout?
            – llehcram
            Nov 23 at 6:54














          1












          1








          1






          Try this code..



          <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context="com.siscaproject.sisca.Fragment.RegisterFragment">

          <RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="7dp">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorRedPrimary"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="@string/item_detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff" />
          </RelativeLayout>

          <RelativeLayout
          android:id="@+id/rl_data"
          android:layout_below="@id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent">

          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true"
          android:layout_above="@+id/btn_register" />

          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentStart="true"
          android:background="@color/colorAccent"
          android:text="submit"
          android:textAllCaps="false"
          android:textColor="#fff" />

          </RelativeLayout>


          </RelativeLayout>







          share|improve this answer














          Try this code..



          <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context="com.siscaproject.sisca.Fragment.RegisterFragment">

          <RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="7dp">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorRedPrimary"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="@string/item_detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff" />
          </RelativeLayout>

          <RelativeLayout
          android:id="@+id/rl_data"
          android:layout_below="@id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent">

          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true"
          android:layout_above="@+id/btn_register" />

          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentStart="true"
          android:background="@color/colorAccent"
          android:text="submit"
          android:textAllCaps="false"
          android:textColor="#fff" />

          </RelativeLayout>


          </RelativeLayout>








          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 23 at 6:43

























          answered Nov 23 at 6:34









          Android Team

          7,46411033




          7,46411033












          • Still has the same output unfortunately
            – llehcram
            Nov 23 at 6:36










          • it is runtime issue.
            – Android Team
            Nov 23 at 6:40










          • pass this line into listview android:layout_above="@+id/btn_register"
            – Android Team
            Nov 23 at 6:42










          • i update listview xml code and add above comment line code
            – Android Team
            Nov 23 at 6:44










          • still doesn't work as well, maybe you may need my tabbed activity layout?
            – llehcram
            Nov 23 at 6:54


















          • Still has the same output unfortunately
            – llehcram
            Nov 23 at 6:36










          • it is runtime issue.
            – Android Team
            Nov 23 at 6:40










          • pass this line into listview android:layout_above="@+id/btn_register"
            – Android Team
            Nov 23 at 6:42










          • i update listview xml code and add above comment line code
            – Android Team
            Nov 23 at 6:44










          • still doesn't work as well, maybe you may need my tabbed activity layout?
            – llehcram
            Nov 23 at 6:54
















          Still has the same output unfortunately
          – llehcram
          Nov 23 at 6:36




          Still has the same output unfortunately
          – llehcram
          Nov 23 at 6:36












          it is runtime issue.
          – Android Team
          Nov 23 at 6:40




          it is runtime issue.
          – Android Team
          Nov 23 at 6:40












          pass this line into listview android:layout_above="@+id/btn_register"
          – Android Team
          Nov 23 at 6:42




          pass this line into listview android:layout_above="@+id/btn_register"
          – Android Team
          Nov 23 at 6:42












          i update listview xml code and add above comment line code
          – Android Team
          Nov 23 at 6:44




          i update listview xml code and add above comment line code
          – Android Team
          Nov 23 at 6:44












          still doesn't work as well, maybe you may need my tabbed activity layout?
          – llehcram
          Nov 23 at 6:54




          still doesn't work as well, maybe you may need my tabbed activity layout?
          – llehcram
          Nov 23 at 6:54











          0














          Try with this code



          <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginTop="7dp">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorPrimary"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="Items Detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff" />
          </RelativeLayout>



          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_above="@+id/btn_register"
          android:layout_below="@+id/rl_total_data"/>


          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:background="@color/colorAccent"
          android:text="Register"
          android:textAllCaps="false"
          android:textColor="#fff" />







          share|improve this answer





















          • still has the same output
            – llehcram
            Nov 23 at 7:14










          • can you show your activity layout. Because just this fragment layout is working fine in device for me
            – Vivek Mishra
            Nov 23 at 7:25










          • i have resolved it, turns out my activity layout used coordinator layout instead of relative layout. i have changed it and i works fine now. thank you for your answer!
            – llehcram
            Nov 23 at 7:30
















          0














          Try with this code



          <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginTop="7dp">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorPrimary"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="Items Detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff" />
          </RelativeLayout>



          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_above="@+id/btn_register"
          android:layout_below="@+id/rl_total_data"/>


          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:background="@color/colorAccent"
          android:text="Register"
          android:textAllCaps="false"
          android:textColor="#fff" />







          share|improve this answer





















          • still has the same output
            – llehcram
            Nov 23 at 7:14










          • can you show your activity layout. Because just this fragment layout is working fine in device for me
            – Vivek Mishra
            Nov 23 at 7:25










          • i have resolved it, turns out my activity layout used coordinator layout instead of relative layout. i have changed it and i works fine now. thank you for your answer!
            – llehcram
            Nov 23 at 7:30














          0












          0








          0






          Try with this code



          <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginTop="7dp">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorPrimary"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="Items Detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff" />
          </RelativeLayout>



          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_above="@+id/btn_register"
          android:layout_below="@+id/rl_total_data"/>


          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:background="@color/colorAccent"
          android:text="Register"
          android:textAllCaps="false"
          android:textColor="#fff" />







          share|improve this answer












          Try with this code



          <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginTop="7dp">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorPrimary"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="Items Detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff" />
          </RelativeLayout>



          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_above="@+id/btn_register"
          android:layout_below="@+id/rl_total_data"/>


          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:background="@color/colorAccent"
          android:text="Register"
          android:textAllCaps="false"
          android:textColor="#fff" />








          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 23 at 6:40









          Vivek Mishra

          3,76642955




          3,76642955












          • still has the same output
            – llehcram
            Nov 23 at 7:14










          • can you show your activity layout. Because just this fragment layout is working fine in device for me
            – Vivek Mishra
            Nov 23 at 7:25










          • i have resolved it, turns out my activity layout used coordinator layout instead of relative layout. i have changed it and i works fine now. thank you for your answer!
            – llehcram
            Nov 23 at 7:30


















          • still has the same output
            – llehcram
            Nov 23 at 7:14










          • can you show your activity layout. Because just this fragment layout is working fine in device for me
            – Vivek Mishra
            Nov 23 at 7:25










          • i have resolved it, turns out my activity layout used coordinator layout instead of relative layout. i have changed it and i works fine now. thank you for your answer!
            – llehcram
            Nov 23 at 7:30
















          still has the same output
          – llehcram
          Nov 23 at 7:14




          still has the same output
          – llehcram
          Nov 23 at 7:14












          can you show your activity layout. Because just this fragment layout is working fine in device for me
          – Vivek Mishra
          Nov 23 at 7:25




          can you show your activity layout. Because just this fragment layout is working fine in device for me
          – Vivek Mishra
          Nov 23 at 7:25












          i have resolved it, turns out my activity layout used coordinator layout instead of relative layout. i have changed it and i works fine now. thank you for your answer!
          – llehcram
          Nov 23 at 7:30




          i have resolved it, turns out my activity layout used coordinator layout instead of relative layout. i have changed it and i works fine now. thank you for your answer!
          – llehcram
          Nov 23 at 7:30











          0














          Try this



          <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context="com.siscaproject.sisca.Fragment.RegisterFragment">

          <LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="7dp"
          android:orientation="vertical">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorRedPrimary"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="@string/item_detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff" />
          </RelativeLayout>

          <RelativeLayout
          android:id="@+id/rl_data"
          android:layout_below="@id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="0dp"
          android:layout_weight="1">

          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true" />

          </RelativeLayout>
          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentStart="true"
          android:background="@color/colorRedPrimary"
          android:text="@string/register_all_item"
          android:textAllCaps="false"
          android:textColor="#fff" />
          </LinearLayout>







          share|improve this answer





















          • i have resolved it, the problem is in my tabbed activity layout. you should see my update message above. thanks for your answer!
            – llehcram
            Nov 23 at 7:24










          • @llehcram I was also curious about the activity layout but i'm late. thanks for your inform about update.
            – Mia
            Nov 23 at 8:18
















          0














          Try this



          <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context="com.siscaproject.sisca.Fragment.RegisterFragment">

          <LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="7dp"
          android:orientation="vertical">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorRedPrimary"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="@string/item_detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff" />
          </RelativeLayout>

          <RelativeLayout
          android:id="@+id/rl_data"
          android:layout_below="@id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="0dp"
          android:layout_weight="1">

          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true" />

          </RelativeLayout>
          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentStart="true"
          android:background="@color/colorRedPrimary"
          android:text="@string/register_all_item"
          android:textAllCaps="false"
          android:textColor="#fff" />
          </LinearLayout>







          share|improve this answer





















          • i have resolved it, the problem is in my tabbed activity layout. you should see my update message above. thanks for your answer!
            – llehcram
            Nov 23 at 7:24










          • @llehcram I was also curious about the activity layout but i'm late. thanks for your inform about update.
            – Mia
            Nov 23 at 8:18














          0












          0








          0






          Try this



          <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context="com.siscaproject.sisca.Fragment.RegisterFragment">

          <LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="7dp"
          android:orientation="vertical">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorRedPrimary"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="@string/item_detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff" />
          </RelativeLayout>

          <RelativeLayout
          android:id="@+id/rl_data"
          android:layout_below="@id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="0dp"
          android:layout_weight="1">

          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true" />

          </RelativeLayout>
          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentStart="true"
          android:background="@color/colorRedPrimary"
          android:text="@string/register_all_item"
          android:textAllCaps="false"
          android:textColor="#fff" />
          </LinearLayout>







          share|improve this answer












          Try this



          <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context="com.siscaproject.sisca.Fragment.RegisterFragment">

          <LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="7dp"
          android:orientation="vertical">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorRedPrimary"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="@string/item_detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff" />
          </RelativeLayout>

          <RelativeLayout
          android:id="@+id/rl_data"
          android:layout_below="@id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="0dp"
          android:layout_weight="1">

          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true" />

          </RelativeLayout>
          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentStart="true"
          android:background="@color/colorRedPrimary"
          android:text="@string/register_all_item"
          android:textAllCaps="false"
          android:textColor="#fff" />
          </LinearLayout>








          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 23 at 7:21









          Mia

          11




          11












          • i have resolved it, the problem is in my tabbed activity layout. you should see my update message above. thanks for your answer!
            – llehcram
            Nov 23 at 7:24










          • @llehcram I was also curious about the activity layout but i'm late. thanks for your inform about update.
            – Mia
            Nov 23 at 8:18


















          • i have resolved it, the problem is in my tabbed activity layout. you should see my update message above. thanks for your answer!
            – llehcram
            Nov 23 at 7:24










          • @llehcram I was also curious about the activity layout but i'm late. thanks for your inform about update.
            – Mia
            Nov 23 at 8:18
















          i have resolved it, the problem is in my tabbed activity layout. you should see my update message above. thanks for your answer!
          – llehcram
          Nov 23 at 7:24




          i have resolved it, the problem is in my tabbed activity layout. you should see my update message above. thanks for your answer!
          – llehcram
          Nov 23 at 7:24












          @llehcram I was also curious about the activity layout but i'm late. thanks for your inform about update.
          – Mia
          Nov 23 at 8:18




          @llehcram I was also curious about the activity layout but i'm late. thanks for your inform about update.
          – Mia
          Nov 23 at 8:18











          0














          This is because of the "match parent" attribute that is in a view above your button.Your button therefore is not shown because a view on top of it has been set to occupy all the space of the parent.



          SEE BELOW CODE modification



          <FrameLayout 
          xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context="com.siscaproject.sisca.Fragment.RegisterFragment">

          <RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="7dp">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorRedPrimary"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="@string/item_detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff" />
          </RelativeLayout>

          <RelativeLayout
          android:id="@+id/rl_data"
          android:layout_below="@id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content">

          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true" />

          </RelativeLayout>

          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentStart="true"
          android:background="@color/colorRedPrimary"
          android:text="@string/register_all_item"
          android:textAllCaps="false"
          android:textColor="#fff" />

          </RelativeLayout>

          </FrameLayout>


          You could try to use weightSum as explained in this post.What is android:weightSum in android, and how does it work?
          It give much more control in division of your parent layout






          share|improve this answer























          • still has the same output
            – llehcram
            Nov 23 at 7:14










          • see amended code, the list view also should not match parent
            – Mushirih
            Nov 23 at 7:29
















          0














          This is because of the "match parent" attribute that is in a view above your button.Your button therefore is not shown because a view on top of it has been set to occupy all the space of the parent.



          SEE BELOW CODE modification



          <FrameLayout 
          xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context="com.siscaproject.sisca.Fragment.RegisterFragment">

          <RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="7dp">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorRedPrimary"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="@string/item_detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff" />
          </RelativeLayout>

          <RelativeLayout
          android:id="@+id/rl_data"
          android:layout_below="@id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content">

          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true" />

          </RelativeLayout>

          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentStart="true"
          android:background="@color/colorRedPrimary"
          android:text="@string/register_all_item"
          android:textAllCaps="false"
          android:textColor="#fff" />

          </RelativeLayout>

          </FrameLayout>


          You could try to use weightSum as explained in this post.What is android:weightSum in android, and how does it work?
          It give much more control in division of your parent layout






          share|improve this answer























          • still has the same output
            – llehcram
            Nov 23 at 7:14










          • see amended code, the list view also should not match parent
            – Mushirih
            Nov 23 at 7:29














          0












          0








          0






          This is because of the "match parent" attribute that is in a view above your button.Your button therefore is not shown because a view on top of it has been set to occupy all the space of the parent.



          SEE BELOW CODE modification



          <FrameLayout 
          xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context="com.siscaproject.sisca.Fragment.RegisterFragment">

          <RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="7dp">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorRedPrimary"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="@string/item_detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff" />
          </RelativeLayout>

          <RelativeLayout
          android:id="@+id/rl_data"
          android:layout_below="@id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content">

          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true" />

          </RelativeLayout>

          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentStart="true"
          android:background="@color/colorRedPrimary"
          android:text="@string/register_all_item"
          android:textAllCaps="false"
          android:textColor="#fff" />

          </RelativeLayout>

          </FrameLayout>


          You could try to use weightSum as explained in this post.What is android:weightSum in android, and how does it work?
          It give much more control in division of your parent layout






          share|improve this answer














          This is because of the "match parent" attribute that is in a view above your button.Your button therefore is not shown because a view on top of it has been set to occupy all the space of the parent.



          SEE BELOW CODE modification



          <FrameLayout 
          xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context="com.siscaproject.sisca.Fragment.RegisterFragment">

          <RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="7dp">

          <RelativeLayout
          android:id="@+id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@color/colorRedPrimary"
          android:padding="8dp">

          <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="5dp"
          android:text="@string/item_detected"
          android:textColor="#fff" />

          <TextView
          android:id="@+id/tv_total_data"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_marginEnd="7dp"
          android:hint="10 items detected"
          android:textColor="#fff" />
          </RelativeLayout>

          <RelativeLayout
          android:id="@+id/rl_data"
          android:layout_below="@id/rl_total_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content">

          <ListView
          android:id="@+id/lv_data"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentStart="true"
          android:layout_alignParentTop="true" />

          </RelativeLayout>

          <Button
          android:id="@+id/btn_register"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentStart="true"
          android:background="@color/colorRedPrimary"
          android:text="@string/register_all_item"
          android:textAllCaps="false"
          android:textColor="#fff" />

          </RelativeLayout>

          </FrameLayout>


          You could try to use weightSum as explained in this post.What is android:weightSum in android, and how does it work?
          It give much more control in division of your parent layout







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 23 at 7:29

























          answered Nov 23 at 6:37









          Mushirih

          331313




          331313












          • still has the same output
            – llehcram
            Nov 23 at 7:14










          • see amended code, the list view also should not match parent
            – Mushirih
            Nov 23 at 7:29


















          • still has the same output
            – llehcram
            Nov 23 at 7:14










          • see amended code, the list view also should not match parent
            – Mushirih
            Nov 23 at 7:29
















          still has the same output
          – llehcram
          Nov 23 at 7:14




          still has the same output
          – llehcram
          Nov 23 at 7:14












          see amended code, the list view also should not match parent
          – Mushirih
          Nov 23 at 7:29




          see amended code, the list view also should not match parent
          – Mushirih
          Nov 23 at 7:29


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53441599%2fwhy-does-my-button-not-showing-in-the-layout%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Contact image not getting when fetch all contact list from iPhone by CNContact

          count number of partitions of a set with n elements into k subsets

          A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks