Android-Week-View icon indicating copy to clipboard operation
Android-Week-View copied to clipboard

How to customize default layout

Open anobilisgorse opened this issue 11 years ago • 10 comments

Upon encountering your library, I was glad that there exists one that matches with my concept design for a scheduler.

class schedule

Sadly, due to my aesthetics, I can't seem to tolerate the little difference it makes with my concept design. As you can see from the image above, my concept is much more similar to the native DayView Calendar app of Android: screenshot_2015-07-15-12-28-30

So I was wondering if there's a workaround to tweak or customize your default layout regarding the alignment, positioning, and customization of the time at the left side(with respect to my concept design above), and also that little padding/margin(?) between the calendar itself and the header (as seen here): screenshot_2015-07-15-14-45-47

That is all, hoping you would reply ASAP.

anobilisgorse avatar Jul 15 '15 06:07 anobilisgorse

I'd suggest that you take a look at the different (color) attributes you can tweak on the library.

entropitor avatar Jul 15 '15 12:07 entropitor

@caske33 I'm sorry but it's not the color that I would like to tweak, instead, the one encircled in the image, that little "offset" from the header is what I would like to remove.

anobilisgorse avatar Jul 15 '15 14:07 anobilisgorse

I'm not 100% sure if there's an attribute for that yet. Have you tried all the dimensions attributes too?

entropitor avatar Jul 15 '15 14:07 entropitor

Yes I have. I was speculating it has something to do with "headerColumnPadding" or anything that has a padding with it but there's no bulge in the layout.

Is there no other way to tweak the Java source codes directly?

anobilisgorse avatar Jul 15 '15 14:07 anobilisgorse

You could import this project as a git and gradle submodule and then you could edit the source code directly. Or you can make a pull request with a new attribute.

entropitor avatar Jul 15 '15 14:07 entropitor

I see. But once I'm done editing the source code, how should I import/integrate the now edited library to my project? Cause I just used a gradle dependency for using this third library.

anobilisgorse avatar Jul 15 '15 14:07 anobilisgorse

compile project(':weekview:library') (if weekview is in your root library. Next to the "app" module).

entropitor avatar Jul 15 '15 14:07 entropitor

Thanks. I think I'll try my own luck in tweaking the source code.

anobilisgorse avatar Jul 15 '15 14:07 anobilisgorse

It is possible to remove that, I made it in the app of my employer (Shore.com, however you cannot access to the result without an paid account).

I do not know if it's the final solution (if not, I'm not authorised to open source the version we use anyway), but I wrote some code to do that: lolobosse/Android-Week-View@70b010b (that's only the link to the last commit, you have to look the entire branch to have an idea of how to proceed)

lolobosse avatar Jul 28 '15 23:07 lolobosse

I believe this is one of the biggest issues regarding the interface at the moment. Does anyone have any ideas if this can be solved easily?

Is it possible to reach the mHeaderMarginBottom as an attribute? That might be a potential solution.

obaslan avatar Dec 18 '15 08:12 obaslan