Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

android view set border programmatically

    //use a GradientDrawable with only one color set, to make it a solid color
    GradientDrawable border = new GradientDrawable();
    border.setColor(0xFFFFFFFF); //white background
    border.setStroke(1, 0xFF000000); //black border with full opacity
    if(Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
      TitleLayout.setBackgroundDrawable(border);
    } else {
      TitleLayout.setBackground(border);
    }
Comment

PREVIOUS NEXT
Code Example
Java :: how to find the size of a queue in java 
Java :: hadoop-master error java_home is not set and could not be found 
Java :: java get length of a string 
Java :: okhttp3 library in android studio 
Java :: java how to compare strings 
Java :: java check palindrome with string builder 
Java :: parse object to int java 
Java :: java integer division tofloat 
Java :: 123 movies 
Java :: string format java 
Java :: get device token firebase 
Java :: generating random number 
Java :: how to operate on values from different classes in java 
Java :: java generate random integer in range 
Java :: convert two bytes to int java 
Java :: string to int in java 
Java :: java program for multiplication table 
Java :: java letter alphabet index 
Java :: spring boot access images in resources folder 
Java :: how to change tablayout current view position in android 
Java :: HUFFMAN CODING IN JAVA 
Java :: Java loop throug gson JsonElement 
Java :: java program to remove duplicate words in a string 
Java :: arraylist to linkedlist java 
Java :: read wss endpoint java 
Java :: add custom font to android paint object 
Java :: convert java to c# 
Java :: how to get a character in java in ascii 
Java :: java actionevent 
Java :: reverse number in java 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =