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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:09:30+00:00 2026-06-14T03:09:30+00:00

So I want to create this UI below. It is for a College class

  • 0

Mockup
So I want to create this UI below. It is for a College class and I don’t have much time left. I have everything working but I can’t wrap my head around making the list of events. I have a java class eventList that populates a List with data from a database. Any suggestions? Will I have to just dynamically add 2 buttons (up/down) and enough text views to supply the data? How will I keep it formatted if I do something like that? Should I put it all in a scrollview on the mainPage?

  • 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-14T03:09:32+00:00Added an answer on June 14, 2026 at 3:09 am

    Make it a ListView with a custom adapter. Each row can be be designed as a RelativeLayout, so you can put your event name, location and such in there.

    The adapter will look something like this: (code sanitized)

    public class POPublicationAdapter extends ArrayAdapter<Wrap<POUserPublication>> {
        private final Context context;
        ... 
        private OnClickListener faveClick;
        private OnClickListener shortClick;
        ...
    
        public POPublicationAdapter( Context context, List<WrapPO<POUserPublication>> values, 
                OnClickListener faveClick, OnClickListener shortClick, ... ) {
            super(context, R.layout.row_publication, values);
            this.context = context;
            this.listId = listId;
            this.faveClick = faveClick;
            this.shortClick = shortClick;
                ...
        }
    
        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
            WrapPO<POUserPublication> item = getItem(position);
            LayoutInflater inflater = (LayoutInflater) context
                    .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            View rowView = null;
    
            if( item.item != null ){
                rowView = inflater.inflate(R.layout.row_publication, parent, false);
                rowView.setTag( item );
                TextView tvLabel = (TextView) rowView.findViewById(R.id....);
                ImageView ivPubFavorite = (ImageView) rowView.findViewById(R.id....);
    
                TextView tvSubLabel = (TextView) rowView.findViewById(R.id.publicationSublabel);
                tvLabel.setText( item.item.pub().get( PO.displayName ) );
                if( !item.item.pub().existsDefault() ) {
    
                }
                if( listId == POLayer.LIST_REQUIRED ) 
                    tvSubLabel.setText(String.format("(Due on %1$TD)", item.item.asDate( PO.dueDate )));
                else if( listId == POLayer.LIST_PREVIEW )
                    tvSubLabel.setText( String.format( "(Preview until %1$TD)", item.item.pub().asDate( PO.distributionDate ) ) );
                else
                    tvSubLabel.setText( item.item.getTouchInfo() );
    
                if( this.listId == POLayer.LIST_FAVE ){
                    setOfflineImage(ivPubFavorite, SG.isOnline, item.item.isFavorite() ? R.drawable.ls_star_remove : R.drawable.ls_star_grey );
                } else {
                    setOfflineImage(ivPubFavorite, SG.isOnline, item.item.isFavorite() ? R.drawable.ls_star_gold : R.drawable.ls_star_grey );
                }
                ivPubFavorite.setClickable(true);
                ivPubFavorite.setTag(item);
                ivPubFavorite.setOnClickListener( faveClick );
    
                ivNot.setClickable( false );
                if( listId == POLayer.LIST_REQUIRED || listId == POLayer.LIST_UNREAD ) {
                    ivNot.setTag(item);
                    ivNot.setOnClickListener( notClick );
                    if( item.item.isRequired() ) {
                        if( item.item.isComplete() ) {
                            setOfflineImage( ivNot, item.item.asString( PO.offlineUTC ).isEmpty(), R.drawable.ls_doc_confirmed );
                        } else {
                            ivNot.setClickable(true);
                            ivNot.setImageResource( R.drawable.ls_doc_pencil );
                        }
                    } else {
                        if( item.item.isComplete() ) {
                            ivNot.setImageResource(R.drawable.ls_check_green);
                        } else {
                            ivNot.setClickable(true);
                            setOfflineImage( ivNot, SG.isOnline, R.drawable.ls_check_grey );
                        }
                    }   
                } else {
                    ivNot.setVisibility( View.GONE );
                }
            } else {
                switch( item.itemType ) {
                case WrapPO.HEADER_EMPTY:
                    rowView = inflater.inflate( R.layout.row_header_empty, parent, false);
                    break;
                case WrapPO.HEADER_MORE:
                    rowView = inflater.inflate( R.layout.row_header_more, parent, false);
                    break;
                default:
                    rowView = inflater.inflate( R.layout.row_header, parent, false);
                }
                TextView tvLabel = (TextView) rowView.findViewById(R.id.tvHeader);
                tvLabel.setText( item.itemHeader );
            }
            rowView.setOnLongClickListener( longClick );
            rowView.setOnClickListener( shortClick );
            return rowView;
        }
        @Override
        public long getItemId(int position) {
            if( getItem( position ).item != null )
                return getItem(position).item.asInteger( PO.pubId );
            else
                return (long) -1;
        }
    }
    

    It’s probably a bit more complex example of what you need, but it shows how you can use different layouts for a row based on the contents of the row, and it has clickable ImageViews in it, just like you’d need for your voting buttons.

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

Sidebar

Related Questions

I want to create this parameter file so that I can send it to
I have a JasperReport and I want to create for this report a cover
I want to extend RuntimeException to create this specific exception: class CompileLinkException extends RuntimeException
i have String Like As below : alert(tempstr);//&lt;b&gt; Testing &lt;/b&gt; now I want create
I want to create group query where Table values are like this below: EMP_ID
I want to create the functionality from below image In this image there are
I create a popup based on this post but i want to create it
I have a table that was created using this mysql statement below. CREATE TABLE
I want to Create a new User using Custom Membership Provider but I don't
I want to create an android activity that looks like the one below this.

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.