Skip to content

Commit faaf2b8

Browse files
committed
add toastUtil
1 parent 7f0463d commit faaf2b8

File tree

6 files changed

+22
-16
lines changed

6 files changed

+22
-16
lines changed

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ dependencies {
2626
androidTestImplementation 'com.android.support.test:runner:1.0.1'
2727
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
2828
compile project(':utils')
29+
compile 'com.github.RobertCow:mvp-master:1.0.1'
2930
}

app/src/main/java/soft/robert/com/githubdemo/MainActivity.java

Lines changed: 0 additions & 13 deletions
This file was deleted.

app/src/main/res/layout/activity_main.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
4-
xmlns:tools="http://schemas.android.com/tools"
54
android:layout_width="match_parent"
65
android:layout_height="match_parent"
7-
tools:context="soft.robert.com.githubdemo.MainActivity">
6+
>
87

98
<TextView
109
android:layout_width="wrap_content"

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ allprojects {
2020
repositories {
2121
google()
2222
jcenter()
23+
maven { url 'https://jitpack.io' }
2324
}
2425
}
2526

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package soft.robert.com.utils;
2+
3+
import android.content.Context;
4+
import android.widget.Toast;
5+
6+
/**
7+
* Created on 2017/12/21.
8+
*
9+
* @author cpf
10+
* @2227039052@qq.com
11+
*/
12+
13+
public class ToastUtil {
14+
15+
public void toast(Context context,String str){
16+
Toast.makeText(context, str, Toast.LENGTH_SHORT).show();
17+
}
18+
}

0 commit comments

Comments
 (0)