diff --git a/example/build.gradle b/example/build.gradle index 4ea626c..480a3e5 100644 --- a/example/build.gradle +++ b/example/build.gradle @@ -5,7 +5,7 @@ android { buildToolsVersion "25.0.2" defaultConfig { applicationId "com.goodiebag.pinview.example" - minSdkVersion 21 + minSdkVersion 15 targetSdkVersion 25 versionCode 1 versionName "1.0" diff --git a/example/src/main/java/com/goodiebag/pinview/example/MainActivity.java b/example/src/main/java/com/goodiebag/pinview/example/MainActivity.java index 1d8b8c2..ac8d515 100644 --- a/example/src/main/java/com/goodiebag/pinview/example/MainActivity.java +++ b/example/src/main/java/com/goodiebag/pinview/example/MainActivity.java @@ -19,29 +19,5 @@ public class MainActivity extends AppCompatActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); - LinearLayout linearLayout = (LinearLayout) findViewById(R.id.activity_main); - pinview1 = (Pinview) findViewById(R.id.pinview1); - pinview2 = (Pinview) findViewById(R.id.pinview2); - pinview3 = (Pinview) findViewById(R.id.pinview3); - pinview4 = (Pinview) findViewById(R.id.pinview4); - b = (Button) findViewById(R.id.btn); - b.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { -// int random = ThreadLocalRandom.current().nextInt(50, 60); -// random*=getResources().getDisplayMetrics().density; -// Log.d("random", "" + random); -// pinview1.setPinWidth(random); -// pinview2.setPinWidth(random); -// pinview3.setPinWidth(random); -// pinview4.setPinWidth(random); - - pinview1.setPinBackgroundRes(R.drawable.sample_background); - pinview1.setInputType(Pinview.InputType.TEXT); - pinview2.setPassword(!pinview2.isPassword()); - pinview3.setPassword(!pinview3.isPassword()); - pinview4.setPassword(!pinview4.isPassword()); - } - }); } } diff --git a/example/src/main/res/layout/activity_main.xml b/example/src/main/res/layout/activity_main.xml index 61bddfc..ce1535d 100644 --- a/example/src/main/res/layout/activity_main.xml +++ b/example/src/main/res/layout/activity_main.xml @@ -11,17 +11,14 @@ android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin"> -