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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:23:10+00:00 2026-05-24T06:23:10+00:00

I want to develop a custom calendar day view for android OS 1.5 and

  • 0

I want to develop a custom calendar day view for android OS 1.5 and later on.

Similar to android day calendar and event add & display in day view.

If you have example or source of it then please give me.

I have no idea how to start. Please guide me.

I have done month view as per below link:

http://w2davids.wordpress.com/android-simple-calendar/

but I have to also create day view so please help me.

I want to display this:

enter image description here

  • 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-24T06:23:11+00:00Added an answer on May 24, 2026 at 6:23 am

    I just worked on this:

    Preview

    You could consider it a blueprint to start.

    /**
     * @author Sherif
     * 
     * Copyright 2011
     *
     * Sample Day Viewer that will show entries of each hour with ability to 
     * add events and stuff
     * You should find a way to keep a container that will keep track of added events
     *
     */
    public class DayViewActivity extends ListActivity {
    /** Called when the activity is first created. */
    private static int HOURS_PER_DAY = 24;
    
    Context mContext = this;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //getListView().setBackgroundColor(Color.rgb(12, 12, 12));
        getListView().setDividerHeight(0);
        setListAdapter(new ListAdapter(){
    
            @Override
            public boolean areAllItemsEnabled() {
                // TODO Auto-generated method stub
                return false;
            }
    
            @Override
            public boolean isEnabled(int arg0) {
                // TODO Auto-generated method stub
                return false;
            }
    
            @Override
            public int getCount() {
                // TODO Auto-generated method stub
                return HOURS_PER_DAY;
            }
    
            @Override
            public Object getItem(int arg0) {
                // TODO Auto-generated method stub
                return null;
            }
    
            @Override
            public long getItemId(int arg0) {
                // TODO Auto-generated method stub
                return 0;
            }
    
            @Override
            public int getItemViewType(int arg0) {
                // TODO Auto-generated method stub
                return 0;
            }
    
            @Override
            public View getView(int position, View arg1, ViewGroup arg2) {
                // TODO Auto-generated method stub
                LayoutInflater inflater = getLayoutInflater();
                View listItem = (View) inflater.inflate(R.layout.list_item, getListView(),false);
                TextView hourTV = (TextView) listItem.findViewById(R.id.hourTV);
                TextView amTV = (TextView) listItem.findViewById(R.id.amTV);
                hourTV.setTextColor(Color.BLUE);
                amTV.setTextColor(Color.BLUE);
                final LinearLayout eventsLL = (LinearLayout) listItem.findViewById(R.id.eventsLL);
                hourTV.setText(String.valueOf((position+9)%24));
                //I set am/pm for each entry ... you could specify which entries
                if(((position>=0)&&(position<=2))||((position>=15)&&(position<=23)))
                    amTV.setText("am");
                else
                    amTV.setText("pm");
                eventsLL.setOnClickListener(new OnClickListener(){
    
                    @Override
                    public void onClick(View arg0) {
                        // TODO Auto-generated method stub
                        AlertDialog.Builder alert = new AlertDialog.Builder(mContext); 
    
                        alert.setTitle("New Event"); 
                        alert.setMessage("Event:"); 
    
                        // Set an EditText view to get user input 
                        final EditText input = new EditText(mContext); 
                        alert.setView(input); 
    
                        alert.setPositiveButton("Add", new DialogInterface.OnClickListener() { 
                            public void onClick(DialogInterface dialog, int whichButton) { 
                                TextView A = new TextView(mContext);
                                A.setText(input.getText());
                                A.setTextColor(Color.BLACK);
                                eventsLL.addView(A);
                            } 
                        }); 
    
                        alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { 
                            public void onClick(DialogInterface dialog, int whichButton) {
                            } 
                        }); 
                        alert.show();
                    }
    
                });
                return listItem;
            }
    
            @Override
            public int getViewTypeCount() {
                // TODO Auto-generated method stub
                return 1;
            }
    
            @Override
            public boolean hasStableIds() {
                // TODO Auto-generated method stub
                return false;
            }
    
            @Override
            public boolean isEmpty() {
                // TODO Auto-generated method stub
                return false;
            }
    
            @Override
            public void registerDataSetObserver(DataSetObserver arg0) {
                // TODO Auto-generated method stub
    
            }
    
            @Override
            public void unregisterDataSetObserver(DataSetObserver arg0) {
                // TODO Auto-generated method stub
    
            }
    
        });
    }
    

    /drawable/eventbg.xml

    <?xml version="1.0" encoding="utf-8"?>
    <shape xmlns:android="http://schemas.android.com/apk/res/android">
        <solid android:color="#FFFFFF"/>
        <corners android:radius="5px"/>
        <padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp" /> 
    </shape>
    

    /layout/list_item.xml

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="horizontal"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:paddingTop="5dip"
      android:paddingBottom="5dip"
      android:background="#CCC">
        <LinearLayout 
            android:id="@+id/linearLayout1" 
            android:layout_height="fill_parent" 
            android:layout_width="wrap_content" 
            android:orientation="vertical">
            <TextView 
                android:id="@+id/hourTV" 
                android:text="" 
                android:textAppearance="?android:attr/textAppearanceSmall" 
                android:layout_height="wrap_content" 
                android:layout_width="wrap_content"/>
            <TextView 
                android:id="@+id/amTV" 
                android:text="" 
                android:textAppearance="?android:attr/textAppearanceSmall" 
                android:layout_height="wrap_content" 
                android:layout_width="wrap_content"/>
        </LinearLayout>
        <LinearLayout 
            android:id="@+id/LLdesign" 
            android:orientation="horizontal"
            android:layout_height="fill_parent" 
            android:layout_width="fill_parent"
            android:padding="3dip">
            <LinearLayout 
                android:id="@+id/eventsLL"
                android:orientation="vertical"
                android:layout_height="fill_parent" 
                android:layout_width="fill_parent"
                android:background="@drawable/eventbg"></LinearLayout>
            </LinearLayout>
    
    </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a special question i really want to learn how to develop custom
I have a winforms project that I want to develop a custom control for.
I want to develop an application with a custom camera with one button over
I want to develop an application for the iPhone that generates custom DTMF tones.
I want to develop an application for the iPhone that creates a custom memory
I want to develop an Android app that will fetch geo-tagged tweets from Twitter
I want to develop the following application: on top I have a navigation bar,
I am trying to develop a custom table through coding in Android. I am
I want a table of state-names for debug/trace messages as I develop my custom
I develop a custom control that have some field like below: ControlKind, Field1 ,

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.