diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2b75303 --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..30aa626 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..2996d53 --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,15 @@ + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..703e5d4 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..7f68460 --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/app/build.gradle b/app/build.gradle new file mode 100644 index 0000000..761e69a --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,41 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 28 + defaultConfig { + applicationId "com.dujiajun.courseblock" + minSdkVersion 21 + targetSdkVersion 28 + versionCode 1 + versionName "1.0" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation 'androidx.appcompat:appcompat:1.0.0-rc02' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + implementation 'com.google.android.material:material:1.0.0-rc02' + implementation 'org.jsoup:jsoup:1.11.3' + implementation 'com.squareup.okhttp3:okhttp:3.14.0' + //implementation 'com.google.code.gson:gson:2.8.5' + //implementation 'com.eclipsesource.j2v8:j2v8:4.5.0@aar' + implementation 'com.github.bumptech.glide:glide:4.9.0' + annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0' + implementation 'com.github.zfman:TimetableView:v2.0.7' + //implementation 'org.apache.httpcomponents:httpclient:4.5.7' + testImplementation 'junit:junit:4.12' + androidTestImplementation 'androidx.test:runner:1.1.0-alpha4' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4' +} diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..f1b4245 --- /dev/null +++ b/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/app/src/androidTest/java/com/dujiajun/courseblock/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/dujiajun/courseblock/ExampleInstrumentedTest.java new file mode 100644 index 0000000..f45102f --- /dev/null +++ b/app/src/androidTest/java/com/dujiajun/courseblock/ExampleInstrumentedTest.java @@ -0,0 +1,27 @@ +package com.dujiajun.courseblock; + +import android.content.Context; + +import androidx.test.InstrumentationRegistry; +import androidx.test.runner.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.getTargetContext(); + + assertEquals("com.dujiajun.courseblock", appContext.getPackageName()); + } +} diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..614c448 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/com/dujiajun/courseblock/CourseDBHelper.java b/app/src/main/java/com/dujiajun/courseblock/CourseDBHelper.java new file mode 100644 index 0000000..7526f6f --- /dev/null +++ b/app/src/main/java/com/dujiajun/courseblock/CourseDBHelper.java @@ -0,0 +1,39 @@ +package com.dujiajun.courseblock; + +import android.content.Context; +import android.database.sqlite.SQLiteDatabase; +import android.database.sqlite.SQLiteOpenHelper; +import android.widget.Toast; + +import androidx.annotation.Nullable; + +public class CourseDBHelper extends SQLiteOpenHelper { + + public static final String CREATE_COURSE_TABLE = "CREATE TABLE course(" + + "id integer primary key autoincrement," + + "cno integer not null," + + "cname text not null," + + "start_week integer," + + "end_week integer," + + "teacher text," + + "location text," + + "day_in_week integer," + + "class_in_day integer)"; + + private Context mContext; + public CourseDBHelper(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version) { + super(context, name, factory, version); + mContext = context; + } + + @Override + public void onCreate(SQLiteDatabase db) { + db.execSQL(CREATE_COURSE_TABLE); + Toast.makeText(mContext, "CREATED DATABASE", Toast.LENGTH_SHORT).show(); + } + + @Override + public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { + + } +} diff --git a/app/src/main/java/com/dujiajun/courseblock/CourseManager.java b/app/src/main/java/com/dujiajun/courseblock/CourseManager.java new file mode 100644 index 0000000..7ac5bf8 --- /dev/null +++ b/app/src/main/java/com/dujiajun/courseblock/CourseManager.java @@ -0,0 +1,224 @@ +package com.dujiajun.courseblock; + +import android.content.Context; +import android.os.AsyncTask; +import android.util.Log; +import android.webkit.CookieManager; +import android.widget.Toast; + +import com.zhuangfei.timetable.model.Schedule; + +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import okhttp3.Callback; +import okhttp3.Cookie; +import okhttp3.CookieJar; +import okhttp3.FormBody; +import okhttp3.HttpUrl; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; + +public class CourseManager { + + private Context mContext; + private static CourseManager singleton; + private List scheduleList; + + private CourseManager(Context context) { + mContext = context; + scheduleList = new ArrayList<>(); + } + + public static CourseManager getInstance(Context context) { + if (singleton == null) { + singleton = new CourseManager(context); + } + return singleton; + } + + public List getScheduleList() { + return scheduleList; + } + + public void writeToDatabase() { + + } + + public void readFromDatabase() { + + } + + public void downloadFromNetwork() { + + } + + private OkHttpClient client = new OkHttpClient.Builder() + .cookieJar(new WebViewCookieHandler()) + .build(); + + public enum SEMESTER { + FIRST("3"), SECOND("12"), SUMMER("16"); + private String name; + + SEMESTER(String name) { + this.name = name; + } + + public String getName() { + return name; + } + } + + private void getCourseTable(String year, SEMESTER semester, Callback callback) { + RequestBody requestBody = new FormBody.Builder() + .add("xnm", year) + .add("xqm", semester.getName()) + .build(); + String courseJsonUrl = "http://i.sjtu.edu.cn/kbcx/xskbcx_cxXsKb.html"; + Request request = new Request.Builder() + .url(courseJsonUrl) + .post(requestBody) + .build(); + Log.i("CourseBlock", request.headers().toString()); + client.newCall(request).enqueue(callback); + } + + public void updateCourseDatabase(String year, SEMESTER semester, ShowInUICallback callback) { + + new AsyncTask() { + + @Override + protected Void doInBackground(Void... voids) { + RequestBody requestBody = new FormBody.Builder() + .add("xnm", year) + .add("xqm", semester.getName()) + .build(); + String courseJsonUrl = "http://i.sjtu.edu.cn/kbcx/xskbcx_cxXsKb.html"; + Request request = new Request.Builder() + .url(courseJsonUrl) + .post(requestBody) + .build(); + Log.i("CourseBlock", request.headers().toString()); + Response response = null; + try { + response = client.newCall(request).execute(); + + if (!"application/json;charset=UTF-8".equals(response.header("Content-Type"))) { + Toast.makeText(mContext, "请先登录!", Toast.LENGTH_SHORT).show(); + return null; + } + if (response.body() != null) { + String resp = null; + resp = response.body().string(); + parseCourseJson(resp); + } + } catch (IOException e) { + e.printStackTrace(); + } + return null; + } + + @Override + protected void onPostExecute(Void aVoid) { + super.onPostExecute(aVoid); + callback.onShow(scheduleList); + } + }.execute(); + + } + + public interface ShowInUICallback { + void onShow(List schedules); + } + + private void parseCourseJson(String json) { + try { + scheduleList.clear(); + JSONObject jsonObject = new JSONObject(json); + JSONObject jsonObjectJmcMap = jsonObject.getJSONObject("xqjmcMap"); + JSONArray jsonArrayKb = jsonObject.getJSONArray("kbList"); + for (int i = 0; i < jsonArrayKb.length(); i++) { + JSONObject jsonCourse = jsonArrayKb.getJSONObject(i); + JSubject subject = new JSubject(); + subject.setName(jsonCourse.getString("kcmc")); + subject.setRoom(jsonCourse.getString("cdmc")); + subject.setDay(jsonCourse.getInt("xqj")); + List startAndStep = getStartAndStep(jsonCourse.getString("jcor")); + subject.setStart(startAndStep.get(0)); + subject.setStep(startAndStep.get(1)); + subject.setTeacher(jsonCourse.getString("xm")); + subject.setWeekList(getWeekList(jsonCourse.getString("zcd"))); + scheduleList.add(subject.getSchedule()); + } + } catch (JSONException e) { + e.printStackTrace(); + } + } + + + private List getWeekList(String weekString) { + int isEven = 0; + if (weekString.contains("(单)")) { + isEven = 1; + weekString = weekString.replace("(单)", ""); + } + if (weekString.contains("(双)")) { + isEven = 1; + weekString = weekString.replace("(双)", ""); + } + String[] weeks = weekString.replace("周", "").split("-"); + List weekList = new ArrayList<>(); + for (Integer i = Integer.valueOf(weeks[0]); i <= Integer.valueOf(weeks[1]); i = i + 1 + isEven) { + weekList.add(i); + } + return weekList; + } + + private List getStartAndStep(String jcor) { + List startAndStep = new ArrayList<>(); + String[] jc = jcor.split("-"); + startAndStep.add(Integer.valueOf(jc[0])); + startAndStep.add(Integer.valueOf(jc[1]) - Integer.valueOf(jc[0]) + 1); + return startAndStep; + } + + public static class WebViewCookieHandler implements CookieJar { + private CookieManager mCookieManager = CookieManager.getInstance(); + + @Override + public void saveFromResponse(HttpUrl url, List cookies) { + String urlString = url.toString(); + + for (Cookie cookie : cookies) { + mCookieManager.setCookie(urlString, cookie.toString()); + } + } + + @Override + public List loadForRequest(HttpUrl url) { + String urlString = url.toString(); + String cookiesString = mCookieManager.getCookie(urlString); + + if (cookiesString != null && !cookiesString.isEmpty()) { + String[] cookieHeaders = cookiesString.split(";"); + List cookies = new ArrayList<>(cookieHeaders.length); + + for (String header : cookieHeaders) { + cookies.add(Cookie.parse(url, header)); + } + return cookies; + } + + return Collections.emptyList(); + } + } +} diff --git a/app/src/main/java/com/dujiajun/courseblock/CourseTableView.java b/app/src/main/java/com/dujiajun/courseblock/CourseTableView.java new file mode 100644 index 0000000..1f07775 --- /dev/null +++ b/app/src/main/java/com/dujiajun/courseblock/CourseTableView.java @@ -0,0 +1,53 @@ +package com.dujiajun.courseblock; + +import android.content.Context; +import android.util.AttributeSet; +import android.view.Gravity; +import android.view.LayoutInflater; +import android.view.ViewGroup; +import android.widget.LinearLayout; +import android.widget.TextView; + +import androidx.annotation.Nullable; + +public class CourseTableView extends LinearLayout { + + private LinearLayout layoutTitle; + private LinearLayout layoutLeft; + public CourseTableView(Context context, @Nullable AttributeSet attrs) { + super(context, attrs); + LayoutInflater.from(context).inflate(R.layout.view_coursetable,this); + + layoutTitle = findViewById(R.id.layout_title_day); + layoutLeft = findViewById(R.id.layout_left_class); + + //ArrayList listTitleDay = new ArrayList<>(); + //ArrayList listLeftClass = new ArrayList<>(); + String[] strTitleDay = getResources().getStringArray(R.array.days_in_week); + + LayoutParams params = new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT + , ViewGroup.LayoutParams.WRAP_CONTENT + ,1); + params.gravity = Gravity.CENTER; + + for (String s:strTitleDay) { + TextView textView = new TextView(context); + textView.setText(s); + //textView.setTextSize(18); + textView.setGravity(Gravity.CENTER); + textView.setLayoutParams(params); + layoutTitle.addView(textView); + } + + for (int i = 1; i <= 13; i++) { + TextView textView = new TextView(context); + textView.setText(String.valueOf(i)); + //textView.setTextSize(18); + textView.setGravity(Gravity.CENTER); + textView.setLayoutParams(params); + layoutLeft.addView(textView); + } + } + + +} diff --git a/app/src/main/java/com/dujiajun/courseblock/JSubject.java b/app/src/main/java/com/dujiajun/courseblock/JSubject.java new file mode 100644 index 0000000..4014626 --- /dev/null +++ b/app/src/main/java/com/dujiajun/courseblock/JSubject.java @@ -0,0 +1,142 @@ +package com.dujiajun.courseblock; + +import com.zhuangfei.timetable.model.Schedule; +import com.zhuangfei.timetable.model.ScheduleEnable; + +import java.util.List; + +public class JSubject implements ScheduleEnable { + + private int id = 0; + //private String courseId; + private String time; + private String name; + private String room; + private String teacher; + private int start; + private int step; + private int day; + private List weekList; + private String term; + private int colorRandom = 0; + + public JSubject() { + } + + public JSubject(String time, String name, String room, String teacher, int start, int step, int day, List weekList, String term, int colorRandom) { + this.time = time; + this.name = name; + this.room = room; + this.teacher = teacher; + this.start = start; + this.step = step; + this.day = day; + this.weekList = weekList; + this.term = term; + this.colorRandom = colorRandom; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getRoom() { + return room; + } + + public void setRoom(String room) { + this.room = room; + } + + public String getTeacher() { + return teacher; + } + + public void setTeacher(String teacher) { + this.teacher = teacher; + } + + public int getStart() { + return start; + } + + public void setStart(int start) { + this.start = start; + } + + public int getStep() { + return step; + } + + public void setStep(int step) { + this.step = step; + } + + public int getDay() { + return day; + } + + public void setDay(int day) { + this.day = day; + } + + public List getWeekList() { + return weekList; + } + + public void setWeekList(List weekList) { + this.weekList = weekList; + } + + public String getTerm() { + return term; + } + + public void setTerm(String term) { + this.term = term; + } + + public int getColorRandom() { + return colorRandom; + } + + public void setColorRandom(int colorRandom) { + this.colorRandom = colorRandom; + } + + @Override + public Schedule getSchedule() { + Schedule schedule = new Schedule(); + schedule.setDay(getDay()); + schedule.setName(getName()); + schedule.setRoom(getRoom()); + schedule.setStart(getStart()); + schedule.setStep(getStep()); + schedule.setTeacher(getTeacher()); + schedule.setWeekList(getWeekList()); + schedule.setColorRandom(2); + //schedule.putExtras(EXTRAS_ID,getId()); + //schedule.putExtras(EXTRAS_AD_URL,getUrl()); + return schedule; + } +} diff --git a/app/src/main/java/com/dujiajun/courseblock/LoginActivity.java b/app/src/main/java/com/dujiajun/courseblock/LoginActivity.java new file mode 100644 index 0000000..00363c0 --- /dev/null +++ b/app/src/main/java/com/dujiajun/courseblock/LoginActivity.java @@ -0,0 +1,39 @@ +package com.dujiajun.courseblock; + +import android.os.Bundle; +import android.webkit.WebView; +import android.webkit.WebViewClient; + +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; + +public class LoginActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_login); + Toolbar toolbar = findViewById(R.id.toolbar); + setSupportActionBar(toolbar); + toolbar.setNavigationOnClickListener(v -> finish()); + WebView webView = findViewById(R.id.webview); + webView.getSettings().setJavaScriptEnabled(true); + webView.setWebViewClient(new WebViewClient(){ + @Override + public boolean shouldOverrideUrlLoading(WebView view, String url) { + view.loadUrl(url); + return true; + } + + /*@Override + public void onLoadResource(WebView view, String url) { + super.onLoadResource(view, url); + if (url.contains("i.sjtu.edu.cn")){ + finish(); + } + }*/ + }); + String loginUrl = "http://i.sjtu.edu.cn/jaccountlogin"; + webView.loadUrl(loginUrl); + } +} diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..1f6bb29 --- /dev/null +++ b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..0d025f9 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml new file mode 100644 index 0000000..9410f3f --- /dev/null +++ b/app/src/main/res/layout/activity_login.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..f76ba85 --- /dev/null +++ b/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/content_main.xml b/app/src/main/res/layout/content_main.xml new file mode 100644 index 0000000..565938c --- /dev/null +++ b/app/src/main/res/layout/content_main.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/view_coursetable.xml b/app/src/main/res/layout/view_coursetable.xml new file mode 100644 index 0000000..d191a3e --- /dev/null +++ b/app/src/main/res/layout/view_coursetable.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml new file mode 100644 index 0000000..648c447 --- /dev/null +++ b/app/src/main/res/menu/menu_main.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..eca70cf --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..eca70cf --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..898f3ed Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000..dffca36 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..64ba76f Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000..dae5e08 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..e5ed465 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000..14ed0af Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..b0907ca Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..d8ae031 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..2c18de9 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..beed3cd Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..025a2d4 --- /dev/null +++ b/app/src/main/res/values/colors.xml @@ -0,0 +1,9 @@ + + + #008577 + #00574B + #D81B60 + #B3E5FC + #BDBDBD + #FFF9C4 + diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml new file mode 100644 index 0000000..8e95d46 --- /dev/null +++ b/app/src/main/res/values/dimens.xml @@ -0,0 +1,5 @@ + + 16dp + 48dp + 48dp + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..06559ae --- /dev/null +++ b/app/src/main/res/values/strings.xml @@ -0,0 +1,16 @@ + + CourseBlock + Settings + TODO + Login + + + 周一 + 周二 + 周三 + 周四 + 周五 + 周六 + 周日 + + diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..5e399fa --- /dev/null +++ b/app/src/main/res/values/styles.xml @@ -0,0 +1,20 @@ + + + + + + + +