Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
doutuifei committed Mar 29, 2018
1 parent 982bac8 commit 0402466
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 27 deletions.
46 changes: 23 additions & 23 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@ dependencies {
compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30'
}

// 打包源码jar
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

task javadoc(type: Javadoc) {
failOnError false
source = android.sourceSets.main.java.sourceFiles
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
classpath += configurations.compile
}

// 打包文档jar
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives sourcesJar
archives javadocJar
}
//// 打包源码jar
//task sourcesJar(type: Jar) {
// from android.sourceSets.main.java.srcDirs
// classifier = 'sources'
//}
//
//task javadoc(type: Javadoc) {
// failOnError false
// source = android.sourceSets.main.java.sourceFiles
// classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
// classpath += configurations.compile
//}
//
//// 打包文档jar
//task javadocJar(type: Jar, dependsOn: javadoc) {
// classifier = 'javadoc'
// from javadoc.destinationDir
//}
//
//artifacts {
// archives sourcesJar
// archives javadocJar
//}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
paint.setColor(Color.parseColor("#eaeaea"));
paint.setStyle(Paint.Style.STROKE);
paint.setStrokeWidth(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_PX, 1, getContext().getResources().getDisplayMetrics()));
paint.setStrokeWidth(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_PX, 2, getContext().getResources().getDisplayMetrics()));
paint.setAntiAlias(true);
canvas.drawLine(width, 0, 0, height, paint);
}
Expand Down
1 change: 1 addition & 0 deletions library/src/main/res/layout/item_month.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:textColor="@color/textMonth"
android:textSize="21sp"
tools:text="2018年12月" />

Expand Down
13 changes: 10 additions & 3 deletions library/src/main/res/layout/view_calendar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
android:id="@+id/viewStart"
android:layout_width="158dp"
android:layout_height="60dp"
android:layout_toStartOf="@id/line"
android:layout_toLeftOf="@id/line"
android:gravity="center"
android:orientation="vertical">

Expand Down Expand Up @@ -63,7 +63,7 @@
android:id="@+id/viewEnd"
android:layout_width="158dp"
android:layout_height="60dp"
android:layout_toEndOf="@id/line"
android:layout_toRightOf="@id/line"
android:gravity="center"
android:orientation="vertical">

Expand Down Expand Up @@ -135,10 +135,17 @@

</LinearLayout>

<View
android:id="@+id/guideLine"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@id/viewWeek"
android:background="#eaeaea" />

<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/viewWeek" />
android:layout_below="@id/guideLine" />

</RelativeLayout>

0 comments on commit 0402466

Please sign in to comment.