Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
ccjeng committed Apr 7, 2017
1 parent ab5eaed commit 72dfd04
Show file tree
Hide file tree
Showing 6 changed files with 152 additions and 402 deletions.
528 changes: 142 additions & 386 deletions .idea/workspace.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId 'com.oddsoft.tpetrash2'
minSdkVersion 16
targetSdkVersion 21
versionCode 62
versionName '5.0.2.122416TT'
versionCode 63
versionName '5.1.0.040717TT'
multiDexEnabled true
}
buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public void onMapReady(GoogleMap map) {
map.getUiSettings().setZoomControlsEnabled(true);
map.setMyLocationEnabled(true);

float zoom = 14;
switch (mapType) {
case "tpfix": //台北市資源回收及廚餘限時收受點
drawLocationTPFix(map);
Expand All @@ -76,6 +77,7 @@ public void onMapReady(GoogleMap map) {
break;
case "tpcloth": //台北市舊衣回收箱
drawLocationTPCloth(map);
zoom = 16;
break;
case "ntrecycle": //新北市黃金資收站設置資訊
drawLocationNTRecycle(map);
Expand All @@ -86,7 +88,7 @@ public void onMapReady(GoogleMap map) {

if (currentLocation != null) {
LatLng myLocation = new LatLng(currentLocation.getLatitude(), currentLocation.getLongitude());
map.moveCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 14));
map.moveCamera(CameraUpdateFactory.newLatLngZoom(myLocation, zoom));

} else {
view.showError(context.getString(R.string.location_error), Utils.Mode.ERROR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
import com.mikepenz.aboutlibraries.Libs;
import com.mikepenz.aboutlibraries.LibsBuilder;
import com.oddsoft.tpetrash2.BuildConfig;
import com.oddsoft.tpetrash2.R;
import com.oddsoft.tpetrash2.utils.Analytics;
import com.oddsoft.tpetrash2.utils.Utils;
Expand Down Expand Up @@ -285,17 +286,10 @@ private void showMessage() {
long cacheExpiration = 3600 * 3; //3 hour

//Settings
/*
FirebaseRemoteConfigSettings remoteConfigSettings = new FirebaseRemoteConfigSettings.Builder()
.setDeveloperModeEnabled(true)
.build();
mRemoteConfig.setConfigSettings(remoteConfigSettings);
//expire the cache immediately for development mode.
if (mRemoteConfig.getInfo().getConfigSettings().isDeveloperModeEnabled()) {
if(BuildConfig.DEBUG) {
cacheExpiration = 0;
}
*/

mRemoteConfig.fetch(cacheExpiration)
.addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
Expand All @@ -309,8 +303,6 @@ public void onComplete(@NonNull Task<Void> task) {

cvMessage.setVisibility(messageEnabled ? View.VISIBLE : View.GONE);

cvMessage.setVisibility(messageEnabled ? View.GONE : View.VISIBLE);

if (messageEnabled) {
messageView.setText(messageText.replace("\\n", System.getProperty("line.separator")));
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<string name="query">垃圾車班表\n依行政區查詢</string>
<string name="tpfix">台北市垃圾資源回收、廚餘回收限時收受點</string>
<string name="tpfood">台北市週三、週日廚餘專用限時收受點</string>
<string name="tpcloth">台北市舊衣回收箱</string>
<string name="tpcloth">台北市\n舊衣回收箱</string>
<string name="ntfix">新北市定點清運查詢</string>
<string name="ntrecycle">新北市黃金資收站設置資訊</string>
<string name="newtaipeirealtime">新北市垃圾車即時資訊</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/updates.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="updates">
<item>5.0.1\n移除一些不必要的權限
<item>5.1.0\n新增「台北市舊衣回收箱」
</item>
</string-array>
</resources>

0 comments on commit 72dfd04

Please sign in to comment.