Giter VIP home page Giter VIP logo

Comments (7)

rgk1221 avatar rgk1221 commented on August 23, 2024 1

`public class DateCellView extends BaseCellView {

TextView id_cell_text;

public DateCellView(Context context) {
    super(context);
}

public DateCellView(Context context, AttributeSet attrs) {
    super(context, attrs);
}

@Override
public void setDisplayText(DayData day) {

    id_cell_text=  (TextView) this.findViewById(R.id.id_cell_text);
    id_cell_text.setText(day.getText());
}

}`

See. I have created the class same as you have created.
---> " use the class created in step one as the root node of it." WHAT YOU MEAN BY THIS. I CAN'T UNDERSTAND. i am an amateaur. please help me out with this.

from mcalendarview.

SpongeBobSun avatar SpongeBobSun commented on August 23, 2024

First create your own view class which extends BaseCellView, implement required functions.

Then create a layout xml, use the class created in step one as the root node of it.

from mcalendarview.

rgk1221 avatar rgk1221 commented on August 23, 2024

calendarView.setDateCell(R.layout.layout_date_cell)
I have also done this as you have done in your code

from mcalendarview.

SpongeBobSun avatar SpongeBobSun commented on August 23, 2024

<your.package.DateCellView
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="#00ADA3">

</your.package.DateCellView>

Also, don't shout.

from mcalendarview.

rgk1221 avatar rgk1221 commented on August 23, 2024

Hehe. thankyou soo much for your help.

from mcalendarview.

rgk1221 avatar rgk1221 commented on August 23, 2024

Please i need one more help. when i implemented the datecellview as we discussed, all its styling and sizes changed. Now before implementing this thing the calendar was looking pretty attractive but now because i implemented the view all its styling is gone. i just wanted to change the text color of the dates. I was successful in changing the textcolor but then now its looking very ugly. So is there any way i could change only the textcolor of the dates and have the previous calendar with only its textcolor changed????

from mcalendarview.

SpongeBobSun avatar SpongeBobSun commented on August 23, 2024

You should copy or modify my code.

See -
https://github.com/SpongeBobSun/mCalendarView/blob/master/mcalendarview/src/main/java/sun/bob/mcalendarview/views/DefaultCellView.java

for example.

Or, you should "styling" your own date cell xml.

from mcalendarview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.