-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
shanhong cheng
committed
Mar 24, 2017
1 parent
cce7f26
commit 0563a43
Showing
9 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
73 changes: 73 additions & 0 deletions
73
app/src/main/java/com/loganfreeman/utahfishing/modules/main/ui/CalendarFragment.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,73 @@ | ||
package com.loganfreeman.utahfishing.modules.main.ui; | ||
|
||
import android.os.Bundle; | ||
import android.support.annotation.NonNull; | ||
import android.support.annotation.Nullable; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
import com.loganfreeman.utahfishing.R; | ||
import com.loganfreeman.utahfishing.base.AbstractBaseFragment; | ||
import com.prolificinteractive.materialcalendarview.CalendarDay; | ||
import com.prolificinteractive.materialcalendarview.MaterialCalendarView; | ||
import com.prolificinteractive.materialcalendarview.OnDateSelectedListener; | ||
import com.prolificinteractive.materialcalendarview.OnMonthChangedListener; | ||
|
||
import butterknife.Bind; | ||
import butterknife.ButterKnife; | ||
|
||
/** | ||
* Created by scheng on 3/23/17. | ||
*/ | ||
|
||
public class CalendarFragment extends AbstractBaseFragment implements OnDateSelectedListener, OnMonthChangedListener { | ||
|
||
@Bind(R.id.calendarView) | ||
MaterialCalendarView widget; | ||
private View view; | ||
|
||
@Override | ||
protected void lazyLoad() { | ||
|
||
} | ||
|
||
@Nullable | ||
@Override | ||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { | ||
if (view == null) { | ||
view = inflater.inflate(R.layout.fragment_fishing_calenar, container, false); | ||
ButterKnife.bind(this, view); | ||
} | ||
return view; | ||
} | ||
|
||
@Override | ||
public void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setHasOptionsMenu(true); | ||
} | ||
|
||
@Override | ||
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { | ||
super.onViewCreated(view, savedInstanceState); | ||
safeSetTitle(getString(R.string.utah_fishing_calendar)); | ||
initView(); | ||
} | ||
|
||
private void initView() { | ||
widget.setOnDateChangedListener(this); | ||
widget.setOnMonthChangedListener(this); | ||
|
||
} | ||
|
||
@Override | ||
public void onDateSelected(@NonNull MaterialCalendarView widget, @NonNull CalendarDay date, boolean selected) { | ||
|
||
} | ||
|
||
@Override | ||
public void onMonthChanged(MaterialCalendarView widget, CalendarDay date) { | ||
|
||
} | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="vertical" android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<com.prolificinteractive.materialcalendarview.MaterialCalendarView | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:id="@+id/calendarView" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:mcv_showOtherDates="all" | ||
app:mcv_selectionColor="#00F" | ||
/> | ||
|
||
</LinearLayout> |
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