Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8875121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:53:50+00:00 2026-06-14T18:53:50+00:00

How can i customize a cell of Grid view with two textview, as i

  • 0

How can i customize a cell of Grid view with two textview, as i want to show 2 labels in each cell.

In my task, i am looking for the Grid View as a Table and it contains two various Values in each cell. i have Tried the Customized Grid view for this as follow.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<Button android:id="@+id/selectBtn"
    android:layout_width="wrap_content" android:layout_height="wrap_content"
    android:text="Select" android:layout_alignParentBottom="true"
    android:layout_centerHorizontal="true"
    android:minWidth="200px" />
<GridView android:id="@+id/PhoneGrid"
    android:layout_width="fill_parent" android:layout_height="fill_parent"
    android:numColumns="auto_fit" android:verticalSpacing="10dp"
    android:horizontalSpacing="10dp" android:columnWidth="90dp"
    android:stretchMode="columnWidth" android:gravity="center"
    android:layout_above="@id/selectBtn" />
</RelativeLayout>

and the Custom layout is,..

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<TextView android:id="@+id/Name" android:layout_width="wrap_content"
    android:layout_height="wrap_content" android:layout_centerInParent="true" />
<TextView android:id="@+id/Number" android:layout_width="wrap_content"
    android:layout_height="wrap_content" android:layout_alignParentRight="true"
    android:layout_alignParentTop="true" />
</RelativeLayout>

In this i need to display the name and phone number in a single Gridview..

Help me do get the Solution..

Thanks in Advance..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T18:53:51+00:00Added an answer on June 14, 2026 at 6:53 pm

    Simply i have used a String with Multiline Processing as “\n”..

    Like you can subsitude the String as follows

    String header=first_String_Variable+"\n"+second_String_Variable;
    

    and set grid by using Adapter..

    ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1, header);
    gridHeader.setAdapter(adapter);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to show image in each tableView's cell at middle of it for
I want to have a flexible templating language that I can customize for a
I want to customize a .NET build process so that I can run an
I have installed Wix 3.5 and i want to customize some dialogs, where can
I want to write a simple program which can customize iphone icons like their
In my table view I have 4 UIButton s, 2 in each row of
Can I have a ListView where I can customize the first cell, and then
To specify cell heights of a table view we use the delegate method, -
Ey guys, so I want to create a grouped table view which has the
CompositeCell let us customize the content of a table cell's in GWT using Java.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.