Skip to content

Commit

Permalink
Bumped V 1.1.5(API MIN 18)
Browse files Browse the repository at this point in the history
  • Loading branch information
muigukenneth committed Oct 25, 2019
1 parent e4049a5 commit 71cf699
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ class ElegantDialog(private val mContext: Context?) {
mDialog.requestWindowFeature(Window.FEATURE_NO_TITLE)
mDialog.setContentView(R.layout.dialog_elegant)
}

/** Set Your custom View.
* Can be any type of view we will compensate the min height*/
fun setCustomView(layout: Int): ElegantDialog {
if (mDialog != null && mContext != null) {
val stub = mDialog.layoutStub
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<vector android:height="260dp" android:viewportHeight="24.0"
android:viewportWidth="24.0" android:width="260dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@color/md_white_1000" android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
<path android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
</vector>
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.gurutouchlabs.kenneth.elegantdialogapp

import org.junit.Assert.assertEquals
import org.junit.Test

import org.junit.Assert.*

/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
/** Testing.*/
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
Expand Down
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ dependencies {
## Features

Here are some fancy stuff:
*Top background customization
*Bottom background customization
*Custom layout(RecyclerView etc)
*Custom icons(buttons and title)
*Color customizations (Icons and Text)
*Text customizations (Buttons, title and content)
*Custom fonts (title and content)
*Image loading using Glide or Picasso
* Top background customization
* Bottom background customization
* Custom layout(RecyclerView etc)
* Custom icons(buttons and title)
* Color customizations (Icons and Text)
* Text customizations (Buttons, title and content)
* Custom fonts (title and content)
* Image loading using Glide or Picasso

## How to use ElegantDialog

Expand Down Expand Up @@ -84,7 +84,8 @@ Simple use cases looks like this:

// Now for the title, content and buttons customisations
if (dialog.getTitleIconView() != null) {
// You can use glide or picasso to display your own title image. Note Do not pass an icon drawable at setTitleIcon(titleIcon)
// You can use glide or picasso to display your own title image.
// Please Note do not pass an icon drawable at setTitleIcon(titleIcon)
val imageUrl = R.drawable.face
Glide.with(this).load(imageUrl)
.transition(ImageUtils.requestAvatarTransitionOptions())
Expand Down Expand Up @@ -140,7 +141,7 @@ If you want to achieve button left and right gravity :
### Pull requests are welcome!

Feel free to contribute to ElegantDialog. Just create a pull request for:
*Bug fixes
*New features
*Code optimizations
* Bug fixes
* New features
* Code optimizations

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import org.junit.runner.RunWith
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
/** SFor testing purposes.*/
/** For testing purposes.*/
@Test
fun useAppContext() {
// Context of the app under test.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class MainActivity : AppCompatActivity() {
setUpTabViewPager()
viewPager.offscreenPageLimit = 2
}
/** Set up the ViewPager.*/

private fun setUpViewPager() {
val fragments = ArrayList<Fragment>()
fragments.add(DefaultDialogFragment())
Expand All @@ -38,7 +38,7 @@ class MainActivity : AppCompatActivity() {
}
viewPager.adapter = adapter
}
/** Set up the tabView.*/

private fun setUpTabViewPager() {
val titles = ArrayList<String>()
titles.add(resources.getString(R.string.default_dialog))
Expand All @@ -52,7 +52,7 @@ class MainActivity : AppCompatActivity() {
tab.text = titles[pos]
}
}
/** Set up tabView Animation.*/

private fun animationInfo(color: Int): ViewIdAnimationInfoSet =
viewIdAnimationInfo {
animateText<Float> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class YourPickAdapter(private val context: Context, private val picks: List<Int>

/** Set up the click listener interface.*/
interface YourPickClickListener {
/** Called when you click on view.*/
fun onYourPickClickListener(colorCode: Int)
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.gurutouchlabs.kenneth.elegantdialogapp

import org.junit.Assert.assertEquals
import org.junit.Test

import org.junit.Assert.*

/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
/** Testing.*/
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
Expand Down

0 comments on commit 71cf699

Please sign in to comment.