Skip to content

Latest commit

 

History

History
107 lines (73 loc) · 2.86 KB

README.md

File metadata and controls

107 lines (73 loc) · 2.86 KB

newly 2

License: MIT kotlin Android

Newly is a drop in solution to add Twitter/Facebook/Linkedin style, new updates/tweets/posts available button. It can be used to notify user about new content availability and other actions by just calling methods in kotlin or java

ezgif com-resize

Requirements

  • Android Studio
  • Java
  • Kotlin
  • Android version 2.3 +

Installation

In your Project's build.gradle file:

	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

In your Application's or Module's build.gradle file:

	dependencies {
		        compile 'com.github.Auto-Droid:Newly:1.0'
		}

Initialize library using builder pattern.

In your Kotlin class:

class MainActivity : AppCompatActivity() , NewlyOnTouchListener {
  	.....
       
	override fun onNewlyTouchListener() {
		//TODO Newly popup clicked
	}
}
  var newly = Newly.Build(activity as MainActivity)
                    .setText("  ↑ New Tweets  ")
                    .setBackgroundDrawable(R.drawable.rectangle)
                    .setTextColor("#FFFFFF")
                    .setHeightOffset(250)
                    .build();
            newly.show()

In your Java class:

   public class HomeScreen extends AppCompatActivity implements NewlyOnTouchListener {
       .....
       
        @Override
    public void onNewlyTouchListener() {
	//TODO Newly popup clicked
    }
}  
   Newly newly = new Newly.Build(activity)
                .setBackgroundDrawable(R.drawable.rectangle)
                .setText("  ↑ New Tweets  ")
                .setTextColor("#FFFFFF")
                .setHeightOffset(250)
                .build();
        newly.show();

Ios compatible version

@Author Dhiraj Rajendra Jadhao : https://github.com/dhirajjadhao/Newly

LICENSE

This project is licensed under MIT LICENSE ,see the LICENSE.md file for details

@Contributor Advait Pakhode

Copyright © 2018 Sourabh Karkal (Auto-Droid)