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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:47:27+00:00 2026-05-22T16:47:27+00:00

I have an Achievement dialog, and would like this: And this is my code,

  • 0

I have an Achievement dialog, and would like this:

Description

And this is my code, each achievement is a relative layout, and all are contained in a LinearLayout (pnlAchievement):

            RelativeLayout pnlItem = new RelativeLayout(Parent);
        pnlItem.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
                LayoutParams.WRAP_CONTENT));

        TextView txtItemName = new TextView(Parent);
        txtItemName.setText(ACHIEVEMENTS_NAME[i]);
        txtItemName.setLayoutParams(new LayoutParams(
                LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));

        TextView txtAchived = new TextView(Parent);
        txtAchived.setText(Achived[i] ? "Achieved!" : "Not Achieved!");
        RelativeLayout.LayoutParams rlpAchived = new RelativeLayout.LayoutParams(
                new LayoutParams(LayoutParams.WRAP_CONTENT,
                        LayoutParams.WRAP_CONTENT));
        rlpAchived.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
        rlpAchived.addRule(RelativeLayout.ALIGN_RIGHT, txtItemName.getId());
        txtAchived.setLayoutParams(rlpAchived);

        TextView txtDescription = new TextView(Parent);
        txtDescription.setText(ACHIEVEMENTS_DESCRIPTION[i]);
        txtDescription.setHorizontallyScrolling(false);
        RelativeLayout.LayoutParams rlpDesc = new RelativeLayout.LayoutParams(
                new LayoutParams(LayoutParams.WRAP_CONTENT,
                        LayoutParams.WRAP_CONTENT));
        rlpDesc.addRule(RelativeLayout.ALIGN_BOTTOM, txtItemName.getId());
        rlpDesc.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
        txtDescription.setLayoutParams(rlpDesc);

        pnlItem.addView(txtItemName);
        pnlItem.addView(txtAchived);
        pnlItem.addView(txtDescription);
        pnlAchievement.addView(pnlItem);

It work well list all the achievements, but the description is NOT below the Name, it is OVER the Name, like this:

enter image description here

And, can you please tell me how to add the line between every item without using Canvas (this is not very important, but if there is, it’s better)?

  • 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-22T16:47:28+00:00Added an answer on May 22, 2026 at 4:47 pm

    You need to use RelativeLayout.BELOW

    For the line you can use a Label with a backgroundcolor.

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

Sidebar

Related Questions

I have class Achievement(MyBaseModel): pass class Alias(MyBaseModel): achievements = models.ManyToManyField('Achievement') >>> ach = Achievement.objects.all()[1]
I have the following rss feed which I would like to query to get
So I have several DIVs called achievement, and each one contains a span called
So I have 3 tables: users achievements achievements_unlocked (many-to-many) I would like a query
Building off this question, How to implement an achievement system in RoR would I
Have you guys had any experiences (positive or negative) by placing your source code/solution
Have you managed to get Aptana Studio debugging to work? I tried following this,
I have extended my class with a dialog in which I have set content
I have been browsing this site for the answer but I'm still a little
i'd like to implement an achievement system to my random number guessing game but

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.