Skip to content

Example 3

M. Emre Davarcı edited this page Jun 4, 2017 · 4 revisions
/*
* rl is the layout we are working on.
*/
RelativeLayout rl = (RelativeLayout) findViewById(R.id.myLayout) ;

Noty.init(MainActivity.this, "This app needs to be updated. Please download the latest version.", rl,
          Noty.WarningStyle.ACTION)
          .setActionText("OK")
          .setHeight(new RelativeLayout.LayoutParams(0, ViewGroup.LayoutParams.WRAP_CONTENT))
          .setWarningBoxBgColor("#00b8e6")
          .setWarningTappedColor("#00ccff")
          .setWarningBoxMargins(40,0,40,0)
          .setWarningBoxPosition(Noty.WarningPos.CENTER)
          .setAnimation(Noty.RevealAnim.FADE_IN, Noty.DismissAnim.FADE_OUT, 400,400)
          .show();

Clone this wiki locally