Skip to content
This repository has been archived by the owner on May 28, 2020. It is now read-only.

Commit

Permalink
add the round icon, remove the unused resources and fixed some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
lizhaotailang committed Apr 26, 2017
1 parent b73c262 commit 1b7d57e
Show file tree
Hide file tree
Showing 27 changed files with 24 additions and 212 deletions.
3 changes: 3 additions & 0 deletions .idea/modules.xml

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

1 change: 1 addition & 0 deletions mobile/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
android:name=".app.App"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package io.github.marktony.espresso.mvp.search;

import android.app.ActivityOptions;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
Expand All @@ -30,6 +31,7 @@
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;

import java.util.List;

Expand Down Expand Up @@ -106,6 +108,7 @@ public void onPause() {
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
hideImm();
getActivity().onBackPressed();
}
return true;
Expand Down Expand Up @@ -159,4 +162,15 @@ public void OnItemClick(View v, int position) {
adapter.updateData(packages, companies);
}
}

/**
* Hide the input method like soft keyboard, etc... when they are active.
*/
private void hideImm() {
InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm.isActive()) {
imm.hideSoftInputFromWindow(searchView.getWindowToken(), 0);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public boolean onPreferenceClick(Preference preference) {
prefThx1.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
CustomTabsHelper.openUrl(getContext(), getString(R.string.thanks_1_desc));
CustomTabsHelper.openUrl(getContext(), getString(R.string.thanks_1_url));
return true;
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ private void updateIndicators(int position) {
}
}

private Handler handler = new Handler() {
private Handler handler = new Handler() {
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,12 @@ public InactivityTimer(Activity activity) {
public synchronized void onActivity() {
cancel();
inactivityTask = new InactivityAsyncTask();
if (Build.VERSION.SDK_INT >= 11) {
/*if (Build.VERSION.SDK_INT >= 11) {
inactivityTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
} else {
inactivityTask.execute();
}
}*/
inactivityTask.execute();
}

public synchronized void onPause() {
Expand Down
25 changes: 0 additions & 25 deletions mobile/src/main/res/drawable/ic_account_circle_black_24dp.xml

This file was deleted.

25 changes: 0 additions & 25 deletions mobile/src/main/res/drawable/ic_center_focus_strong_white_24dp.xml

This file was deleted.

22 changes: 0 additions & 22 deletions mobile/src/main/res/drawable/ripple_mask.xml

This file was deleted.

30 changes: 0 additions & 30 deletions mobile/src/main/res/drawable/selector.xml

This file was deleted.

25 changes: 0 additions & 25 deletions mobile/src/main/res/drawable/side_nav_bar.xml

This file was deleted.

Binary file removed mobile/src/main/res/icon.png
Binary file not shown.
1 change: 0 additions & 1 deletion mobile/src/main/res/layout/activity_onboarding.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
tools:context=".ui.onboarding.OnboardingActivity">

<android.support.v4.view.ViewPager
Expand Down
69 changes: 0 additions & 69 deletions mobile/src/main/res/layout/fragment_list.xml

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions mobile/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@
<color name="colorPrimary">#607d8b</color>
<color name="colorPrimaryDark">#485a66</color>
<color name="colorAccent">#546dfe</color>
<color name="colorPrimaryLight">#CFD8DC</color>
<color name="colorPrimaryText">#e4e4e4</color>
<color name="colorSecondaryText">#b5b5b5</color>
<color name="colorDivider">#BDBDBD</color>
<color name="colorHeaderBackground">#35464e</color>
<color name="colorBottomBarBackground">#222222</color>
<color name="colorNavItemUnselected">#a5a5a5</color>

<color name="transparent_black">#33000000</color>
Expand Down
1 change: 0 additions & 1 deletion mobile/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
<string name="deliver_man">快递员</string>
<string name="edit_name">编辑包裹名称</string>
<string name="input_empty">包裹名称不能为空!</string>
<string name="retry">重试</string>
<!--package details end-->

<!--add package-->
Expand Down
1 change: 0 additions & 1 deletion mobile/src/main/res/values-zh-rHK/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
<string name="deliver_man">快遞員</string>
<string name="edit_name">編輯包裹名稱</string>
<string name="input_empty">包裹名稱不能為空!</string>
<string name="retry">重試</string>
<!--package details end-->

<!--add package-->
Expand Down
1 change: 0 additions & 1 deletion mobile/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
<string name="deliver_man">快遞員</string>
<string name="edit_name">編輯包裹名稱</string>
<string name="input_empty">包裹名稱不能為空!</string>
<string name="retry">重試</string>
<!--package details end-->

<!--add package-->
Expand Down
2 changes: 0 additions & 2 deletions mobile/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@
<color name="colorPrimary">#009688</color>
<color name="colorPrimaryDark">#00796B</color>
<color name="colorAccent">#448AFF</color>
<color name="colorPrimaryLight">#B2DFDB</color>
<color name="colorPrimaryText">#212121</color>
<color name="colorSecondaryText">#757575</color>
<color name="colorDivider">#BDBDBD</color>
<color name="colorHeaderBackground">#ebebeb</color>
<color name="colorBottomBarBackground">@android:color/white</color>
<color name="colorNavItemUnselected">#757575</color>

<color name="transparent_black">#33000000</color>
Expand Down
2 changes: 0 additions & 2 deletions mobile/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="nav_header_vertical_spacing">16dp</dimen>
<dimen name="nav_header_height">160dp</dimen>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
Expand All @@ -26,6 +25,5 @@
<dimen name="timeline_dot_size">16dp</dimen>
<dimen name="timeline_line_size">2dp</dimen>
<dimen name="timeline_padding_top">20dp</dimen>
<dimen name="appbar_padding_top">8dp</dimen>
<dimen name="activity_margin_half">8dp</dimen>
</resources>
1 change: 0 additions & 1 deletion mobile/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
<string name="deliver_man">Deliver man</string>
<string name="edit_name">Edit Name</string>
<string name="input_empty">The package name can not be empty!</string>
<string name="retry">RETRY</string>
<!--package details end-->

<!--add package-->
Expand Down
2 changes: 1 addition & 1 deletion mobile/src/main/res/xml/settings_prefs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<Preference
android:key="do_not_disturb_mode_start"
android:title="@string/start_time"
android:summary="%s"
android:summary="@string/start_time_desc"
android:dependency="do_not_disturb_mode"/>

<Preference
Expand Down

0 comments on commit 1b7d57e

Please sign in to comment.