public class

CustomLinearLayout

extends LinearLayout
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.LinearLayout
         ↳ com.sap.cloud.mobile.fiori.common.CustomLinearLayout

Class Overview

This is a Customization of LiniearLayout with different style values. This can be used for giving diferent boundary style appearance based on the difeernt states.

Summary

Nested Classes
enum CustomLinearLayout.STATE  
[Expand]
Inherited Constants
From class android.widget.LinearLayout
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
CustomLinearLayout(Context context)
Custructor
CustomLinearLayout(Context context, AttributeSet attrs)
Custructor
CustomLinearLayout(Context context, AttributeSet attrs, int defStyleAttr)
Custructor
CustomLinearLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Custructor
Public Methods
int getState()
Get the current state value
void setDisabledState(boolean disabled, boolean editable)
Put the state to STATE_DISABLED_EDITABLE or STATE_DISABLED_NON_EDITABLE or to true or false
void setEditFocusedState(boolean editFocusedState)
Put the state to STATE_FOCUSED
void setNonEditableState(boolean nonEditableState)
Set to STATE_NON_EDITABLE true or false
void setSate(int state)
Sets a new state
void setSelectedErrorState(boolean errorState)
Put the state to STATE_ERROR_SELECTED
void setUnSelectedErrorState(boolean errorState)
Put the state to STATE_ERROR_UNSELECTED
Protected Methods
int[] onCreateDrawableState(int extraSpace)
This overriding is to enable custom state
[Expand]
Inherited Methods
From class android.widget.LinearLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource

Public Constructors

public CustomLinearLayout (Context context)

Custructor

public CustomLinearLayout (Context context, AttributeSet attrs)

Custructor

public CustomLinearLayout (Context context, AttributeSet attrs, int defStyleAttr)

Custructor

public CustomLinearLayout (Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)

Custructor

Public Methods

public int getState ()

Get the current state value

public void setDisabledState (boolean disabled, boolean editable)

Put the state to STATE_DISABLED_EDITABLE or STATE_DISABLED_NON_EDITABLE or to true or false

Parameters
disabled if disabled true or false
editable is the layout is editable or not

public void setEditFocusedState (boolean editFocusedState)

Put the state to STATE_FOCUSED

Parameters
editFocusedState true or false for STATE_FOCUSED

public void setNonEditableState (boolean nonEditableState)

Set to STATE_NON_EDITABLE true or false

Parameters
nonEditableState true or false value

public void setSate (int state)

Sets a new state

Parameters
state new state value to be set

public void setSelectedErrorState (boolean errorState)

Put the state to STATE_ERROR_SELECTED

Parameters
errorState true or false state where STATE_ERROR_SELECTED is put

public void setUnSelectedErrorState (boolean errorState)

Put the state to STATE_ERROR_UNSELECTED

Parameters
errorState if true or false for the STATE_ERROR_UNSELECTED state

Protected Methods

protected int[] onCreateDrawableState (int extraSpace)

This overriding is to enable custom state