diff --git a/src/showme/.idea/.gitignore b/src/showme/.idea/.gitignore deleted file mode 100644 index 26d3352..0000000 --- a/src/showme/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git a/src/showme/.idea/gradle.xml b/src/showme/.idea/gradle.xml index 8d5774d..1ef127a 100644 --- a/src/showme/.idea/gradle.xml +++ b/src/showme/.idea/gradle.xml @@ -1,24 +1,20 @@ - diff --git a/src/showme/.idea/jarRepositories.xml b/src/showme/.idea/jarRepositories.xml index 1e6c41e..0380d8d 100644 --- a/src/showme/.idea/jarRepositories.xml +++ b/src/showme/.idea/jarRepositories.xml @@ -11,6 +11,11 @@ \ No newline at end of file diff --git a/src/showme/.project b/src/showme/.project new file mode 100644 index 0000000..b1cfa74 --- /dev/null +++ b/src/showme/.project @@ -0,0 +1,28 @@ + + + showme + Project showme created by Buildship. + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.buildship.core.gradleprojectnature + + + + 1625906374722 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/src/showme/.settings/org.eclipse.buildship.core.prefs b/src/showme/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..be09b6f --- /dev/null +++ b/src/showme/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,13 @@ +arguments= +auto.sync=false +build.scans.enabled=false +connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) +connection.project.dir= +eclipse.preferences.version=1 +gradle.user.home= +java.home=C\:/Software/StayHungry/JDK15 +jvm.arguments= +offline.mode=false +override.workspace.settings=true +show.console.view=true +show.executions.view=true diff --git a/src/showme/CalendarView/.classpath b/src/showme/CalendarView/.classpath new file mode 100644 index 0000000..d0113bb --- /dev/null +++ b/src/showme/CalendarView/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/showme/CalendarView/.project b/src/showme/CalendarView/.project new file mode 100644 index 0000000..342a07c --- /dev/null +++ b/src/showme/CalendarView/.project @@ -0,0 +1,34 @@ + + + CalendarView + Project CalendarView created by Buildship. + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.buildship.core.gradleprojectnature + + + + 1625906374711 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/src/showme/CalendarView/.settings/org.eclipse.buildship.core.prefs b/src/showme/CalendarView/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..b1886ad --- /dev/null +++ b/src/showme/CalendarView/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +connection.project.dir=.. +eclipse.preferences.version=1 diff --git a/src/showme/CalendarView/build.gradle b/src/showme/CalendarView/build.gradle index 62276fd..7722567 100644 --- a/src/showme/CalendarView/build.gradle +++ b/src/showme/CalendarView/build.gradle @@ -1,14 +1,13 @@ - plugins { id 'com.android.library' } android { compileSdkVersion 30 - buildToolsVersion "30.0.2" + buildToolsVersion "30.0.3" defaultConfig { - minSdkVersion 16 + minSdkVersion 17 targetSdkVersion 30 versionCode 1 versionName "1.0" @@ -31,10 +30,10 @@ android { dependencies { - implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'com.google.android.material:material:1.2.1' + implementation 'androidx.appcompat:appcompat:1.3.0' + implementation 'com.google.android.material:material:1.4.0' implementation project(path: ':Database') testImplementation 'junit:junit:4.+' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' -} + androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' +} \ No newline at end of file diff --git a/src/showme/CalendarView/src/androidTest/java/com/diary/calendarview/ExampleInstrumentedTest.java b/src/showme/CalendarView/src/androidTest/java/com/diary/calendarview/ExampleInstrumentedTest.java deleted file mode 100644 index b6a7847..0000000 --- a/src/showme/CalendarView/src/androidTest/java/com/diary/calendarview/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.diary.calendarview; - -import android.content.Context; - -import androidx.test.platform.app.InstrumentationRegistry; -import androidx.test.ext.junit.runners.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import static org.junit.Assert.*; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - @Test - public void useAppContext() { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); - assertEquals("com.diary.calendarview.test", appContext.getPackageName()); - } -} \ No newline at end of file diff --git a/src/showme/CalendarView/src/main/java/com/idealist/calendarview/RecyclerViewAdapter.java b/src/showme/CalendarView/src/main/java/com/idealist/calendarview/RecyclerViewAdapter.java deleted file mode 100644 index ad12a9a..0000000 --- a/src/showme/CalendarView/src/main/java/com/idealist/calendarview/RecyclerViewAdapter.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.idealist.calendarview; - -import android.view.View; -import android.view.ViewGroup; - -import androidx.annotation.NonNull; -import androidx.recyclerview.widget.RecyclerView; - -import com.diary.database.utils.ScheduleSQLUtils; - -import java.util.ArrayList; -import java.util.List; - -public class RecyclerViewAdapter extends RecyclerView.Adapter implements - View.OnClickListener{ - private List mDatabase; - - private OnItemClickListener onItemClickListener = null; - - public RecyclerViewAdapter(List mDatabase) { - super(); - this.mDatabase = mDatabase; - } - - @NonNull - @Override - public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { - View view = View.inflate(parent.getContext(), R.layout.schedule_item, null); - view.setOnClickListener(this); - return new RecyclerViewHolder(view); - } - - @Override - public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { - if (!(holder instanceof RecyclerViewHolder)) - return; - holder.itemView.setTag(position); - String text = mDatabase.get(position); - ((RecyclerViewHolder) holder).timeTextView.setText(ScheduleSQLUtils.extractScheduleTime(text)); - ((RecyclerViewHolder) holder).titleTextView.setText(ScheduleSQLUtils.extractScheduleName(text)); - } - - @Override - public int getItemCount() { - return mDatabase.size(); - } - - @Override - public void onClick(View v) { - if (onItemClickListener != null) { - onItemClickListener.onItemClick(v, (int) v.getTag()); - } - } - - public void setmDatabase(List mDatabase) { - this.mDatabase = mDatabase; - } - - public void setOnItemClickListener(OnItemClickListener onItemClickListener) { - this.onItemClickListener = onItemClickListener; - } - - public interface OnItemClickListener { - void onItemClick(View view, int position); - } -} diff --git a/src/showme/CalendarView/src/main/java/com/idealist/calendarview/RecyclerViewBehavior.java b/src/showme/CalendarView/src/main/java/com/idealist/calendarview/RecyclerViewBehavior.java deleted file mode 100644 index 33349a2..0000000 --- a/src/showme/CalendarView/src/main/java/com/idealist/calendarview/RecyclerViewBehavior.java +++ /dev/null @@ -1,141 +0,0 @@ -package com.idealist.calendarview; - -import android.content.Context; -import android.util.AttributeSet; -import android.util.Log; -import android.view.View; -import android.widget.Toast; - -import androidx.annotation.NonNull; -import androidx.coordinatorlayout.widget.CoordinatorLayout; -import androidx.core.view.ViewCompat; -import androidx.recyclerview.widget.RecyclerView; -import androidx.viewpager.widget.ViewPager; - -import static android.content.ContentValues.TAG; - -public class RecyclerViewBehavior extends CoordinatorLayout.Behavior { - - private int initOffset = -1; - private int minOffset = -1; - private int bottomOffset = -1; - private Context context; - private boolean initiated = false; - boolean hidingTop = false; - boolean showingTop = false; - - public RecyclerViewBehavior(Context context, AttributeSet attrs) { - super(context, attrs); - this.context = context; - } - - @Override - public boolean onLayoutChild(@NonNull CoordinatorLayout parent, @NonNull RecyclerView child, int layoutDirection) { - parent.onLayoutChild(child, layoutDirection); - CalendarPager calendarPager = getCalendarPager(parent); - initMinOffsetAndInitOffset(parent, child, calendarPager); - return true; - } - - private void initMinOffsetAndInitOffset(CoordinatorLayout parent, RecyclerView child, CalendarPager pager) { - if (pager.getBottom() > 0 && initOffset == -1) { - initOffset = pager.getMeasuredHeight(); - CalendarAttr.setRecTop(initOffset); - } - if (pager.getBottom() > 0 && bottomOffset == -1) { - bottomOffset = State.DEFAULT_ITEM_HEIGHT_FULL * 6; - } - if (!initiated) { - initOffset = pager.getMeasuredHeight(); - CalendarAttr.setRecTop(initOffset); - initiated = true; - } - child.offsetTopAndBottom(CalendarAttr.getRecTop()); - minOffset = getCalendarPager(parent).getItemHeight(); - } - - @Override - public boolean onStartNestedScroll(@NonNull CoordinatorLayout coordinatorLayout, @NonNull RecyclerView child, @NonNull View directTargetChild, @NonNull View target, int axes, int type) { - return (axes & ViewCompat.SCROLL_AXIS_VERTICAL) != 0; - } - - @Override - public void onNestedPreScroll(@NonNull CoordinatorLayout coordinatorLayout, @NonNull RecyclerView child, @NonNull View target, int dx, int dy, @NonNull int[] consumed, int type) { - super.onNestedPreScroll(coordinatorLayout, child, target, dx, dy, consumed, type); - child.setVerticalScrollBarEnabled(true); - - CalendarPager pager = (CalendarPager) coordinatorLayout.getChildAt(0); - if (pager.getPageScrollState() != ViewPager.SCROLL_STATE_IDLE) { - consumed[1] = dy; - Log.w("ldf", "onNestedPreScroll: MonthPager dragging"); - Toast.makeText(context, "loading month data", Toast.LENGTH_SHORT).show(); - return; - } - - // 上滑,正在隐藏顶部的日历 - hidingTop = dy > 0; - // 下滑,正在展示顶部的日历 - showingTop = dy < 0 && !target.canScrollVertically(-1); - Log.i("recycleBehavior", "hidingTop: " + hidingTop + " showingTop: " + showingTop); - if (hidingTop || showingTop) { - if (pager.getScrollLevel() == State.LEVEL_TOP) { - consumed[1] = CalendarUtils.scroll(child, dy, - State.DEFAULT_ITEM_HEIGHT, - State.DEFAULT_ITEM_HEIGHT * 6 + 10); - } else if (pager.getScrollLevel() == State.LEVEL_MEDIUM) { - consumed[1] = CalendarUtils.scroll(child, dy, - State.DEFAULT_ITEM_HEIGHT, - State.DEFAULT_ITEM_HEIGHT_FULL * 6); - } - CalendarAttr.setRecTop(child.getTop()); - } - } - - @Override - public void onStopNestedScroll(@NonNull CoordinatorLayout coordinatorLayout, @NonNull RecyclerView child, @NonNull View target, int type) { - super.onStopNestedScroll(coordinatorLayout, child, target, type); - CalendarPager pager = (CalendarPager) getCalendarPager(coordinatorLayout); - CalendarViewAdapter adapter = (CalendarViewAdapter) pager.getAdapter(); - - if (pager.getScrollLevel() == State.LEVEL_TOP) { - if (CalendarAttr.getRecTop() - minOffset > CalendarUtils.getTouchSlop(context) && showingTop - && CalendarAttr.getRecTop() < initOffset + 110) { - pager.setScrollLevel(State.LEVEL_MEDIUM); - adapter.changeCalendarType(State.VIEW_MONTH); - CalendarUtils.scrollTo(coordinatorLayout, child, getCalendarPager(coordinatorLayout).getViewHeight(), 500); - CalendarUtils.forceStopRecyclerViewScroll(child); - } else { - CalendarUtils.scrollTo(coordinatorLayout, child, getCalendarPager(coordinatorLayout).getItemHeight(), 150); - } - } else if (pager.getScrollLevel() == State.LEVEL_MEDIUM) { - if (initOffset - CalendarAttr.getRecTop() > CalendarUtils.getTouchSlop(context) && hidingTop) { - pager.setScrollLevel(State.LEVEL_TOP); - adapter.changeCalendarType(State.VIEW_WEEK); - CalendarUtils.scrollTo(coordinatorLayout, child, getCalendarPager(coordinatorLayout).getItemHeight(), 500); - CalendarUtils.forceStopRecyclerViewScroll(child); - } else if (CalendarAttr.getRecTop() - initOffset > CalendarUtils.getTouchSlop(context) && showingTop) { - pager.setScrollLevel(State.LEVEL_BOTTOM); - adapter.changeCalendarType(State.VIEW_FULL); - CalendarUtils.scrollTo(coordinatorLayout, child, getCalendarPager(coordinatorLayout).getViewHeight(), 500); - CalendarUtils.forceStopRecyclerViewScroll(child); - } else { - CalendarUtils.scrollTo(coordinatorLayout, child, getCalendarPager(coordinatorLayout).getViewHeight(), 150); - } - } - } - - @Override - public boolean onNestedFling(@NonNull CoordinatorLayout coordinatorLayout, @NonNull RecyclerView child, @NonNull View target, float velocityX, float velocityY, boolean consumed) { - return super.onNestedFling(coordinatorLayout, child, target, velocityX, velocityY, consumed); - } - - @Override - public boolean onNestedPreFling(@NonNull CoordinatorLayout coordinatorLayout, @NonNull RecyclerView child, @NonNull View target, float velocityX, float velocityY) { - return super.onNestedPreFling(coordinatorLayout, child, target, velocityX, velocityY); - } - - private CalendarPager getCalendarPager(CoordinatorLayout parent) { - return (CalendarPager) parent.getChildAt(0); - } - -} diff --git a/src/showme/CalendarView/src/main/java/com/idealist/calendarview/RecyclerViewHolder.java b/src/showme/CalendarView/src/main/java/com/idealist/calendarview/RecyclerViewHolder.java deleted file mode 100644 index 32578e0..0000000 --- a/src/showme/CalendarView/src/main/java/com/idealist/calendarview/RecyclerViewHolder.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.idealist.calendarview; - -import android.view.View; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.recyclerview.widget.RecyclerView; - -public class RecyclerViewHolder extends RecyclerView.ViewHolder { - public TextView timeTextView; - public TextView titleTextView; - - public RecyclerViewHolder(@NonNull View itemView) { - super(itemView); - timeTextView = itemView.findViewById(R.id.schedule_time); - titleTextView = itemView.findViewById(R.id.schedule_title); - } - - -} diff --git a/src/showme/CalendarView/src/main/java/com/idealist/calendarview/SpaceItemDecoration.java b/src/showme/CalendarView/src/main/java/com/idealist/calendarview/SpaceItemDecoration.java deleted file mode 100644 index 0288465..0000000 --- a/src/showme/CalendarView/src/main/java/com/idealist/calendarview/SpaceItemDecoration.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.idealist.calendarview; - -import android.graphics.Rect; -import android.view.View; - -import androidx.recyclerview.widget.RecyclerView; - -import java.util.HashMap; - -public class SpaceItemDecoration extends RecyclerView.ItemDecoration { - private int mSpace; - - public SpaceItemDecoration(int mSpace) { - this.mSpace = mSpace; - } - - - @Override - public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) { - super.getItemOffsets(outRect, view, parent, state); - outRect.left = mSpace; - outRect.right = mSpace; - outRect.bottom = mSpace; - if (parent.getChildAdapterPosition(view) == 0) { - outRect.top = mSpace; - } - - } -} - diff --git a/src/showme/CalendarView/src/main/res/drawable/schedule_border.xml b/src/showme/CalendarView/src/main/res/drawable/schedule_border.xml deleted file mode 100644 index 4a90bbf..0000000 --- a/src/showme/CalendarView/src/main/res/drawable/schedule_border.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/showme/CalendarView/src/main/res/layout/schedule_item.xml b/src/showme/CalendarView/src/main/res/layout/schedule_item.xml deleted file mode 100644 index 6c22ca7..0000000 --- a/src/showme/CalendarView/src/main/res/layout/schedule_item.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/showme/CalendarView/src/main/res/values/attrs.xml b/src/showme/CalendarView/src/main/res/values/attrs.xml deleted file mode 100644 index 4f19cca..0000000 --- a/src/showme/CalendarView/src/main/res/values/attrs.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/showme/CalendarView/src/main/res/values/styles.xml b/src/showme/CalendarView/src/main/res/values/styles.xml deleted file mode 100644 index e46357e..0000000 --- a/src/showme/CalendarView/src/main/res/values/styles.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/showme/CalendarView/src/test/java/com/diary/calendarview/ExampleUnitTest.java b/src/showme/CalendarView/src/test/java/com/diary/calendarview/ExampleUnitTest.java deleted file mode 100644 index 4ede098..0000000 --- a/src/showme/CalendarView/src/test/java/com/diary/calendarview/ExampleUnitTest.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.diary.calendarview; - -import org.junit.Test; - -import static org.junit.Assert.*; - -/** - * Example local unit test, which will execute on the development machine (host). - * - * @see Testing documentation - */ -public class ExampleUnitTest { - @Test - public void addition_isCorrect() { - assertEquals(4, 2 + 2); - } -} \ No newline at end of file diff --git a/src/showme/Database/.classpath b/src/showme/Database/.classpath new file mode 100644 index 0000000..d0113bb --- /dev/null +++ b/src/showme/Database/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/showme/Database/.project b/src/showme/Database/.project new file mode 100644 index 0000000..26b4bf3 --- /dev/null +++ b/src/showme/Database/.project @@ -0,0 +1,34 @@ + + + Database + Project Database created by Buildship. + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.buildship.core.gradleprojectnature + + + + 1625906374715 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/src/showme/Database/.settings/org.eclipse.buildship.core.prefs b/src/showme/Database/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..b1886ad --- /dev/null +++ b/src/showme/Database/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +connection.project.dir=.. +eclipse.preferences.version=1 diff --git a/src/showme/Database/build.gradle b/src/showme/Database/build.gradle index afa82f5..c6c372e 100644 --- a/src/showme/Database/build.gradle +++ b/src/showme/Database/build.gradle @@ -4,7 +4,7 @@ plugins { android { compileSdkVersion 30 - buildToolsVersion "30.0.2" + buildToolsVersion "30.0.3" defaultConfig { minSdkVersion 17 @@ -30,9 +30,9 @@ android { dependencies { - implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'com.google.android.material:material:1.2.1' + implementation 'androidx.appcompat:appcompat:1.3.0' + implementation 'com.google.android.material:material:1.4.0' testImplementation 'junit:junit:4.+' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' } \ No newline at end of file diff --git a/src/showme/app/.classpath b/src/showme/app/.classpath new file mode 100644 index 0000000..d0113bb --- /dev/null +++ b/src/showme/app/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/showme/app/.project b/src/showme/app/.project new file mode 100644 index 0000000..f70c451 --- /dev/null +++ b/src/showme/app/.project @@ -0,0 +1,34 @@ + + + app + Project app created by Buildship. + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.buildship.core.gradleprojectnature + + + + 1625906374719 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/src/showme/app/.settings/org.eclipse.buildship.core.prefs b/src/showme/app/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..b1886ad --- /dev/null +++ b/src/showme/app/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +connection.project.dir=.. +eclipse.preferences.version=1 diff --git a/src/showme/app/build.gradle b/src/showme/app/build.gradle index 9c36d95..ec16de7 100644 --- a/src/showme/app/build.gradle +++ b/src/showme/app/build.gradle @@ -4,7 +4,7 @@ plugins { android { compileSdkVersion 30 - buildToolsVersion "30.0.2" + buildToolsVersion "30.0.3" defaultConfig { applicationId "com.diary.showme" @@ -30,17 +30,15 @@ android { dependencies { - implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'com.google.android.material:material:1.2.1' + implementation 'androidx.appcompat:appcompat:1.3.0' + implementation 'com.google.android.material:material:1.4.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation 'cc.trity.floatingactionbutton:library:1.0.0' implementation 'org.greenrobot:eventbus:3.0.0' - implementation 'com.chanven.lib:cptr:1.1.0' implementation 'com.jakewharton:butterknife:8.0.1' implementation project(path: ':Database') - annotationProcessor 'com.jakewharton:butterknife-compiler:8.0.1' implementation project(path: ':CalendarView') testImplementation 'junit:junit:4.+' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' } \ No newline at end of file diff --git a/src/showme/app/release/app-release.apk b/src/showme/app/release/app-release.apk deleted file mode 100644 index 7f55e6d..0000000 Binary files a/src/showme/app/release/app-release.apk and /dev/null differ diff --git a/src/showme/app/release/output-metadata.json b/src/showme/app/release/output-metadata.json deleted file mode 100644 index 1accf42..0000000 --- a/src/showme/app/release/output-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "version": 2, - "artifactType": { - "type": "APK", - "kind": "Directory" - }, - "applicationId": "com.diary.showme", - "variantName": "processReleaseResources", - "elements": [ - { - "type": "SINGLE", - "filters": [], - "versionCode": 1, - "versionName": "1.0", - "outputFile": "app-release.apk" - } - ] -} \ No newline at end of file diff --git a/src/showme/app/src/main/AndroidManifest.xml b/src/showme/app/src/main/AndroidManifest.xml index 2b620fa..7809c68 100644 --- a/src/showme/app/src/main/AndroidManifest.xml +++ b/src/showme/app/src/main/AndroidManifest.xml @@ -1,13 +1,7 @@ - - - - - - - - - - - - @@ -31,8 +16,6 @@ - - \ No newline at end of file diff --git a/src/showme/app/src/main/java/com/diary/showme/MainActivity.java b/src/showme/app/src/main/java/com/diary/showme/MainActivity.java index d5395a5..4017a4f 100644 --- a/src/showme/app/src/main/java/com/diary/showme/MainActivity.java +++ b/src/showme/app/src/main/java/com/diary/showme/MainActivity.java @@ -29,8 +29,8 @@ import com.idealist.calendarview.CalendarPager; import com.idealist.calendarview.CalendarUtils; import com.idealist.calendarview.CalendarView; import com.idealist.calendarview.CalendarViewAdapter; -import com.idealist.calendarview.RecyclerViewAdapter; -import com.idealist.calendarview.SpaceItemDecoration; +//import com.idealist.calendarview.RecyclerViewAdapter; +//import com.idealist.calendarview.SpaceItemDecoration; import com.idealist.calendarview.State; import com.idealist.calendarview.interf.OnSelectDateListener; @@ -75,9 +75,9 @@ public class MainActivity extends AppCompatActivity { initSQL(); initCalendar(); - initFAB(); - initCourseB(); - initDiaryB(); +// initFAB(); +// initCourseB(); +// initDiaryB(); attr = new CalendarAttr(); attr.setCalendarType(State.VIEW_MONTH); @@ -88,7 +88,7 @@ public class MainActivity extends AppCompatActivity { viewAdapter = new CalendarViewAdapter(this, attr, onSelectDateListener, clickListener); initPager(); - initSchedule(); +// initSchedule(); } private void initSQL() { @@ -101,31 +101,31 @@ public class MainActivity extends AppCompatActivity { MySQLiteDatabase.courseSQL = courseSQL; } - private void initFAB() { - scheduleFAB = findViewById(R.id.add_schedule); - scheduleFAB.setOnClickListener(v -> { - Toast.makeText(getApplicationContext(), viewAdapter.getSelectDay().toString(), Toast.LENGTH_SHORT).show(); - Intent intent = new Intent(MainActivity.this, AddScheduleActivity.class); - intent.putExtra("date", viewAdapter.getSelectDay().toString()); - startActivityForResult(intent, 0); - }); - } - - private void initCourseB() { - courseFAB = findViewById(R.id.course_entry); - courseFAB.setOnClickListener(v -> { - Intent intent = new Intent(MainActivity.this, CourseActivity.class); - startActivity(intent); - }); - } - - private void initDiaryB() { - diaryFAB = findViewById(R.id.diary_entry); - diaryFAB.setOnClickListener(v -> { - Intent intent = new Intent(MainActivity.this, DiaryActivity.class); - startActivity(intent); - }); - } +// private void initFAB() { +// scheduleFAB = findViewById(R.id.add_schedule); +// scheduleFAB.setOnClickListener(v -> { +// Toast.makeText(getApplicationContext(), viewAdapter.getSelectDay().toString(), Toast.LENGTH_SHORT).show(); +// Intent intent = new Intent(MainActivity.this, AddScheduleActivity.class); +// intent.putExtra("date", viewAdapter.getSelectDay().toString()); +// startActivityForResult(intent, 0); +// }); +// } +// +// private void initCourseB() { +// courseFAB = findViewById(R.id.course_entry); +// courseFAB.setOnClickListener(v -> { +// Intent intent = new Intent(MainActivity.this, CourseActivity.class); +// startActivity(intent); +// }); +// } +// +// private void initDiaryB() { +// diaryFAB = findViewById(R.id.diary_entry); +// diaryFAB.setOnClickListener(v -> { +// Intent intent = new Intent(MainActivity.this, DiaryActivity.class); +// startActivity(intent); +// }); +// } private void initCalendar() { @@ -164,7 +164,7 @@ public class MainActivity extends AppCompatActivity { clickListener = new CalendarView.OnCalendarClickListener() { @Override public void OnClick(CalendarDay day) { - updateSchedule(day); +// updateSchedule(day); } @Override @@ -174,25 +174,25 @@ public class MainActivity extends AppCompatActivity { }; } - private void initSchedule() { - - schedule = findViewById(R.id.list_item); - List mData = ScheduleSQLUtils.queryByDate(currentDay.toString()); - - RecyclerViewAdapter adapter = new RecyclerViewAdapter(mData); - adapter.setOnItemClickListener((view, position) -> { - Intent intent = new Intent(MainActivity.this, EditScheduleActivity.class); - intent.putExtra("date", viewAdapter.getSelectDay().toString()); - String name = ((TextView) view.findViewById(R.id.schedule_title)).getText().toString(); - intent.putExtra("scheduleName", name); - startActivityForResult(intent, 0); - }); - schedule.setAdapter(adapter); - - LinearLayoutManager layoutManager = new LinearLayoutManager(this); - schedule.setLayoutManager(layoutManager); - schedule.addItemDecoration(new SpaceItemDecoration(30)); - } +// private void initSchedule() { +// +// schedule = findViewById(R.id.list_item); +// List mData = ScheduleSQLUtils.queryByDate(currentDay.toString()); +// +// RecyclerViewAdapter adapter = new RecyclerViewAdapter(mData); +// adapter.setOnItemClickListener((view, position) -> { +// Intent intent = new Intent(MainActivity.this, EditScheduleActivity.class); +// intent.putExtra("date", viewAdapter.getSelectDay().toString()); +// String name = ((TextView) view.findViewById(R.id.schedule_title)).getText().toString(); +// intent.putExtra("scheduleName", name); +// startActivityForResult(intent, 0); +// }); +// schedule.setAdapter(adapter); +// +// LinearLayoutManager layoutManager = new LinearLayoutManager(this); +// schedule.setLayoutManager(layoutManager); +// schedule.addItemDecoration(new SpaceItemDecoration(30)); +// } @SuppressLint("SetTextI18n") @@ -201,20 +201,20 @@ public class MainActivity extends AppCompatActivity { tvYear.setText(currentDay.getYear() + ""); } - private void updateSchedule(CalendarDay day) { - ScheduleSQLUtils.queryByDate(day.toString()); - List mData = ScheduleSQLUtils.queryByDate(day.toString()); - RecyclerViewAdapter adapter = (RecyclerViewAdapter) schedule.getAdapter(); - adapter.setmDatabase(mData); - adapter.notifyDataSetChanged(); - } - - @Override - protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { - super.onActivityResult(requestCode, resultCode, data); - if (requestCode == 0 && resultCode == Activity.RESULT_OK) { - updateSchedule(viewAdapter.getSelectDay()); - viewAdapter.updateViewScheduleChange(); - } - } +// private void updateSchedule(CalendarDay day) { +// ScheduleSQLUtils.queryByDate(day.toString()); +// List mData = ScheduleSQLUtils.queryByDate(day.toString()); +// RecyclerViewAdapter adapter = (RecyclerViewAdapter) schedule.getAdapter(); +// adapter.setmDatabase(mData); +// adapter.notifyDataSetChanged(); +// } + +// @Override +// protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { +// super.onActivityResult(requestCode, resultCode, data); +// if (requestCode == 0 && resultCode == Activity.RESULT_OK) { +// updateSchedule(viewAdapter.getSelectDay()); +// viewAdapter.updateViewScheduleChange(); +// } +// } } \ No newline at end of file diff --git a/src/showme/app/src/main/res/drawable/zone.jpg b/src/showme/app/src/main/res/drawable/zone.jpg deleted file mode 100644 index 9ba699d..0000000 Binary files a/src/showme/app/src/main/res/drawable/zone.jpg and /dev/null differ diff --git a/src/showme/app/src/main/res/layout/activity_add_zone.xml b/src/showme/app/src/main/res/layout/activity_add_zone.xml deleted file mode 100644 index 5f19b3a..0000000 --- a/src/showme/app/src/main/res/layout/activity_add_zone.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - -