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 7615833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:44:26+00:00 2026-05-31T02:44:26+00:00

Myself designing an app which uses GPS and Maps. I have created the UI

  • 0

enter image description here

Myself designing an app which uses GPS and Maps. I have created the UI as tabs. But i couldn’t able to keep the font below the image.

Code in my Mainactivity

TabSpec gpsspec = tabHost.newTabSpec("GPS");
gpsspec.setIndicator("GPS", getResources().getDrawable(R.drawable.gps));
Intent gpsIntent = new Intent(this, GpsActivity.class);
gpsspec.setContent(gpsIntent);
tabHost.addTab(gpsspec);

XML file in my drawable folder for tabs

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- When selected, use grey -->
    <item android:drawable="@drawable/gps_icon"
          android:state_selected="true" />
    <!-- When not selected, use white-->
    <item android:drawable="@drawable/gps_icon" />
</selector>

Main.xml

<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical" >

        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" />

        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" />
    </LinearLayout>

</TabHost>

Kindly help in aligning the font.

  • 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-05-31T02:44:28+00:00Added an answer on May 31, 2026 at 2:44 am

    You need to provide

    • Small size of icons for small density devices in drawable-ldpi folder
    • Medium size of icons for medium density devices in drawable-mdpi folder
    • Large size icons for large density devices in drawable-hdpi folder

    Here is documentation guide for sizes of the drawable and layouts.

    if it doesn’t solve your problem, you can consider provding your own customized tab indicator, which I’ve used in my post here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have found myself designing a language for fun that is a cross between
I'm designing an Android app which loads lots of small (say 128x128px@24-bit) PNG images
I'm designing a UI, and I found myself itching my head : how can
So I would consider myself a .Net and ASP.NET pro but I am a
I am teaching myself to use JavaCC in a hobby project, and have a
I want to get myself into programming some serious GUI based applications, but when
So I've resigned myself to not being able to use the order of a
I'm designing a ruby on rails app for a pharmacy, and one of the
Does anyone have any good references for designing and implementing an idea I have
I often find myself designing simple little web projects that are serving up aggregate

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.