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

Show only the days of the week (Sunday to Saturday)

Open anobilisgorse opened this issue 11 years ago • 16 comments

Is there other way to show only ONE WEEK, featuring the days (Sunday - Monday - Tuesday - Wednesday - Thursday - Friday - Saturday), as the header columns, and no specified dates?

anobilisgorse avatar Jul 15 '15 14:07 anobilisgorse

Duplicate of #6

entropitor avatar Jul 15 '15 14:07 entropitor

Actually I've encountered this awhile ago @caske33, but how do I replace it with the default Android-Week-View library?

And also will it also cause some conflicts and exceptions with the current version of Android-Week-Library? I tried contacting the author of the repository but he seems inactive already.

anobilisgorse avatar Jul 15 '15 14:07 anobilisgorse

There is currently no support for this in this library.

entropitor avatar Jul 15 '15 14:07 entropitor

I see. That's sad.

anobilisgorse avatar Jul 15 '15 14:07 anobilisgorse

maybe there's a possibility, haven't tested but it may work.

by setting xScrollingSpeed to 0 and noOfVisibleDays to 7 you should get a view that shows 7 days and cant scroll any more.

for the names of days you can use your own DateTimeInterpreter using EEEE or EEE only in interpretDate

@Override
public String interpretDate(Calendar date) {
    return new SimpleDateFormat("EEEE").format(date.getTime());
}

the only thing left to do is to use goToDate an select the right date

marunjar avatar Jul 15 '15 16:07 marunjar

does setting xScrollingSpeed to 0 work, @marunjar ?

entropitor avatar Jul 15 '15 16:07 entropitor

Where and how do I set the xScrollingSpeed @marunjar?

anobilisgorse avatar Jul 15 '15 16:07 anobilisgorse

it's an attribute on the weekView.

entropitor avatar Jul 15 '15 16:07 entropitor

I see, I'll try this @caske33.

Regarding the goToDate @marunjar, what do you mean by "select the right date"? Date refers to the numbers right, so I am confused as to why I need to set this, cause I only need the DAYS (Sunday to Saturday). Please elaborate it further.

anobilisgorse avatar Jul 15 '15 16:07 anobilisgorse

as you'll need to provide a day and time in your events, you should instruct the weekview to go to the right day, otherwise the events won't be visible.

entropitor avatar Jul 15 '15 17:07 entropitor

I'm sorry @marunjar and @caske33, I tried it but I think you misunderstood something.

I like it to be a one Day View as shown here class schedule

So if I set it to xScrollingSpeed to 0 and noOfVisibleDays to 7, it would show a seven Day View, but non scrollable.

What I am aiming is a scrollable one Day View, but stops before Sunday and after Saturday.

anobilisgorse avatar Jul 19 '15 14:07 anobilisgorse

That's currently not possible.

entropitor avatar Jul 19 '15 15:07 entropitor

It is but you have to mod the lib itself...

I assume that you can check the current day in the touchListener so you can basically cancel all effect of this listener in a given direction for a given day. Did I miss something @caske33 (yes, I'm back in the business, exams are over!)?

lolobosse avatar Jul 28 '15 22:07 lolobosse

Duplicate of #6

alamkanak avatar Jul 29 '15 00:07 alamkanak

Not sure @lolobosse. I think that could do it, but there is also the swing which might make it go over the edge, I think.

entropitor avatar Aug 05 '15 12:08 entropitor

Hi, This has already been implemented?

YeisonGomez avatar Jan 16 '17 16:01 YeisonGomez