Code Monkey home page Code Monkey logo

Comments (9)

nomanr avatar nomanr commented on July 23, 2024

Yes in that class write this line

addView(weekPager);

before this

addView(daysName, 0);

from weekcalendar.

jay-parapps avatar jay-parapps commented on July 23, 2024

Thank you for the quick response

Would I have to download the source code you think?

Or can I pull it off by using the graddle just extending+overriding stuff and using the extended classes instead?

from weekcalendar.

nomanr avatar nomanr commented on July 23, 2024

Gradle dependency won't work, you've to download the source code and import
the project as a module. Then it'll work.

Regards
Noman Rafique

On Wed, Feb 3, 2016 at 11:27 PM, jay-parapps [email protected]
wrote:

Thank you for the quick response

Would I have to download the source code you think?

Or can I pull it off by using the graddle just extending the classes and
using the extended classes instead?


Reply to this email directly or view it on GitHub
#11 (comment).

from weekcalendar.

jay-parapps avatar jay-parapps commented on July 23, 2024

hmm... I'm curious why not? Looks like there are some private methods and variables involved :(

from weekcalendar.

jay-parapps avatar jay-parapps commented on July 23, 2024

Since some stuff is private, I tried just reverting the views on extended class constructor, but the day names never show up.

View view = getChildAt(0);
removeView(view);
addView(view);

maybe just reverting the other the are added will not work either?

from weekcalendar.

nomanr avatar nomanr commented on July 23, 2024

Yes the variables are private, try it if it works then post it here.

from weekcalendar.

jay-parapps avatar jay-parapps commented on July 23, 2024

Just tried creating a new project on android studio by doing File > Import from rep > Github and passing it the repo url:
https://github.com/nomanr/WeekCalendar.git

Got a bunch of errors and an invalid Android project.

Will try some other way

from weekcalendar.

jay-parapps avatar jay-parapps commented on July 23, 2024

Downloading the project do disk first and opening works, but then I get the same results that I got thru my hack: numbers are in the top row but the week names do not show up.

What I did was reverse the order of the lines, as you told me to:

`WeekPager weekPager = new WeekPager(getContext(), attrs);
addView(weekPager);

    if (!typedArray.getBoolean(R.styleable.WeekCalendar_hideNames, false)) {
        daysName = getDaysNames();
        addView(daysName);
    }`

from weekcalendar.

jay-parapps avatar jay-parapps commented on July 23, 2024

So appearently the internal ViewPager is doing some kind of blackmagic which completely prevents subsequent views to be shown, even putting the viewpager alone inside it's own parent container did not help.

The only way I was able to pull it off is to make getDaysNames() public so it could be used from the activity, and then I add the subcomponent that I get from this method as a separate view outside of the calendar widget itself. A total hack, I know, but works for the meantime.

GridView daysView = weekCalendar.getDaysNames(); LinearLayout container = (LinearLayout) findViewById(R.id.calendar_container); container.addView(daysView);

from weekcalendar.

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.