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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:12:54+00:00 2026-05-23T13:12:54+00:00

I am trying to create a widget for my android app. I want it

  • 0

I am trying to create a widget for my android app. I want it to be a single cell but with an annotation in the top right. Similar to popular widgets which display an unread email/sms count in the top right. This seems like it would be a common thing to try and do but I can’t find any examples of how to build this.

How do I do this? Or what resources are there to teach me how to do this?

Thanks,

Robin

  • 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-23T13:12:54+00:00Added an answer on May 23, 2026 at 1:12 pm

    Im not sure whether you are asking how to build a widget in general or just for the small unread indication.
    There are some tutorials on the net, how to build a widget in general. For example:
    this one or the official documentation.

    Once you mastered that, the small indicator becomes a minor issue, you just have to include it in your layout. When updating the widget, you just update the view that indicates the count or set its visibility to invisible when the count is 0.

    An example layout for this case would be

      <FrameLayout> 
                <RelativeLayout> <ImageView /> </RelativeLayout>
                <RelativeLayout> <TextView /> </RelativeLayout>
      </FrameLayout>
    

    Here the widget consists of one ImageView, that you usually center via its surrounding RelativeLayout. The Textview in the second RelativeLayout can be your unread indicator.
    Position it in the corner like you would in a RelativeLayout and style it (via android:background="@drawable/my_indicator_background" or something along those lines).

    And thats it. 🙂

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

Sidebar

Related Questions

I'm trying to create an icon/widget (1 cell x 1 cell) that can be
i am trying to create a custom tab in my android app and i
recently I been trying to create an android app that uses JSON Objects to
I am trying to create a combobox style widget (jquery-ui compatible) andcurrently I am
I'm trying to create a form that has an expandable widget. The problem is
Trying to create a user account in a test. But getting a Object reference
Trying to create my first iPhone app that would play back audio. When I
I'm trying to build a simple Android app that increments a number displayed every
So I'm trying to build a tabs view for an Android app, and for
I'm trying to create a simple Android UI that consists of a EditText and

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.