Skip to content
This repository has been archived by the owner on Sep 3, 2023. It is now read-only.

Commit

Permalink
0.9.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
afollestad committed Aug 8, 2016
1 parent aecb567 commit cf8e9b0
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 25 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ You can create basic, list, single/multi choice, progress, input, etc. dialogs w
```gradle
dependencies {
// ... other dependencies here
compile 'com.afollestad.material-dialogs:core:0.8.6.2'
compile 'com.afollestad.material-dialogs:core:0.9.0.0'
}
```

Expand All @@ -112,7 +112,7 @@ The *commons* module contains extensions to the library that not everyone may ne
```gradle
dependencies {
// ... other dependencies here
compile 'com.afollestad.material-dialogs:commons:0.8.6.2'
compile 'com.afollestad.material-dialogs:commons:0.9.0.0'
}
```

Expand Down Expand Up @@ -490,18 +490,19 @@ You can also pass a literal integer array (`int[]`) in place of an array resourc
# Custom List Dialogs

Like Android's native dialogs, you can also pass in your own adapter via `.adapter()` to customize
exactly how you want your list to work. **Note that Material Dialogs only
exactly how you want your list to work.

```java
new MaterialDialog.Builder(this)
.title(R.string.socialNetworks)
// second parameter is an optional layout manager. Must be a LinearLayoutManager or GridLayoutManager.
.adapter(new ButtonItemAdapter(this, R.array.socialNetworks), null)
.show();
```

**Note** that with newer releases, Material Dialogs no longer supports `ListView` and `ListAdapter`.
It's about time that everyone uses `RecyclerView`. *Your custom adapters will have to handle item click
events on their own; this library's classes have some good examples of how that is done correctly.*
It's about time that everyone uses `RecyclerView`. **Your custom adapters will have to handle item click
events on their own; this library's classes and sample project have some good examples of how that is done correctly.**

If you need access to the `RecyclerView`, you can use the `MaterialDialog` instance:

Expand Down
Binary file modified sample/sample.apk
Binary file not shown.
2 changes: 1 addition & 1 deletion sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<application
android:allowBackup="false"
android:icon="@drawable/ic_launcher"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public void showBasicLongContent() {
@OnClick(R.id.basicIcon)
public void showBasicIcon() {
new MaterialDialog.Builder(this)
.iconRes(R.drawable.ic_launcher)
.iconRes(R.mipmap.ic_launcher)
.limitIconToDefaultSize() // limits the displayed icon size to 48dp
.title(R.string.useGoogleLocationServices)
.content(R.string.useGoogleLocationServicesPrompt)
Expand All @@ -160,7 +160,7 @@ public void showBasicIcon() {
@OnClick(R.id.basicCheckPrompt)
public void showBasicCheckPrompt() {
new MaterialDialog.Builder(this)
.iconRes(R.drawable.ic_launcher)
.iconRes(R.mipmap.ic_launcher)
.limitIconToDefaultSize()
.title(Html.fromHtml(getString(R.string.permissionSample, getString(R.string.app_name))))
.positiveText(R.string.allow)
Expand Down Expand Up @@ -507,10 +507,10 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {

int widgetColor = ThemeSingleton.get().widgetColor;
MDTintHelper.setTint(checkbox,
widgetColor == 0 ? ContextCompat.getColor(this, R.color.material_blue) : widgetColor);
widgetColor == 0 ? ContextCompat.getColor(this, R.color.accent) : widgetColor);

MDTintHelper.setTint(passwordInput,
widgetColor == 0 ? ContextCompat.getColor(this, R.color.material_blue) : widgetColor);
widgetColor == 0 ? ContextCompat.getColor(this, R.color.accent) : widgetColor);

dialog.show();
positiveAction.setEnabled(false); // disabled by default
Expand All @@ -520,7 +520,7 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
public void showCustomWebView() {
int accentColor = ThemeSingleton.get().widgetColor;
if (accentColor == 0)
accentColor = ContextCompat.getColor(this, R.color.material_blue);
accentColor = ContextCompat.getColor(this, R.color.accent);
ChangelogDialog.create(false, accentColor)
.show(getSupportFragmentManager(), "changelog");
}
Expand Down Expand Up @@ -602,7 +602,7 @@ public void showThemed() {
.titleColorRes(R.color.material_red_400)
.contentColorRes(android.R.color.white)
.backgroundColorRes(R.color.material_blue_grey_800)
.dividerColorRes(R.color.material_blue)
.dividerColorRes(R.color.accent)
.btnSelector(R.drawable.md_btn_selector_custom, DialogAction.POSITIVE)
.positiveColor(Color.WHITE)
.negativeColorAttr(android.R.attr.textColorSecondaryInverse)
Expand Down
Binary file removed sample/src/main/res/drawable-hdpi/ic_launcher.png
Binary file not shown.
Binary file removed sample/src/main/res/drawable-mdpi/ic_launcher.png
Binary file not shown.
Binary file removed sample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary file not shown.
Binary file removed sample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary file not shown.
Binary file not shown.
Binary file added sample/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sample/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sample/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sample/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions sample/src/main/res/values-v21/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

<!-- http://www.google.com/design/spec/style/color.html#color-color-palette -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/material_indigo_500</item>
<item name="colorPrimaryDark">@color/material_indigo_600</item>
<item name="colorAccent">@color/material_blue</item>
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primaryDark</item>
<item name="colorAccent">@color/accent</item>

<item name="android:navigationBarColor">@color/material_indigo_500</item>
<item name="android:navigationBarColor">@color/primary</item>
</style>

</resources>
6 changes: 3 additions & 3 deletions sample/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<resources>

<!-- http://www.google.com/design/spec/style/color.html#color-color-palette -->
<color name="material_indigo_500">#3F51B5</color>
<color name="material_indigo_600">#3949AB</color>
<color name="material_blue">#2196F3</color>
<color name="primary">#7B1FA2</color>
<color name="primaryDark">#6A1B9A</color>
<color name="accent">#DD2C00</color>
<color name="material_red_400">#EF5350</color>

</resources>
2 changes: 1 addition & 1 deletion sample/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<resources>

<string name="app_name">MaterialDialogs</string>
<string name="app_name">Material Dialogs</string>

<string name="agree">Agree</string>
<string name="disagree">Disagree</string>
Expand Down
6 changes: 3 additions & 3 deletions sample/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<!-- http://www.google.com/design/spec/style/color.html#color-color-palette -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/material_indigo_500</item>
<item name="colorPrimaryDark">@color/material_indigo_600</item>
<item name="colorAccent">@color/material_blue</item>
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primaryDark</item>
<item name="colorAccent">@color/accent</item>
</style>

<style name="SampleHeader">
Expand Down
2 changes: 1 addition & 1 deletion sample/src/main/res/xml-v11/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">

<com.afollestad.materialdialogs.prefs.MaterialDialogPreference
android:dialogIcon="@drawable/ic_launcher"
android:dialogIcon="@mipmap/ic_launcher"
android:dialogMessage="@string/preference_dialog_message"
android:dialogTitle="@string/preference_dialog_title"
android:key="unused_key00"
Expand Down
2 changes: 1 addition & 1 deletion sample/src/main/res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">

<com.afollestad.materialdialogs.prefs.MaterialDialogPreference
android:dialogIcon="@drawable/ic_launcher"
android:dialogIcon="@mipmap/ic_launcher"
android:dialogMessage="@string/preference_dialog_message"
android:dialogTitle="@string/preference_dialog_title"
android:key="unused_key00"
Expand Down

0 comments on commit cf8e9b0

Please sign in to comment.