-
Notifications
You must be signed in to change notification settings - Fork 496
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change dialog style during authing evernote
- Loading branch information
Showing
8 changed files
with
72 additions
and
6 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
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
33 changes: 33 additions & 0 deletions
33
evernote-sdk/src/main/java/com/evernote/client/view/ProgressDialog.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,33 @@ | ||
package com.evernote.client.view; | ||
|
||
import android.content.Context; | ||
import android.os.Bundle; | ||
import android.support.v7.app.AlertDialog; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
|
||
import com.evernote.androidsdk.R; | ||
import com.pnikosis.materialishprogress.ProgressWheel; | ||
|
||
|
||
/** | ||
* Created by lgp on 2015/8/22. | ||
*/ | ||
public class ProgressDialog extends AlertDialog { | ||
public ProgressDialog(Context context) { | ||
super(context, R.style.esdk_GreenDialogTheme); | ||
} | ||
|
||
public ProgressDialog(Context context, int theme) { | ||
super(context, theme); | ||
} | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
View view = LayoutInflater.from(getContext()).inflate(R.layout.dialog_progress, null); | ||
setView(view); | ||
ProgressWheel wheel = (ProgressWheel)view.findViewById(R.id.progress_wheel); | ||
wheel.spin(); | ||
super.onCreate(savedInstanceState); | ||
} | ||
} |
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,26 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:wheel="http://schemas.android.com/apk/res-auto" | ||
android:orientation="horizontal" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
<com.pnikosis.materialishprogress.ProgressWheel | ||
android:id="@+id/progress_wheel" | ||
android:layout_width="80dp" | ||
android:layout_height="80dp" | ||
android:layout_marginLeft="20dp" | ||
android:layout_marginTop="10dp" | ||
android:visibility="visible" | ||
android:layout_gravity="center" | ||
wheel:matProg_spinSpeed="1.2" | ||
wheel:matProg_barColor="#4CAF50" | ||
wheel:matProg_progressIndeterminate="true" /> | ||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center" | ||
android:paddingLeft="10dp" | ||
android:layout_marginTop="10dp" | ||
android:textSize="16sp" | ||
android:text="@string/esdk_loading"/> | ||
</LinearLayout> |
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,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<style name="esdk_GreenDialogTheme" parent="Theme.AppCompat.Light.Dialog"> | ||
<item name="colorPrimary">#4CAF50</item> | ||
<item name="colorPrimaryDark">#388E3C</item> | ||
<item name="colorAccent">#4CAF50</item> | ||
<item name="android:minWidth">200dp</item> | ||
</style> | ||
</resources> |