之前的最初运行版本存在问题,因此更新src文件 #14
p86231950/ShowMe:master
into master
4 years ago
@ -1,3 +0,0 @@
|
|||||||
# Default ignored files
|
|
||||||
/shelf/
|
|
||||||
/workspace.xml
|
|
@ -1,24 +1,20 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
|
||||||
<component name="GradleSettings">
|
<component name="GradleSettings">
|
||||||
<option name="linkedExternalProjectsSettings">
|
<option name="linkedExternalProjectsSettings">
|
||||||
<GradleProjectSettings>
|
<GradleProjectSettings>
|
||||||
<option name="testRunner" value="PLATFORM" />
|
<option name="testRunner" value="PLATFORM" />
|
||||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
<option name="gradleJvm" value="1.8" />
|
|
||||||
<option name="modules">
|
<option name="modules">
|
||||||
<set>
|
<set>
|
||||||
<option value="$PROJECT_DIR$" />
|
<option value="$PROJECT_DIR$" />
|
||||||
<option value="$PROJECT_DIR$/CalendarView" />
|
<option value="$PROJECT_DIR$/CalendarView" />
|
||||||
<option value="$PROJECT_DIR$/Database" />
|
<option value="$PROJECT_DIR$/Database" />
|
||||||
<option value="$PROJECT_DIR$/Zone" />
|
|
||||||
<option value="$PROJECT_DIR$/app" />
|
<option value="$PROJECT_DIR$/app" />
|
||||||
</set>
|
</set>
|
||||||
</option>
|
</option>
|
||||||
<option name="resolveModulePerSourceSet" value="false" />
|
<option name="resolveModulePerSourceSet" value="false" />
|
||||||
<option name="useQualifiedModuleNames" value="true" />
|
|
||||||
</GradleProjectSettings>
|
</GradleProjectSettings>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>showme</name>
|
||||||
|
<comment>Project showme created by Buildship.</comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||||
|
</natures>
|
||||||
|
<filteredResources>
|
||||||
|
<filter>
|
||||||
|
<id>1625906374722</id>
|
||||||
|
<name></name>
|
||||||
|
<type>30</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||||
|
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
</filteredResources>
|
||||||
|
</projectDescription>
|
@ -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
|
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-15/"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
|
||||||
|
<classpathentry kind="output" path="bin/default"/>
|
||||||
|
</classpath>
|
@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>CalendarView</name>
|
||||||
|
<comment>Project CalendarView created by Buildship.</comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||||
|
</natures>
|
||||||
|
<filteredResources>
|
||||||
|
<filter>
|
||||||
|
<id>1625906374711</id>
|
||||||
|
<name></name>
|
||||||
|
<type>30</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||||
|
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
</filteredResources>
|
||||||
|
</projectDescription>
|
@ -0,0 +1,2 @@
|
|||||||
|
connection.project.dir=..
|
||||||
|
eclipse.preferences.version=1
|
@ -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 <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
|
||||||
*/
|
|
||||||
@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());
|
|
||||||
}
|
|
||||||
}
|
|
@ -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<RecyclerView.ViewHolder> implements
|
|
||||||
View.OnClickListener{
|
|
||||||
private List<String> mDatabase;
|
|
||||||
|
|
||||||
private OnItemClickListener onItemClickListener = null;
|
|
||||||
|
|
||||||
public RecyclerViewAdapter(List<String> 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<String> mDatabase) {
|
|
||||||
this.mDatabase = mDatabase;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
|
|
||||||
this.onItemClickListener = onItemClickListener;
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface OnItemClickListener {
|
|
||||||
void onItemClick(View view, int position);
|
|
||||||
}
|
|
||||||
}
|
|
@ -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<RecyclerView> {
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -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);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<item>
|
|
||||||
<shape>
|
|
||||||
<solid android:color="#000000"/>
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:left="1dp">
|
|
||||||
<shape>
|
|
||||||
<solid android:color="#ffffff"/>
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
</layer-list>
|
|
@ -1,41 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingLeft="10dp"
|
|
||||||
android:paddingEnd="10dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/schedule_time"
|
|
||||||
android:layout_width="40dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:text="1:00\n7:00"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:gravity="center"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/schedule_title"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginStart="12dp"
|
|
||||||
android:layout_marginLeft="12dp"
|
|
||||||
android:layout_toEndOf="@+id/schedule_time"
|
|
||||||
android:layout_toRightOf="@+id/schedule_time"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:paddingLeft="20dp"
|
|
||||||
android:text="schedule"
|
|
||||||
android:textSize="24sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:background="@drawable/schedule_border"/>
|
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<declare-styleable name="MyView">
|
|
||||||
<attr name="item_height" format="dimension"/>
|
|
||||||
<attr name="text_size" format="dimension"/>
|
|
||||||
</declare-styleable>
|
|
||||||
</resources>
|
|
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<style name="weekIndicatorStyle">
|
|
||||||
<item name="android:layout_width">0dp</item>
|
|
||||||
<item name="android:layout_height">match_parent</item>
|
|
||||||
<item name="android:layout_weight">1</item>
|
|
||||||
<item name="android:gravity">center</item>
|
|
||||||
<item name="android:textSize">13sp</item>
|
|
||||||
<item name="android:textColor">#ff25adff</item>
|
|
||||||
</style>
|
|
||||||
</resources>
|
|
@ -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 <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
|
||||||
*/
|
|
||||||
public class ExampleUnitTest {
|
|
||||||
@Test
|
|
||||||
public void addition_isCorrect() {
|
|
||||||
assertEquals(4, 2 + 2);
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-15/"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
|
||||||
|
<classpathentry kind="output" path="bin/default"/>
|
||||||
|
</classpath>
|
@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>Database</name>
|
||||||
|
<comment>Project Database created by Buildship.</comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||||
|
</natures>
|
||||||
|
<filteredResources>
|
||||||
|
<filter>
|
||||||
|
<id>1625906374715</id>
|
||||||
|
<name></name>
|
||||||
|
<type>30</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||||
|
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
</filteredResources>
|
||||||
|
</projectDescription>
|
@ -0,0 +1,2 @@
|
|||||||
|
connection.project.dir=..
|
||||||
|
eclipse.preferences.version=1
|
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-15/"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
|
||||||
|
<classpathentry kind="output" path="bin/default"/>
|
||||||
|
</classpath>
|
@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>app</name>
|
||||||
|
<comment>Project app created by Buildship.</comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||||
|
</natures>
|
||||||
|
<filteredResources>
|
||||||
|
<filter>
|
||||||
|
<id>1625906374719</id>
|
||||||
|
<name></name>
|
||||||
|
<type>30</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||||
|
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
</filteredResources>
|
||||||
|
</projectDescription>
|
@ -0,0 +1,2 @@
|
|||||||
|
connection.project.dir=..
|
||||||
|
eclipse.preferences.version=1
|
@ -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"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
Before Width: | Height: | Size: 4.8 KiB |
@ -1,55 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
tools:context=".Zone.AddZoneActivity">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingLeft="10dp"
|
|
||||||
android:paddingTop="10dp"
|
|
||||||
android:paddingEnd="10dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:text="起名: "
|
|
||||||
android:textSize="24sp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:textColor="@color/black"/>
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/add_name"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="enter your name"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/add_context"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="500dp"
|
|
||||||
android:layout_marginBottom="20dp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:layout_marginRight="5dp"
|
|
||||||
android:background="@color/white"
|
|
||||||
android:gravity="start"
|
|
||||||
android:hint="输入内容"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/add_ok"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="发布"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
@ -1,68 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
tools:context=".Zone.ZoneActivity">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:background="@color/teal_200">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/zone_back_calendar"
|
|
||||||
android:layout_width="30dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/ic_arrow_back_black_24dp"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="28"
|
|
||||||
android:textSize="28sp"
|
|
||||||
android:text="树洞"
|
|
||||||
android:textColor="@color/black"
|
|
||||||
android:gravity="center"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/add_zone"
|
|
||||||
android:layout_width="40dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="#00000000"
|
|
||||||
android:text="发布"
|
|
||||||
android:textSize="18sp"
|
|
||||||
android:paddingEnd="5dp"
|
|
||||||
android:gravity="center"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<com.chanven.lib.cptr.PtrClassicFrameLayout
|
|
||||||
android:id="@+id/zone_view_frame"
|
|
||||||
xmlns:cube_ptr="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="#f0f0f0"
|
|
||||||
cube_ptr:ptr_resistance="1.7"
|
|
||||||
cube_ptr:ptr_ratio_of_header_height_to_refresh="1.2"
|
|
||||||
cube_ptr:ptr_duration_to_close="200"
|
|
||||||
cube_ptr:ptr_duration_to_close_header="1000"
|
|
||||||
cube_ptr:ptr_keep_header_when_refresh="true"
|
|
||||||
cube_ptr:ptr_pull_to_fresh="false">
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/zone_list"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"/>
|
|
||||||
|
|
||||||
</com.chanven.lib.cptr.PtrClassicFrameLayout>
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 149 KiB |
Before Width: | Height: | Size: 10 KiB |
@ -1,4 +1,3 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">showme</string>
|
<string name="app_name">showme</string>
|
||||||
<string name="add">Add</string>
|
|
||||||
</resources>
|
</resources>
|
@ -1,26 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<paths>
|
|
||||||
<root-path
|
|
||||||
name="root"
|
|
||||||
path="" />
|
|
||||||
<files-path
|
|
||||||
name="files"
|
|
||||||
path="" />
|
|
||||||
|
|
||||||
<cache-path
|
|
||||||
name="cache"
|
|
||||||
path="" />
|
|
||||||
|
|
||||||
<external-path
|
|
||||||
name="camera_photos"
|
|
||||||
path="" />
|
|
||||||
|
|
||||||
<external-files-path
|
|
||||||
name="external_file_path"
|
|
||||||
path="" />
|
|
||||||
<external-cache-path
|
|
||||||
name="external_cache_path"
|
|
||||||
path="" />
|
|
||||||
</paths>
|
|
||||||
</resources>
|
|
@ -1,6 +1,6 @@
|
|||||||
#Thu Jan 14 17:23:24 CST 2021
|
#Sat Jul 10 16:29:07 CST 2021
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
include ':Zone'
|
|
||||||
include ':Database'
|
|
||||||
include ':CalendarView'
|
|
||||||
include ':app'
|
|
||||||
rootProject.name = "showme"
|
rootProject.name = "showme"
|
||||||
|
include ':app'
|
||||||
|
include ':CalendarView'
|
||||||
|
include ':Database'
|
||||||
|