forked from wenmingvs/WeiBo
-
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
郭文明
committed
Sep 2, 2016
1 parent
0c04fd3
commit 2bbc3c6
Showing
24 changed files
with
184 additions
and
96 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
28 changes: 28 additions & 0 deletions
28
...ain/java/com/wenming/weiswift/ui/login/fragment/home/imagedetaillist/SaveImageDialog.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,28 @@ | ||
package com.wenming.weiswift.ui.login.fragment.home.imagedetaillist; | ||
|
||
import android.content.Context; | ||
import android.os.Vibrator; | ||
import android.view.Gravity; | ||
import android.view.ViewGroup; | ||
|
||
import com.wenming.weiswift.utils.DensityUtil; | ||
import com.wenming.weiswift.utils.ScreenUtil; | ||
|
||
/** | ||
* Created by wenmingvs on 16/9/2. | ||
*/ | ||
public class SaveImageDialog { | ||
|
||
public static void showDialog(String url, Context context) { | ||
ImageDetailDialog dialog = new ImageDetailDialog(url, context); | ||
if (dialog.isShowing()) { | ||
dialog.dismiss(); | ||
} else { | ||
Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE); | ||
vibrator.vibrate(50); | ||
dialog.show(); | ||
dialog.getWindow().setLayout((ViewGroup.LayoutParams.MATCH_PARENT), (ViewGroup.LayoutParams.WRAP_CONTENT)); | ||
dialog.getWindow().setGravity(Gravity.BOTTOM); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.