4 messages in com.googlegroups.android-developersDevelopment of own custom component
FromSent OnAttachments
Artem05 Dec 2007 02:03 
Dan05 Dec 2007 02:27 
Artem09 Dec 2007 10:45 
Wei Yih12 Dec 2007 08:43 
Subject:Development of own custom component
From:Artem (a.sa@googlemail.com)
Date:12/05/2007 02:03:20 AM
List:com.googlegroups.android-developers

Hello everybody,

i have tried to develop my own View component, but faced with difficulties, because i don't know what to do further.

Maybe somebody asked such question then just give me a link to answer.

I want to develop class similar to DatePicker and investigated Class File Editor of DatePicker for understand the details.

This is example of my undertaking:

public class CustomDatePicker extends FrameLayout {

private android.widget.TableLayout mTable; private android.widget.TextView mMonthLabel;

public CustomDatePicker(Context context) { super(context); mMonthLabel = new TextView(context);

this.mMonthLabel.setText("Super Text");

// TODO Auto-generated constructor stub }

}

Maybe i don't know architecture very well, but it would be really nice if you can help me.

1. How to initialize this component that i could use it in Layout xml description? something like: <CustomDatePicker andorid:... />

2. How to make view of TextView or other native components in my component?

3. As i understood DatePicker use TableLayout to show digits in calendar, how to bind TableLayout and use it in my own component?

So general question: what to do further for use it like native component.

Or maybe is it possible to have source code of SDK components then it would be easily to investigate?

Thanks a lot!

Best regards,