Content inside a hexagon vector











up vote
-1
down vote

favorite












I have a vector that creates a hexagon and Im using it in a Relative layout as background, inside this relativeLayout I have an imageView and a textView:



This is what I have:



enter image description here



But I want to build something like this:



enter image description here



This is the vector:



<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#c3c3c3"
android:pathData="M21,16.5C21,16.88 20.79,17.21 20.47,17.38L12.57,
21.82C12.41,21.94 12.21,22 12,22C11.79,22 11.59,21.94 11.43,21.82L3.53,
17.38C3.21,17.21 3,16.88 3,16.5V7.5C3,7.12 3.21,6.79 3.53,6.62L11.43,2.18C11.59,
2.06 11.79,2 12,2C12.21,2 12.41,2.06 12.57,2.18L20.47,6.62C20.79,6.79 21,7.12 21,
7.5V16.5Z"
/>
</vector>


This is my layout:



 <RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/hexagon"
>

<ImageView
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_launcher"
android:layout_centerInParent="true"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="aaaaaaaaaaaaaaaaaaaaaaaaaa"
android:layout_gravity="center"
android:textSize="25sp"
android:layout_below="@id/img"
/>

</RelativeLayout>


What should I edit to get what I want??










share|improve this question


























    up vote
    -1
    down vote

    favorite












    I have a vector that creates a hexagon and Im using it in a Relative layout as background, inside this relativeLayout I have an imageView and a textView:



    This is what I have:



    enter image description here



    But I want to build something like this:



    enter image description here



    This is the vector:



    <vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:height="24dp"
    android:width="24dp"
    android:viewportWidth="24"
    android:viewportHeight="24">
    <path android:fillColor="#c3c3c3"
    android:pathData="M21,16.5C21,16.88 20.79,17.21 20.47,17.38L12.57,
    21.82C12.41,21.94 12.21,22 12,22C11.79,22 11.59,21.94 11.43,21.82L3.53,
    17.38C3.21,17.21 3,16.88 3,16.5V7.5C3,7.12 3.21,6.79 3.53,6.62L11.43,2.18C11.59,
    2.06 11.79,2 12,2C12.21,2 12.41,2.06 12.57,2.18L20.47,6.62C20.79,6.79 21,7.12 21,
    7.5V16.5Z"
    />
    </vector>


    This is my layout:



     <RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="@drawable/hexagon"
    >

    <ImageView
    android:id="@+id/img"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@mipmap/ic_launcher"
    android:layout_centerInParent="true"
    />

    <TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="aaaaaaaaaaaaaaaaaaaaaaaaaa"
    android:layout_gravity="center"
    android:textSize="25sp"
    android:layout_below="@id/img"
    />

    </RelativeLayout>


    What should I edit to get what I want??










    share|improve this question
























      up vote
      -1
      down vote

      favorite









      up vote
      -1
      down vote

      favorite











      I have a vector that creates a hexagon and Im using it in a Relative layout as background, inside this relativeLayout I have an imageView and a textView:



      This is what I have:



      enter image description here



      But I want to build something like this:



      enter image description here



      This is the vector:



      <vector xmlns:android="http://schemas.android.com/apk/res/android"
      android:height="24dp"
      android:width="24dp"
      android:viewportWidth="24"
      android:viewportHeight="24">
      <path android:fillColor="#c3c3c3"
      android:pathData="M21,16.5C21,16.88 20.79,17.21 20.47,17.38L12.57,
      21.82C12.41,21.94 12.21,22 12,22C11.79,22 11.59,21.94 11.43,21.82L3.53,
      17.38C3.21,17.21 3,16.88 3,16.5V7.5C3,7.12 3.21,6.79 3.53,6.62L11.43,2.18C11.59,
      2.06 11.79,2 12,2C12.21,2 12.41,2.06 12.57,2.18L20.47,6.62C20.79,6.79 21,7.12 21,
      7.5V16.5Z"
      />
      </vector>


      This is my layout:



       <RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      android:background="@drawable/hexagon"
      >

      <ImageView
      android:id="@+id/img"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:src="@mipmap/ic_launcher"
      android:layout_centerInParent="true"
      />

      <TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="aaaaaaaaaaaaaaaaaaaaaaaaaa"
      android:layout_gravity="center"
      android:textSize="25sp"
      android:layout_below="@id/img"
      />

      </RelativeLayout>


      What should I edit to get what I want??










      share|improve this question













      I have a vector that creates a hexagon and Im using it in a Relative layout as background, inside this relativeLayout I have an imageView and a textView:



      This is what I have:



      enter image description here



      But I want to build something like this:



      enter image description here



      This is the vector:



      <vector xmlns:android="http://schemas.android.com/apk/res/android"
      android:height="24dp"
      android:width="24dp"
      android:viewportWidth="24"
      android:viewportHeight="24">
      <path android:fillColor="#c3c3c3"
      android:pathData="M21,16.5C21,16.88 20.79,17.21 20.47,17.38L12.57,
      21.82C12.41,21.94 12.21,22 12,22C11.79,22 11.59,21.94 11.43,21.82L3.53,
      17.38C3.21,17.21 3,16.88 3,16.5V7.5C3,7.12 3.21,6.79 3.53,6.62L11.43,2.18C11.59,
      2.06 11.79,2 12,2C12.21,2 12.41,2.06 12.57,2.18L20.47,6.62C20.79,6.79 21,7.12 21,
      7.5V16.5Z"
      />
      </vector>


      This is my layout:



       <RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      android:background="@drawable/hexagon"
      >

      <ImageView
      android:id="@+id/img"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:src="@mipmap/ic_launcher"
      android:layout_centerInParent="true"
      />

      <TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="aaaaaaaaaaaaaaaaaaaaaaaaaa"
      android:layout_gravity="center"
      android:textSize="25sp"
      android:layout_below="@id/img"
      />

      </RelativeLayout>


      What should I edit to get what I want??







      android






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 9 at 16:28









      Jorge Requez

      4919




      4919





























          active

          oldest

          votes











          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',
          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%2f53229645%2fcontent-inside-a-hexagon-vector%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53229645%2fcontent-inside-a-hexagon-vector%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

          Schultheiß

          Liste der Kulturdenkmale in Wilsdruff

          Android Play Services Check