Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
li-yu committed Nov 16, 2016
1 parent f2cc68a commit 8b8b219
Show file tree
Hide file tree
Showing 148 changed files with 7,844 additions and 29 deletions.
37 changes: 8 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,30 +1,9 @@
# built application files
*.apk
*.ap_

# files for the dex VM
*.dex

# Java class files
*.class

# generated files
bin/
gen/

# Local configuration file (sdk path, etc)
local.properties

# Eclipse project files
.classpath
.project

# Proguard folder generated by Eclipse
proguard/

# Intellij project files
*.iml
*.ipr
*.iws
.idea/

.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
22 changes: 22 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
Binary file added app/app-release.apk
Binary file not shown.
45 changes: 45 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.liyu.suzhoubus"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.0.0'
testCompile 'junit:junit:4.12'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
compile 'com.android.support:support-v4:25.0.0'
compile 'org.litepal.android:core:1.4.0'
compile 'com.android.support:design:25.0.0'
compile 'com.android.support:cardview-v7:25.0.0'
compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.5.0'
compile 'me.dm7.barcodescanner:zxing:1.9'
compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxjava:1.2.1'
compile 'com.github.clans:fab:1.6.4'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.github.chrisbanes:PhotoView:1.3.1'
compile 'com.jakewharton.rxbinding:rxbinding-appcompat-v7:0.4.0'
}
Binary file added app/libs/BaiduLBS_Android.jar
Binary file not shown.
17 changes: 17 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in D:\Android\sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# 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 *;
#}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.liyu.suzhoubus;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
* Instrumentation 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() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();

assertEquals("com.liyu.suzhoubus", appContext.getPackageName());
}
}
53 changes: 53 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.liyu.suzhoubus">

<!-- 这个权限用于进行网络定位-->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission>
<!-- 这个权限用于访问GPS定位-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
<!-- 用于访问wifi网络信息,wifi信息会用于进行网络定位-->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<!-- 获取运营商信息,用于支持提供运营商信息相关的接口-->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
<!-- 这个权限用于获取wifi的获取权限,wifi信息会用来进行网络定位-->
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"></uses-permission>
<!-- 用于读取手机当前的状态-->
<uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
<!-- 写入扩展存储,向扩展卡写入数据,用于写入离线定位数据-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<!-- 访问网络,网络定位需要上网-->
<uses-permission android:name="android.permission.INTERNET" />
<!-- SD卡读取权限,用户写入离线定位数据-->
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"></uses-permission>

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission>

<application
android:name=".App"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<meta-data
android:name="com.baidu.lbsapi.API_KEY"
android:value="E6rdq6U1vjjmTTglEtdX6fFbYTejWKEq" />
<activity android:name=".ui.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".ui.bus.LineDetailActivity"></activity>
<activity android:name=".ui.bus.StationDetailActivity"></activity>
<service android:name="com.baidu.location.f" android:enabled="true">
</service>
<activity android:name=".ui.gank.PictureActivity"></activity>
<service android:name=".service.GirlService"
android:enabled="true">
</service>
</application>

</manifest>
20 changes: 20 additions & 0 deletions app/src/main/assets/litepal.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<litepal>

<dbname value="bus_db"></dbname>

<version value="5"></version>

<storage value="external"></storage>

<list>

<mapping class="com.liyu.suzhoubus.model.Gank"></mapping>

<mapping class="com.liyu.suzhoubus.model.BusLineDetail"></mapping>

<mapping class="com.liyu.suzhoubus.model.StandInfoBean"></mapping>

</list>

