congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
FancyButton.setLayoutParams
Code IndexAdd Tabnine to your IDE (free)

How to use
setLayoutParams
method
in
mehdi.sakout.fancybuttons.FancyButton

Best Java code snippets using mehdi.sakout.fancybuttons.FancyButton.setLayoutParams (Showing top 2 results out of 315)

origin: medyo/Fancybuttons

/**
 * Initialize button container
 */
private void initializeButtonContainer() {
  if (mIconPosition == POSITION_TOP || mIconPosition == POSITION_BOTTOM) {
    this.setOrientation(LinearLayout.VERTICAL);
  } else {
    this.setOrientation(LinearLayout.HORIZONTAL);
  }
  if (this.getLayoutParams() == null) {
    LayoutParams containerParams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
    this.setLayoutParams(containerParams);
  }
  this.setGravity(Gravity.CENTER);
  // disable click listeners for fix bug in this issue as: 
  // https://github.com/medyo/Fancybuttons/issues/100 
  //this.setClickable(true);
  //this.setFocusable(true);
   if(mIconResource==null && mFontIcon==null && getPaddingLeft()==0 && getPaddingRight()==0 && getPaddingTop()==0 && getPaddingBottom()==0){
    //fix for all version of androids and screens 
    this.setPadding(20, 0, 20, 0);
   }
}
origin: medyo/Fancybuttons

signupBtn.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));
signupBtn.setText("Repost the song");
signupBtn.setIconResource(R.drawable.soundcloud);
mehdi.sakout.fancybuttonsFancyButtonsetLayoutParams

Popular methods of FancyButton

  • setText
    Set Text of the button
  • <init>
    Default constructor called from Layouts
  • addView
  • applyRadius
    This method applies radius to the drawable corners Specify radius for each corner if radius attribut
  • getContext
  • getLayoutParams
  • getPaddingBottom
  • getPaddingLeft
  • getPaddingRight
  • getPaddingTop
  • getResources
  • getRippleDrawable
  • getResources,
  • getRippleDrawable,
  • getTypeface,
  • initAttributesArray,
  • initializeButtonContainer,
  • initializeFancyButton,
  • isEnabled,
  • isInEditMode,
  • removeAllViews

Popular in Java

  • Updating database using SQL prepared statement
  • getExternalFilesDir (Context)
  • compareTo (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now