-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mao Jun
committed
Apr 9, 2018
1 parent
c3587db
commit 22716bb
Showing
59 changed files
with
10,848 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,5 +55,5 @@ freeline.py | |
freeline/ | ||
freeline_project_description.json | ||
|
||
#Mac OS | ||
# Mac OS | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
app/src/main/java/com/koma/backuprestore/restore/dialog/RestoreProgressComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright 2017 Koma | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.koma.backuprestore.restore.dialog; | ||
|
||
import dagger.Component; | ||
|
||
/** | ||
* Created by koma on 4/8/18. | ||
*/ | ||
|
||
@Component | ||
public interface RestoreProgressComponent { | ||
void inject(RestoreProgressDialogFragment dialogFragment); | ||
} |
40 changes: 40 additions & 0 deletions
40
app/src/main/java/com/koma/backuprestore/restore/dialog/RestoreProgressContract.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright 2017 Koma | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.koma.backuprestore.restore.dialog; | ||
|
||
import com.koma.backuprestore.commonlibrary.base.BasePresenter; | ||
import com.koma.backuprestore.commonlibrary.base.BaseView; | ||
|
||
/** | ||
* Created by koma on 4/8/18. | ||
*/ | ||
|
||
public interface RestoreProgressContract { | ||
interface View extends BaseView<Presenter> { | ||
void showSuccessfulMessage(); | ||
|
||
void setMaxProgress(int maxProgress); | ||
|
||
void setCurrentProgress(int progress); | ||
|
||
void setMaxCount(int maxCount); | ||
|
||
void setCurrentCount(int count); | ||
} | ||
|
||
interface Presenter extends BasePresenter { | ||
} | ||
} |
65 changes: 65 additions & 0 deletions
65
app/src/main/java/com/koma/backuprestore/restore/dialog/RestoreProgressDialogFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
* Copyright 2017 Koma | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.koma.backuprestore.restore.dialog; | ||
|
||
import android.os.Bundle; | ||
import android.support.v4.widget.ContentLoadingProgressBar; | ||
import android.view.View; | ||
import android.widget.TextView; | ||
|
||
import com.koma.backuprestore.R; | ||
import com.koma.backuprestore.commonlibrary.base.BaseDialogFragment; | ||
import com.koma.loglibrary.KomaLog; | ||
|
||
import butterknife.BindView; | ||
|
||
/** | ||
* Created by koma on 4/8/18. | ||
*/ | ||
|
||
public class RestoreProgressDialogFragment extends BaseDialogFragment { | ||
private static final String TAG = RestoreProgressDialogFragment.class.getSimpleName(); | ||
|
||
@BindView(R.id.tv_title) | ||
TextView mTitle; | ||
@BindView(R.id.tv_current_count) | ||
TextView mCurrentCount; | ||
@BindView(R.id.tv_done) | ||
TextView mDone; | ||
@BindView(R.id.tv_total_count) | ||
TextView mTotalCount; | ||
@BindView(R.id.progress_bar) | ||
ContentLoadingProgressBar mProgressBar; | ||
|
||
@Override | ||
public void onViewCreated(View view, Bundle savedInstanceState) { | ||
super.onViewCreated(view, savedInstanceState); | ||
|
||
KomaLog.i(TAG, "onViewCreated"); | ||
} | ||
|
||
@Override | ||
public void onDestroyView() { | ||
super.onDestroyView(); | ||
|
||
KomaLog.i(TAG, "onDestroyView"); | ||
} | ||
|
||
@Override | ||
protected int getLayoutId() { | ||
return R.layout.dialog_restore; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
app/src/main/java/com/koma/backuprestore/restore/dialog/RestoreProgressPresenter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright 2017 Koma | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.koma.backuprestore.restore.dialog; | ||
|
||
import com.koma.backuprestore.restore.dialog.RestoreProgressContract.Presenter; | ||
|
||
/** | ||
* Created by koma on 4/8/18. | ||
*/ | ||
|
||
public class RestoreProgressPresenter implements Presenter { | ||
@Override | ||
public void subscribe() { | ||
|
||
} | ||
|
||
@Override | ||
public void unSubscribe() { | ||
|
||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
app/src/main/java/com/koma/backuprestore/restore/dialog/RestoreProgressPresenterModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright 2017 Koma | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.koma.backuprestore.restore.dialog; | ||
|
||
import dagger.Module; | ||
import dagger.Provides; | ||
|
||
/** | ||
* Created by koma on 4/8/18. | ||
*/ | ||
|
||
@Module | ||
public class RestoreProgressPresenterModule { | ||
private final RestoreProgressContract.View mView; | ||
|
||
public RestoreProgressPresenterModule(RestoreProgressContract.View view) { | ||
mView = view; | ||
} | ||
|
||
@Provides | ||
RestoreProgressContract.View provideRestoreProgressContractView() { | ||
return this.mView; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:fitsSystemWindows="true" | ||
android:paddingBottom="@dimen/activity_vertical_margin" | ||
android:paddingEnd="@dimen/activity_horizontal_margin" | ||
android:paddingStart="@dimen/activity_horizontal_margin" | ||
android:paddingTop="@dimen/activity_vertical_margin"> | ||
|
||
<TextView | ||
android:id="@+id/tv_title" | ||
style="@style/TextAppearance.AppCompat.Title" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginBottom="@dimen/nav_header_vertical_spacing" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<android.support.v4.widget.ContentLoadingProgressBar | ||
android:id="@+id/progress_bar" | ||
style="@style/Widget.AppCompat.ProgressBar.Horizontal" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="@dimen/nav_header_vertical_spacing" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/tv_title" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_total_count" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/progress_bar" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_divider" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/divider_description" | ||
app:layout_constraintBottom_toBottomOf="@id/tv_total_count" | ||
app:layout_constraintEnd_toStartOf="@id/tv_total_count" | ||
app:layout_constraintTop_toTopOf="@id/tv_total_count" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_current_count" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
app:layout_constraintBottom_toBottomOf="@id/tv_total_count" | ||
app:layout_constraintEnd_toStartOf="@id/tv_divider" | ||
app:layout_constraintTop_toTopOf="@id/tv_total_count" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_done" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="@dimen/activity_vertical_margin" | ||
android:text="@string/done" | ||
android:textColor="@color/colorPrimary" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/tv_total_count" /> | ||
|
||
</android.support.constraint.ConstraintLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<resources> | ||
<string name="app_name">"换机助手"</string> | ||
|
||
<string name="navigation_drawer_open">"打开抽屉栏"</string> | ||
<string name="navigation_drawer_close">"关闭抽屉栏"</string> | ||
|
||
<string name="action_settings">"设置"</string> | ||
|
||
<!--Restore--> | ||
<!--AccessibilityService--> | ||
<string name="accessibility_service_description">"应用自动安装服务"</string> | ||
|
||
<!--DialogFragment--> | ||
<string name="done">"完成"</string> | ||
</resources> |
Oops, something went wrong.