Comments (9)
Yes in that class write this line
addView(weekPager);
before this
addView(daysName, 0);
from weekcalendar.
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.
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.
hmm... I'm curious why not? Looks like there are some private methods and variables involved :(
from weekcalendar.
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.
Yes the variables are private, try it if it works then post it here.
from weekcalendar.
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.
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.
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)
- Bug , while putting weekcalendar into viewpager HOT 2
- Caused by: java.lang.ClassCastException: com.zing.chat.activity.MainActivity cannot be cast to android.support.v7.app.AppCompatActivity HOT 1
- Enable scroll only for current month.
- min Date and Max Date HOT 1
- text days uppercase
- About week count of year
- Show month name
- Proguard Rules for this library HOT 2
- how can setNextweek and setPervious on button ckick HOT 1
- Dates Selected
- How can i use in Xamarin.Android?
- after proguard why click event not work
- Unable to inflate it HOT 2
- It's possible to select month also like days
- not auto scroll on programmatically selected date HOT 1
- Selected Background
- Calendar Not Display in View pager with Fragment HOT 1
- add day from sunday HOT 1
- Not a best library to add in Fragment or ViewPager
- app:todaysDateTextColor not found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from weekcalendar.