-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from mazurio/new-drawer-and-calendar-week-view
* 1.1.0
- Loading branch information
Showing
223 changed files
with
7,746 additions
and
1,764 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...src/main/java/io/mazur/fit/Constants.java → ...ava/com/bodyweight/fitness/Constants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
app/src/main/java/com/bodyweight/fitness/adapter/CalendarAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package com.bodyweight.fitness.adapter; | ||
|
||
import android.support.v4.view.PagerAdapter; | ||
|
||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
import com.bodyweight.fitness.view.CalendarItemView; | ||
import com.bodyweight.fitness.view.widget.ViewPager; | ||
|
||
import com.bodyweight.fitness.R; | ||
|
||
public class CalendarAdapter extends PagerAdapter { | ||
public static final int DEFAULT_POSITION = 60; | ||
|
||
@Override | ||
public Object instantiateItem(ViewGroup viewGroup, int position) { | ||
final ViewPager viewPager = (ViewPager) viewGroup; | ||
|
||
CalendarItemView calendarItemView = (CalendarItemView) LayoutInflater | ||
.from(viewGroup.getContext()) | ||
.inflate(R.layout.view_calendar_item, viewGroup, false); | ||
|
||
calendarItemView.onCreate(position); | ||
calendarItemView.onCreateView(); | ||
|
||
viewPager.addView(calendarItemView); | ||
|
||
return calendarItemView; | ||
} | ||
|
||
/** | ||
* Remove subscriptions made by item views to the day/page selected observables. | ||
*/ | ||
@Override | ||
public void destroyItem(ViewGroup container, int position, Object object) { | ||
CalendarItemView calendarItemView = (CalendarItemView) object; | ||
|
||
calendarItemView.onDestroyView(); | ||
|
||
ViewPager viewPager = (ViewPager) container; | ||
viewPager.removeView(calendarItemView); | ||
} | ||
|
||
@Override | ||
public boolean isViewFromObject(View view, Object object) { | ||
return view == object; | ||
} | ||
|
||
@Override | ||
public int getCount() { | ||
return 61; | ||
} | ||
} |
Oops, something went wrong.