</litepal>
53 changes: 53 additions & 0 deletions app/src/main/assets/weather.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[
{"code":"100","cname":"","ename":"Sunny/Clear","icon":"http://files.heweather.com/cond_icon/100.png"},
{"code":"101","cname":"多云","ename":"Cloudy","icon":"http://files.heweather.com/cond_icon/101.png"},
{"code":"102","cname":"少云","ename":"Few Clouds","icon":"http://files.heweather.com/cond_icon/102.png"},
{"code":"103","cname":"晴间多云","ename":"Partly Cloudy","icon":"http://files.heweather.com/cond_icon/103.png"},
{"code":"104","cname":"","ename":"Overcast","icon":"http://files.heweather.com/cond_icon/104.png"},
{"code":"200","cname":"有风","ename":"Windy","icon":"http://files.heweather.com/cond_icon/200.png"},
{"code":"201","cname":"平静","ename":"Calm","icon":"http://files.heweather.com/cond_icon/201.png"},
{"code":"202","cname":"微风","ename":"Light Breeze","icon":"http://files.heweather.com/cond_icon/202.png"},
{"code":"203","cname":"和风","ename":"Moderate/Gentle Breeze","icon":"http://files.heweather.com/cond_icon/203.png"},
{"code":"204","cname":"清风","ename":"Fresh Breeze","icon":"http://files.heweather.com/cond_icon/204.png"},
{"code":"205","cname":"强风/劲风","ename":"Strong Breeze","icon":"http://files.heweather.com/cond_icon/205.png"},
{"code":"206","cname":"疾风","ename":"High Wind, Near Gale","icon":"http://files.heweather.com/cond_icon/206.png"},
{"code":"207","cname":"大风","ename":"Gale","icon":"http://files.heweather.com/cond_icon/207.png"},
{"code":"208","cname":"烈风","ename":"Strong Gale","icon":"http://files.heweather.com/cond_icon/208.png"},
{"code":"209","cname":"风暴","ename":"Storm","icon":"http://files.heweather.com/cond_icon/209.png"},
{"code":"210","cname":"狂爆风","ename":"Violent Storm","icon":"http://files.heweather.com/cond_icon/210.png"},
{"code":"211","cname":"飓风","ename":"Hurricane","icon":"http://files.heweather.com/cond_icon/211.png"},
{"code":"212","cname":"龙卷风","ename":"Tornado","icon":"http://files.heweather.com/cond_icon/212.png"},
{"code":"213","cname":"热带风暴","ename":"Tropical Storm","icon":"http://files.heweather.com/cond_icon/213.png"},
{"code":"300","cname":"阵雨","ename":"Shower Rain","icon":"http://files.heweather.com/cond_icon/300.png"},
{"code":"301","cname":"强阵雨","ename":"Heavy Shower Rain","icon":"http://files.heweather.com/cond_icon/301.png"},
{"code":"302","cname":"雷阵雨","ename":"Thundershower","icon":"http://files.heweather.com/cond_icon/302.png"},
{"code":"303","cname":"强雷阵雨","ename":"Heavy Thunderstorm","icon":"http://files.heweather.com/cond_icon/303.png"},
{"code":"304","cname":"雷阵雨伴有冰雹","ename":"Hail","icon":"http://files.heweather.com/cond_icon/304.png"},
{"code":"305","cname":"小雨","ename":"Light Rain","icon":"http://files.heweather.com/cond_icon/305.png"},
{"code":"306","cname":"中雨","ename":"Moderate Rain","icon":"http://files.heweather.com/cond_icon/306.png"},
{"code":"307","cname":"大雨","ename":"Heavy Rain","icon":"http://files.heweather.com/cond_icon/307.png"},
{"code":"308","cname":"极端降雨","ename":"Extreme Rain","icon":"http://files.heweather.com/cond_icon/308.png"},
{"code":"309","cname":"毛毛雨/细雨","ename":"Drizzle Rain","icon":"http://files.heweather.com/cond_icon/309.png"},
{"code":"310","cname":"暴雨","ename":"Storm","icon":"http://files.heweather.com/cond_icon/310.png"},
{"code":"311","cname":"大暴雨","ename":"Heavy Storm","icon":"http://files.heweather.com/cond_icon/311.png"},
{"code":"312","cname":"特大暴雨","ename":"Severe Storm","icon":"http://files.heweather.com/cond_icon/312.png"},
{"code":"313","cname":"冻雨","ename":"Freezing Rain","icon":"http://files.heweather.com/cond_icon/313.png"},
{"code":"400","cname":"小雪","ename":"Light Snow","icon":"http://files.heweather.com/cond_icon/400.png"},
{"code":"401","cname":"中雪","ename":"Moderate Snow","icon":"http://files.heweather.com/cond_icon/401.png"},
{"code":"402","cname":"大雪","ename":"Heavy Snow","icon":"http://files.heweather.com/cond_icon/402.png"},
{"code":"403","cname":"暴雪","ename":"Snowstorm","icon":"http://files.heweather.com/cond_icon/403.png"},
{"code":"404","cname":"雨夹雪","ename":"Sleet","icon":"http://files.heweather.com/cond_icon/404.png"},
{"code":"405","cname":"雨雪天气","ename":"Rain And Snow","icon":"http://files.heweather.com/cond_icon/405.png"},
{"code":"406","cname":"阵雨夹雪","ename":"Shower Snow","icon":"http://files.heweather.com/cond_icon/406.png"},
{"code":"407","cname":"阵雪","ename":"Snow Flurry","icon":"http://files.heweather.com/cond_icon/407.png"},
{"code":"500","cname":"薄雾","ename":"Mist","icon":"http://files.heweather.com/cond_icon/500.png"},
{"code":"501","cname":"","ename":"Foggy","icon":"http://files.heweather.com/cond_icon/501.png"},
{"code":"502","cname":"","ename":"Haze","icon":"http://files.heweather.com/cond_icon/502.png"},
{"code":"503","cname":"扬沙","ename":"Sand","icon":"http://files.heweather.com/cond_icon/503.png"},
{"code":"504","cname":"浮尘","ename":"Dust","icon":"http://files.heweather.com/cond_icon/504.png"},
{"code":"507","cname":"沙尘暴","ename":"Duststorm","icon":"http://files.heweather.com/cond_icon/507.png"},
{"code":"508","cname":"强沙尘暴","ename":"Sandstorm","icon":"http://files.heweather.com/cond_icon/508.png"},
{"code":"900","cname":"","ename":"Hot","icon":"http://files.heweather.com/cond_icon/900.png"},
{"code":"901","cname":"","ename":"Cold","icon":"http://files.heweather.com/cond_icon/901.png"},
{"code":"999","cname":"未知","ename":"Unknown","icon":"http://files.heweather.com/cond_icon/999.png"}
]
Loading

0 comments on commit 8b8b219

Please sign in to comment.