B4A Library bcMaterial - A Community Material wrapper - open source

DonManfred

Expert
Licensed User
bcMaterial
Author:
B4A Community
Version: 0.05

This is a wrapper for this github project from Rey Pham.

The Original Library is a HUGE one. I started to wrap it weeks ago. It is MUCH work. Some things i cannot get to work. Maybe YOU can and want to contribute to this?

There is still a lot to do. Not all of the original lib is wrapped as yet.

The complete wrappersource is on Github too so anybody can do work on this and add new Objects or even better ones if he want.

Here you can get into the bcMaterial project on github.

The complete xml2bbcode is too much to post in one threadpost. I need to make additional Posts for the documentations...


Known problems:
- The EditTextwrapper is written but it is NOT tested as yet. There may be bugs which needs to be fixed.






 

Attachments

Last edited:

DonManfred

Expert
Licensed User
bcArrowDrawable
Methods:

  • Initialize (EventName As String)
  • isRunning As Boolean
  • mutate As Drawable
  • setMode (mode As Int, animation As Boolean)
  • start
  • stop
Properties:
  • Color As ColorStateList [write only]
  • Current As Drawable [read only]
  • Mode As Int [read only]
  • Opacity As Int [read only]


[*]bcButton
Fields:

  • ba As BA
Methods:
  • AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int)
  • BringToFront
  • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
  • Initialize (EventName As String)
  • Invalidate
  • Invalidate2 (arg0 As Rect)
  • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
  • IsInitialized As Boolean
  • RemoveView
  • RequestFocus As Boolean
  • SendToBack
  • SetBackgroundImage (arg0 As Bitmap)
  • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
  • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
  • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
  • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
Properties:
  • Background As Drawable
  • Color As Int [write only]
  • Enabled As Boolean
  • Height As Int
  • Left As Int
  • Tag As Object
  • Text As String [write only]
  • TextColor As Int [write only]
  • Textsize As Int [write only]
  • Top As Int
  • Visible As Boolean
  • Width As Int




[*]bcCheckBox
Events:

  • onCheckedChanged (tag as Object As , checked As Boolean)
Fields:
  • ba As BA
Methods:
  • AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int)
  • BringToFront
  • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
  • Initialize (EventName As String)
  • Invalidate
  • Invalidate2 (arg0 As Rect)
  • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
  • IsInitialized As Boolean
  • RemoveView
  • RequestFocus As Boolean
  • SendToBack
  • SetBackgroundImage (arg0 As Bitmap)
  • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
  • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
  • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
  • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
Properties:
  • Background As Drawable
  • Checked As Boolean
  • Color As Int [write only]
  • Enabled As Boolean
  • Height As Int
  • Left As Int
  • Tag As Object
  • Text As String [write only]
  • TextColor As Int [write only]
  • Textsize As Int [write only]
  • Top As Int
  • Visible As Boolean
  • Width As Int
 

DonManfred

Expert
Licensed User
[*]bcCircularProgressView
Events:

  • onCheckedChanged (tag as Object As , checked As Boolean)
Methods:
  • AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int)
  • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
  • Initialize (EventName As String, type As Int)
  • IsInitialized As Boolean
  • isAutostart As Boolean
  • start
  • stop
Properties:
  • Autostart As Boolean [write only]
  • Colors()() As Int
  • Left As Int
  • Progress As Float
  • ProgressDrawable As Drawable [read only]
  • ProgressMode As Int [read only]
  • SecondaryProgress As Float
  • Tag As Object
  • Top As Int
  • mProgressId As Int
 

DonManfred

Expert
Licensed User
[*]bcEditText
Events:

  • onfocuschange (v As Object, focused As Boolean)
  • onselectionchanged (v As Object, selStart As Int, selEnd As Int)
Fields:
  • ba As BA
Methods:
  • AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int)
  • BringToFront
  • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
  • Initialize (EventName As String)
  • Invalidate
  • Invalidate2 (arg0 As Rect)
  • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
  • IsInitialized As Boolean
  • RemoveView
  • RequestFocus As Boolean
  • SendToBack
  • SetBackgroundImage (arg0 As Bitmap)
  • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
  • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
  • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
  • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
  • append (text As CharSequence)
    Convenience method: Append the specified text to the TextView's display
    buffer, upgrading it to BufferType.EDITABLE if it was not already editable.
  • appendAt (text As CharSequence, start As Int, end As Int)
    Convenience method: Append the specified text slice to the TextView's
    display buffer, upgrading it to BufferType.EDITABLE if it was not already
    editable.
  • beginBatchEdit
  • bringPointIntoView (offset As Int) As Boolean
    Move the point, specified by the offset, into the view if it is needed.
    This has to be called after layout. Returns true if anything changed.
  • canCopy As Boolean
  • canCut As Boolean
  • canPaste As Boolean
  • cancelLongPress
  • clearComposingText
    Use
    {@link android.view.inputmethod.BaseInputConnection#removeComposingSpans
    BaseInputConnection.removeComposingSpans()} to remove any IME composing
    state from this text view.
  • clearError
  • clearFocus
  • clearListSelection
    <p>
    Clear the list selection. This may only be temporary, as user input will
    often bring it back.
    <p>
    Only work when autoCompleMode is AUTOCOMPLETE_MODE_SINGLE or
    AUTOCOMPLETE_MODE_MULTI
    </p>
  • didTouchFocusSelect As Boolean
    Returns true, only while processing a touch gesture, if the initial touch
    down event caused focus to move to the text view and as a result its
    selection changed. Only valid while processing the touch gesture of
    interest, in an editable text view.
  • dismissDropDown
    <p>
    Closes the drop down if present on screen.
    </p>
    <p>
    Only work when autoCompleMode is AUTOCOMPLETE_MODE_SINGLE or
    AUTOCOMPLETE_MODE_MULTI
    </p>
  • endBatchEdit
  • enoughToFilter As Boolean
    Returns <code>true</code> if the amount of text in the field meets or
    exceeds the {@link #getThreshold} requirement. You can override this to
    impose a different standard for when filtering will be triggered.
    <p>
    Only work when autoCompleMode is AUTOCOMPLETE_MODE_SINGLE or
    AUTOCOMPLETE_MODE_MULTI
    </p>
  • extendSelection (index As Int)
    Convenience for {@link android.text.Selection#extendSelection}.
  • getInputExtras (create As Boolean) As Bundle
    Retrieve the input extras currently associated with the text view, which
    can be viewed as well as modified.
    create: If true, the extras will be created if they don't already exist.
    Otherwise, null will be returned if none have been created.
  • getLineBounds (line As Int, bounds As Rect) As Int
    Return the baseline for the specified line (0...getLineCount() - 1) If
    bounds is not null, return the top, left, right, bottom extents of the
    specified line in it. If the internal Layout has not been built, return 0
    and set bounds to (0, 0, 0, 0)
    line: which line to examine (0..getLineCount() - 1)
    bounds: Optional. If not null, it returns the extent of the line
    Return type: @return:the Y-coordinate of the baseline
  • getOffsetForPosition (x As Float, y As Float) As Int
    Get the character offset closest to the specified absolute position. A
    typical use case is to pass the result of
    {@link android.view.MotionEvent#getX()} and
    {@link android.view.MotionEvent#getY()} to this method.
    x: The horizontal absolute position of a point on screen
    y: The vertical absolute position of a point on screen
    Return type: @return:the character offset for the character whose position is closest to
    the specified position. Returns -1 if there is no layout.
  • hasSelection As Boolean
    Return true iff there is a selection inside this text view.
  • isCursorVisible As Boolean

    Return type: @return:whether or not the cursor is visible (assuming this TextView is
    editable)
  • isInputMethodTarget As Boolean
    Returns whether this text view is a current input method target. The
    default implementation just checks with
    {@link android.view.inputmethod.InputMethodManager}.
  • isPerformingCompletion As Boolean
    Identifies whether the view is currently performing a text completion, so
    subclasses can decide whether to respond to text changed events.
    <p>
    Only work when autoCompleMode is AUTOCOMPLETE_MODE_SINGLE or
    AUTOCOMPLETE_MODE_MULTI
    </p>
  • isPopupShowing As Boolean
    <p>
    Indicates whether the popup menu is showing.
    </p>
    <p>
    Only work when autoCompleMode is AUTOCOMPLETE_MODE_SINGLE or
    AUTOCOMPLETE_MODE_MULTI
    </p>
    Return type: @return:true if the popup menu is showing, false otherwise
  • isSuggestionsEnabled As Boolean
    Return whether or not suggestions are enabled on this TextView. The
    suggestions are generated by the IME or by the spell checker as the user
    types. This is done by adding {@link android.text.style.SuggestionSpan}s to
    the text.

    When suggestions are enabled (default), this list of suggestions will be
    displayed when the user asks for them on these parts of the text. This
    value depends on the inputType of this TextView.

    The class of the input type must be
    {@link android.text.InputType#TYPE_CLASS_TEXT}.

    In addition, the type variation must be one of
    {@link android.text.InputType#TYPE_TEXT_VARIATION_NORMAL},
    {@link android.text.InputType#TYPE_TEXT_VARIATION_EMAIL_SUBJECT},
    {@link android.text.InputType#TYPE_TEXT_VARIATION_LONG_MESSAGE},
    {@link android.text.InputType#TYPE_TEXT_VARIATION_SHORT_MESSAGE} or
    {@link android.text.InputType#TYPE_TEXT_VARIATION_WEB_EDIT_TEXT}.

    And finally, the
    {@link android.text.InputType#TYPE_TEXT_FLAG_NO_SUGGESTIONS} flag must
    <i>not</i> be set.
    Return type: @return:true if the suggestions popup window is enabled, based on the
    inputType.
  • isTextSelectable As Boolean
    Returns the state of the {@code textIsSelectable} flag (See
    {@link #setTextIsSelectable setTextIsSelectable()}). Although you have to
    set this flag to allow users to select and copy text in a non-editable
    TextView, the content of an {@link EditText} can always be selected,
    independently of the value of this flag.
    <p>
    Return type: @return:True if the text displayed in this TextView can be selected by the
    user.
  • length As Int
    Returns the length, in characters, of the text managed by this TextView
  • moveCursorToVisibleOffset As Boolean
    Move the cursor, if needed, so that it is at an offset that is visible to
    the user. This will not move the cursor if it represents more than one
    character (a selection range). This will only work if the TextView contains
    spannable text; otherwise it will do nothing.
    Return type: @return:True if the cursor was actually moved, false otherwise.
  • onFilterComplete (count As Int)
    <p>
    Only work when autoCompleMode is AUTOCOMPLETE_MODE_SINGLE or
    AUTOCOMPLETE_MODE_MULTI
    </p>
  • performCompletion
    <p>
    Performs the text completion by converting the selected item from the drop
    down list into a string, replacing the text box's content with this string
    and finally dismissing the drop down menu.
    </p>
    <p>
    Only work when autoCompleMode is AUTOCOMPLETE_MODE_SINGLE or
    AUTOCOMPLETE_MODE_MULTI
    </p>
  • selectAll
  • setImeActionLabel (label As CharSequence, actionId As Int)
    Change the custom IME action associated with the text view, which will be
    reported to an IME with
    {@link android.view.inputmethod.EditorInfo#actionLabel} and
    {@link android.view.inputmethod.EditorInfo#actionId} when it has focus.
  • setLineSpacing (add As Float, mult As Float)
    Sets line spacing for this TextView. Each line will have its height
    multiplied by <code>mult</code> and have <code>add</code> added to it.
  • setSelection (start As Int, stop As Int)
    Convenience for
    {@link android.text.Selection#setSelection(android.text.Spannable, int, int)}
    .
  • setShadowLayer (radius As Float, dx As Float, dy As Float, color As Int)
    Gives the text a shadow of the specified blur radius and color, the
    specified distance from its drawn position.
    <p>
    The text shadow produced does not interact with the properties on view that
    are responsible for real time shadows,
    {@link android.view.View#getElevation() elevation} and
    {@link android.view.View#getTranslationZ() translationZ}.
  • setSingleLine
    Sets the properties of this field (lines, horizontally scrolling,
    transformation method) to be for a single-line input.
  • setTypeface2 (tf As Typeface, style As Int)
    Sets the typeface and style in which the text should be displayed, and
    turns on the fake bold and italic bits in the Paint if the Typeface that
    you provided does not have all the bits in the style that you specified.
  • showDropDown
    <p>
    Displays the drop down on screen.
    </p>
    <p>
    Only work when autoCompleMode is AUTOCOMPLETE_MODE_SINGLE or
    AUTOCOMPLETE_MODE_MULTI
    </p>
Properties:
  • AllCaps As Boolean [write only]
    Sets the properties of this field to transform input to ALL CAPS display.
    This may use a "small caps" formatting if available. This setting will be
    ignored if this field is editable or selectable.

    This call replaces the current transformation method. Disabling this will
    not necessarily restore the previous behavior from before this was enabled.
  • AutoLinkMask As Int
    Gets the autolink mask of the text. See
    {@link android.text.util.Linkify#ALL Linkify.ALL} and peers for possible
    values.
  • Background As Drawable
  • BackgroundColor As Int [write only]
  • Color As Int [write only]
  • CompletionHint As CharSequence
    Gets the optional hint text displayed at the bottom of the the matching
    list.
    <p>
    Only work when autoCompleMode is AUTOCOMPLETE_MODE_SINGLE or
    AUTOCOMPLETE_MODE_MULTI
    </p>
  • CompoundDrawablePadding As Int
    Returns the padding between the compound drawables and the text.
  • CompoundPaddingBottom As Int [read only]
    Returns the bottom padding of the view, plus space for the bottom Drawable
    if any.
  • CompoundPaddingEnd As Int [read only]
    Returns the end padding of the view, plus space for the end Drawable if
    any.
  • CompoundPaddingLeft As Int [read only]
    Returns the left padding of the view, plus space for the left Drawable if
    any.
  • CompoundPaddingRight As Int [read only]
    Returns the right padding of the view, plus space for the right Drawable if
    any.
  • CompoundPaddingStart As Int [read only]
    Returns the start padding of the view, plus space for the start Drawable if
    any.
  • CompoundPaddingTop As Int [read only]
    Returns the top padding of the view, plus space for the top Drawable if
    any.
  • CurrentHintTextColor As Int [read only]
    <p>
    Return the current color selected to paint the hint text.
    </p>
  • CurrentTextColor As Int [read only]
    <p>
    Return the current color selected for normal text.
    </p>
  • CursorVisible As Boolean [write only]
    Set whether the cursor is visible. The default is true. Note that this
    property only makes sense for editable TextView.
  • DropDownAnchor As Int
    <p>
    Returns the id for the view that the auto-complete drop down list is
    anchored to.
    </p>
    <p>
    Only work when autoCompleMode is AUTOCOMPLETE_MODE_SINGLE or
    AUTOCOMPLETE_MODE_MULTI
    </p>
  • DropDownBackground As Drawable [read only]
    <p>
    Gets the background of the auto-complete drop-down list.
    </p>
    <p>
    Only work when autoCompleMode is AUTOCOMPLETE_MODE_SINGLE or
    AUTOCOMPLETE_MODE_MULTI
    </p>
  • DropDownBackgroundDrawable As Drawable [write only]
    <p>
    Sets the background of the auto-complete drop-down list.
    </p>
    <p>
    Only work when autoCompleMode is AUTOCOMPLETE_MODE_SINGLE or
    AUTOCOMPLETE_MODE_MULTI
    </p>
  • DropDownHeight As Int
    <p>
    Returns the current height for the auto-complete drop down list. This can
    be a fixed height, or {@link ViewGroup.LayoutParams#MATCH_PARENT} to fill
    the screen, or {@link ViewGroup.LayoutParams#WRAP_CONTENT} to fit the
    height of the drop down's content.
    </p>
    <p>
    Only work when autoCompleMode is AUTOCOMPLETE_MODE_SINGLE or
    AUTOCOMPLETE_MODE_MULTI
    </p>
  • DropDownHorizontalOffset As Int
    <p>
    Gets the horizontal offset used for the auto-complete drop-down list.
    </p>
    <p>
    Only work when autoCompleMode is AUTOCOMPLETE_MODE_SINGLE or
    AUTOCOMPLETE_MODE_MULTI
    </p>
  • DropDownVerticalOffset As Int
    <p>
    Gets the vertical offset used for the auto-complete drop-down list.
    </p>
    <p>
    Only work when autoCompleMode is AUTOCOMPLETE_MODE_SINGLE or
    AUTOCOMPLETE_MODE_MULTI
    </p>
  • DropDownWidth As Int
    <p>
    Returns the current width for the auto-complete drop down list. This can be
    a fixed width, or {@link ViewGroup.LayoutParams#MATCH_PARENT} to fill the
    screen, or {@link ViewGroup.LayoutParams#WRAP_CONTENT} to fit the width of
    its anchor view.
    </p>
    <p>
    Only work when autoCompleMode is AUTOCOMPLETE_MODE_SINGLE or
    AUTOCOMPLETE_MODE_MULTI
    </p>
  • EditableText As Editable [read only]
    Return the text the TextView is displaying as an Editable object. If the
    text is not editable, null is returned.
  • Ellipsize As TruncateAt [read only]
    Returns where, if anywhere, words that are longer than the view is wide
    should be ellipsized.
  • Enabled As Boolean
  • Error As CharSequence
  • ExtendedPaddingBottom As Int [read only]
    Returns the extended bottom padding of the view, including both the bottom
    Drawable if any and any extra space to keep more than maxLines of text from
    showing. It is only valid to call this after measuring.
  • ExtendedPaddingTop As Int [read only]
    Returns the extended top padding of the view, including both the top
    Drawable if any and any extra space to keep more than maxLines of text from
    showing. It is only valid to call this after measuring.
  • Filters()() As InputFilter
    Returns the current list of input filters.
  • FontFeatureSettings As String [write only]
    Sets font feature settings. The format is the same as the CSS
    font-feature-settings attribute:
    http://dev.w3.org/csswg/css-fonts/#propdef-font-feature-settings
  • FreezesText As Boolean
    Return whether this text view is including its entire text contents in
    frozen icicles.
  • Gravity As Int
    Returns the horizontal and vertical alignment of this TextView.
  • Height As Int
  • Helper As CharSequence
  • HighlightColor As Int
    Sets the color used to display the selection highlight.
  • Hint As CharSequence
    Returns the hint that is displayed when the text of the TextView is empty.
  • HintTextColor As ColorStateList [write only]
    Sets the color of the hint text.
  • HintTextColors As ColorStateList [read only]
  • HorizontallyScrolling As Boolean [write only]
    Sets whether the text should be allowed to be wider than the View is. If
    false, it will be wrapped to the width of the View.
  • ImeActionId As Int [read only]
    Get the IME action ID previous set with {@link #setImeActionLabel}.
  • ImeActionLabel As CharSequence [read only]
    Get the IME action label previous set with {@link #setImeActionLabel}.
  • ImeOptions As Int
    Get the type of the IME editor.
  • IncludeFontPadding As Boolean [write only]
    Set whether the TextView includes extra top and bottom padding to make room
    for accents that go above the normal ascent and descent. The default is
    true.
  • InputType As Int
    Get the type of the editable content.
  • Left As Int
  • LetterSpacing As Float [write only]
    Sets text letter-spacing. The value is in 'EM' units. Typical values for
    slight expansion will be around 0.05. Negative values tighten text.
  • LineCount As Int [read only]
    Return the number of lines of text, or 0 if the internal Layout has not
    been built.
  • LineHeight As Int [read only]
  • LineSpacingExtra As Float [read only]
    Gets the line spacing extra space
  • LineSpacingMultiplier As Float [read only]
    Gets the line spacing multiplier
  • Lines As Int [write only]
    Makes the TextView exactly this many lines tall.

    Note that setting this value overrides any other (minimum / maximum) number
    of lines or height setting. A single line TextView will set this value to
    1.
  • LinkTextColor As ColorStateList [write only]
    Sets the color of links in the text.
  • LinkTextColors As ColorStateList [read only]
  • LinksClickable As Boolean
    Returns whether the movement method will automatically be set to
    {@link android.text.method.LinkMovementMethod} if {@link #setAutoLinkMask}
    has been set to nonzero and links are detected in {@link #setText}. The
    default is true.
  • ListSelection As Int
    Get the position of the dropdown view selection, if there is one. Returns
    {@link android.widget.ListView#INVALID_POSITION ListView.INVALID_POSITION}
    if there is no dropdown or if there is no selection.
    <p>
    Only work when autoCompleMode is AUTOCOMPLETE_MODE_SINGLE or
    AUTOCOMPLETE_MODE_MULTI
    </p>
  • MarqueeRepeatLimit As Int
    Gets the number of times the marquee animation is repeated. Only meaningful
    if the TextView has marquee enabled.
  • MaxEms As Int
    Makes the TextView at most this many ems wide
  • MaxHeight As Int
    Makes the TextView at most this many pixels tall. This option is mutually
    exclusive with the {@link #setMaxLines(int)} method.

    Setting this value overrides any other (maximum) number of lines setting.
  • MaxLines As Int
    Makes the TextView at most this many lines tall.

    Setting this value overrides any other (maximum) height setting.
  • MaxWidth As Int
    Makes the TextView at most this many pixels wide
  • MinEms As Int
    Makes the TextView at least this many ems wide
  • MinHeight As Int
    Makes the TextView at least this many pixels tall.

    Setting this value overrides any other (minimum) number of lines setting.
  • MinLines As Int
    Makes the TextView at least this many lines tall.

    Setting this value overrides any other (minimum) height setting. A single
    line TextView will set this value to 1.
  • MinWidth As Int
    Makes the TextView at least this many pixels wide
  • PrivateImeOptions As String [read only]
    Get the private type of the content.
  • RawInputType As Int [write only]
    Directly change the content type integer of the text view, without
    modifying any other state.
  • SelectAllOnFocus As Boolean [write only]
    Set the TextView so that when it takes focus, all the text is selected.
  • SelectionEnd As Int [read only]
    Convenience for {@link android.text.Selection#getSelectionEnd}.
  • SelectionStart As Int
    Convenience for {@link android.text.Selection#getSelectionStart}.
  • ShadowColor As Int [read only]
  • ShadowDx As Float [read only]
  • ShadowDy As Float [read only]
  • ShadowRadius As Float [read only]
    Gets the radius of the shadow layer.
  • ShowSoftInputOnFocus As Boolean
    Returns whether the soft input method will be made visible when this
    TextView gets focused. The default is true.
  • Tag As Object
  • Text As Editable
  • TextColor As ColorStateList [write only]
    Sets the text color.
  • TextColors As ColorStateList [read only]
    Gets the text colors for the different states (normal, selected, focused)
    of the TextView.
  • TextIsSelectable As Boolean [write only]
    Sets whether the content of this view is selectable by the user. The
    default is {@code false}, meaning that the content is not selectable.
    <p>
    When you use a TextView to display a useful piece of information to the
    user (such as a contact's address), make it selectable, so that the user
    can select and copy its content. You can also use set the XML attribute
    {@link android.R.styleable#TextView_textIsSelectable} to "true".
    <p>
    When you call this method to set the value of {@code textIsSelectable}, it
    sets the flags {@code focusable}, {@code focusableInTouchMode},
    {@code clickable}, and {@code longClickable} to the same value. These flags
    correspond to the attributes {@link android.R.styleable#View_focusable
    android:focusable}, {@link android.R.styleable#View_focusableInTouchMode
    android:focusableInTouchMode}, {@link android.R.styleable#View_clickable
    android:clickable}, and {@link android.R.styleable#View_longClickable
    android:longClickable}. To restore any of these flags to a state you had
    set previously, call one or more of the following methods:
    {@link #setFocusable(boolean) setFocusable()},
    {@link #setFocusableInTouchMode(boolean) setFocusableInTouchMode()},
    {@link #setClickable(boolean) setClickable()} or
    {@link #setLongClickable(boolean) setLongClickable()}.
  • TextKeepState As CharSequence [write only]
    Like {@link #setText(CharSequence)}, except that the cursor position (if
    any) is retained in the new text.
  • TextLocale As Locale
    Get the default {@link java.util.Locale} of the text in this TextView.
  • TextScaleX As Float
    Sets the extent by which text should be stretched horizontally.
  • TextSize As Float
    Set the default text size to the given value, interpreted as "scaled pixel"
    units. This size is adjusted based on the current density and user font
    size preference.
  • Threshold As Int
    <p>
    Returns the number of characters the user must type before the drop down
    list is shown.
    </p>
    <p>
    Only work when autoCompleMode is AUTOCOMPLETE_MODE_SINGLE or
    AUTOCOMPLETE_MODE_MULTI
    </p>
  • Top As Int
  • TotalPaddingBottom As Int [read only]
    Returns the total bottom padding of the view, including the bottom Drawable
    if any, the extra space to keep more than maxLines from showing, and the
    vertical offset for gravity, if any.
  • TotalPaddingEnd As Int [read only]
    Returns the total end padding of the view, including the end Drawable if
    any.
  • TotalPaddingLeft As Int [read only]
    Returns the total left padding of the view, including the left Drawable if
    any.
  • TotalPaddingRight As Int [read only]
    Returns the total right padding of the view, including the right Drawable
    if any.
  • TotalPaddingStart As Int [read only]
    Returns the total start padding of the view, including the start Drawable
    if any.
  • TotalPaddingTop As Int [read only]
    Returns the total top padding of the view, including the top Drawable if
    any, the extra space to keep more than maxLines from showing, and the
    vertical offset for gravity, if any.
  • TransformationMethod As TransformationMethod [read only]
  • Typeface As Typeface
    Sets the typeface and style in which the text should be displayed. Note
    that not all Typeface families actually have bold and italic variants, so
    you may need to use {@link #setTypeface(android.graphics.Typeface, int)} to
    get the appearance that you actually want.
  • Urls() As URLSpan [read only]
    Returns the list of URLSpans attached to the text (by
    {@link android.text.util.Linkify} or otherwise) if any. You can call
    {@link android.text.style.URLSpan#getURL} on them to find where they link
    to or use {@link android.text.Spanned#getSpanStart} and
    {@link android.text.Spanned#getSpanEnd} to find the region of the text they
    are attached to.
  • Visible As Boolean
  • Width As Int
 

DonManfred

Expert
Licensed User
[*]bcFloatingActionButton
Events:

  • onclick (v As Object)
Fields:
  • ba As BA
Methods:
  • AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int)
  • BringToFront
  • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
  • Initialize (EventName As String)
  • Invalidate
  • Invalidate2 (arg0 As Rect)
  • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
  • IsInitialized As Boolean
  • RemoveView
  • RequestFocus As Boolean
  • SendToBack
  • SetBackgroundImage (arg0 As Bitmap)
  • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
  • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
  • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
  • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
  • dismiss
  • setIcon (icon As Drawable, animation As Boolean)
  • setLineMorphingState (state As Int, animation As Boolean)
  • show (x As Int, y As Int, gravity As Int)
Properties:
  • Background As Drawable
  • BackgroundColor As Int [read only]
  • Color As Int [write only]
  • Enabled As Boolean
  • Height As Int
  • Icon As Drawable [read only]
  • Left As Int
  • LineMorphingState As Int [read only]
  • Radius As Int
  • Tag As Object
  • Top As Int
  • Visible As Boolean
  • Width As Int
 

DonManfred

Expert
Licensed User
[*]bcLinearProgressView
Events:

  • onCheckedChanged (tag as Object As , checked As Boolean)
Methods:
  • AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int)
  • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
  • Initialize (EventName As String, type As Int)
  • IsInitialized As Boolean
  • isAutostart As Boolean
  • start
  • stop
Properties:
  • Autostart As Boolean [write only]
  • Colors()() As Int
  • Left As Int
  • Progress As Float
  • ProgressDrawable As Drawable [read only]
  • ProgressMode As Int [read only]
  • SecondaryProgress As Float
  • Tag As Object
  • Top As Int
  • mProgressId As Int
[*]bcRadiobutton
Events:

  • onCheckedChanged (tag as Object As , checked As Boolean)
Fields:
  • ba As BA
Methods:
  • AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int)
  • BringToFront
  • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
  • Initialize (EventName As String)
  • Invalidate
  • Invalidate2 (arg0 As Rect)
  • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
  • IsInitialized As Boolean
  • RemoveView
  • RequestFocus As Boolean
  • SendToBack
  • SetBackgroundImage (arg0 As Bitmap)
  • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
  • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
  • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
  • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
  • toggle
Properties:
  • Background As Drawable
  • CheckedImmediately As Boolean [write only]
  • Color As Int [write only]
  • Enabled As Boolean
  • Height As Int
  • Left As Int
  • Selected As Boolean [write only]
  • Tag As Object
  • Text As String [write only]
  • TextColor As Int [write only]
  • Textsize As Int [write only]
  • Top As Int
  • Visible As Boolean
  • Width As Int
  • isSelected As Boolean [read only]
 

DonManfred

Expert
Licensed User
[*]bcSlider
Events:

  • onPositionChanged (v As Object, oldPos As Float, newPos As Float, oldValue As Int, newValue As Int)
Fields:
  • ba As BA
Methods:
  • AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int)
  • BringToFront
  • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
  • Initialize (EventName As String)
  • Invalidate
  • Invalidate2 (arg0 As Rect)
  • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
  • IsInitialized As Boolean
  • RemoveView
  • RequestFocus As Boolean
  • SendToBack
  • SetBackgroundImage (arg0 As Bitmap)
  • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
  • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
  • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
  • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
  • isDiscreteMode As Boolean
  • setPosition (pos As Float, animation As Boolean)
  • setValue (value As Float, animation As Boolean)
Properties:
  • Background As Drawable
  • Color As Int [write only]
  • DiscreteMode As Boolean [write only]
  • Enabled As Boolean
  • ExactValue As Float [read only]
  • Height As Int
  • Left As Int
  • MaxValue As Int
  • MinValue As Int
  • Position As Float [read only]
  • StepValue As Int
  • Tag As Object
  • Top As Int
  • Value As Int [read only]
  • Visible As Boolean
  • Width As Int
 

DonManfred

Expert
Licensed User
[*]bcSnackBar
Fields:

  • ba As BA
Methods:
  • AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int)
  • BringToFront
  • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
  • Initialize (EventName As String)
  • Invalidate
  • Invalidate2 (arg0 As Rect)
  • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
  • IsInitialized As Boolean
  • RemoveView
  • RequestFocus As Boolean
  • SendToBack
  • SetBackgroundImage (arg0 As Bitmap)
  • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
  • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
  • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
  • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
  • Text (text As CharSequence) As SnackBar
  • TextColor (color As Int) As SnackBar
  • TextSize (size As Int) As SnackBar
  • actionText (text As CharSequence) As SnackBar
  • actionTextColor (color As Int) As SnackBar
  • duration (duration As Int) As SnackBar
  • setactionTextSize (size As Int) As SnackBar
  • show
  • singleLine (b As Boolean) As SnackBar
Properties:
  • Background As Drawable
  • Color As Int [write only]
  • Enabled As Boolean
  • Height As Int
  • Left As Int
  • Tag As Object
  • Top As Int
  • Visible As Boolean
  • Width As Int
 

DonManfred

Expert
Licensed User
[*]bcSwitch
Events:

  • onCheckedChanged (v As Object, checked As Boolean)
Fields:
  • ba As BA
Methods:
  • AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int)
  • BringToFront
  • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
  • Initialize (EventName As String)
  • Invalidate
  • Invalidate2 (arg0 As Rect)
  • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
  • IsInitialized As Boolean
  • RemoveView
  • RequestFocus As Boolean
  • SendToBack
  • SetBackgroundImage (arg0 As Bitmap)
  • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
  • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
  • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
  • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
  • toggle
Properties:
  • Background As Drawable
  • BackgroundColor As Int [write only]
  • Checked As Boolean [write only]
  • Color As Int [write only]
  • Enabled As Boolean
  • Height As Int
  • Left As Int
  • Tag As Object
  • Top As Int
  • Visible As Boolean
  • Width As Int
  • isChecked As Boolean [read only]
 

DonManfred

Expert
Licensed User
[*]bcTimePicker
Events:

  • onhourchanged (oldValue As Int, newValue As Int)
  • onminutechanged (oldValue As Int, newValue As Int)
  • onmodechanged (mode As Int)
Fields:
  • ba As BA
Methods:
  • AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int)
  • BringToFront
  • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
  • Initialize (EventName As String)
  • Invalidate
  • Invalidate2 (arg0 As Rect)
  • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
  • IsInitialized As Boolean
  • RemoveView
  • RequestFocus As Boolean
  • SendToBack
  • SetBackgroundImage (arg0 As Bitmap)
  • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
  • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
  • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
  • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
  • isTwentyFour As Boolean
  • setMode (mode As Int, animation As Boolean)
Properties:
  • AnimDuration As Int [read only]
  • Background As Drawable
  • BackgroundColor As Int
  • Color As Int [write only]
  • Enabled As Boolean
  • Height As Int
  • Hour As Int
  • Left As Int
  • Minute As Int
  • Mode As Int [read only]
  • SelectionColor As Int
  • SelectionRadius As Int
  • Tag As Object
  • TextColor As Int
  • TextHighlightColor As Int
  • TextSize As Int
  • Tf As Typeface
  • TickColor As Int
  • TickSize As Int
  • Top As Int
  • TwentyFourHour As Boolean [write only]
  • Typeface As Typeface [read only]
  • Visible As Boolean
  • Width As Int
 

DonManfred

Expert
Licensed User
[*]msCheckedTextView
Events:

  • onClick (v as Object As )
Fields:
  • ba As BA
Methods:
  • AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int)
  • BringToFront
  • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
  • Initialize (EventName As String)
  • Invalidate
  • Invalidate2 (arg0 As Rect)
  • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
  • IsInitialized As Boolean
  • RemoveView
  • RequestFocus As Boolean
  • SendToBack
  • SetBackgroundImage (arg0 As Bitmap)
  • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
  • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
  • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
  • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
Properties:
  • Background As Drawable
  • BackgroundColor As Int [write only]
  • BackgroundDrawable As Drawable [write only]
  • Checked As Boolean
  • Color As Int [write only]
  • Enabled As Boolean
  • Height As Int
  • Left As Int
  • Tag As Object
  • Text As String [write only]
  • TextColor As Int [write only]
  • Textsize As Int [write only]
  • Top As Int
  • Visible As Boolean
  • Width As Int
 

shashkiranr

Active Member
Licensed User
Hi Don,

How to you set the floating text in the Edit Text view. Also for the Hint and text colors it is asking colourstatelist. Is there a way to set that?

Regards,
SK
 

ernschd

Active Member
Licensed User
Do I have to use a special setup?
I changed the path to the Appcompat Directory and I'm using Android API 22. After Compiling the App stops and the following error is displayed in the Log View:
java.lang.RuntimeException: Unable to start activity ComponentInfo{de.donmanfred.MaterialEx1/de.donmanfred.MaterialEx1.main}: android.view.InflateException: Binary XML file line #37: Error inflating class com.android.internal.widget.ActionBarView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2413)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2471)
at android.app.ActivityThread.access$900(ActivityThread.java:175)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5602)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(Native Method)...
 

ernschd

Active Member
Licensed User
I already changed the paths to
B4X:
#AdditionalRes: ..\Resources
#AdditionalRes: C:\Programme\Android\extras\android\support\v7\appcompat\res, android.support.v7.appcompat
If thats the case the error message would be something like "ERROR: resource directory 'blabla\Android\extras\android\support\v7\appcompat\' does not exist"
 

shashkiranr

Active Member
Licensed User
Hi Don,

I am getting the same error for the example project.I have put all the paths for additional resources correctly


B4X:
--------- beginning of /dev/log/systemjava.lang.RuntimeException: Unable to start activity ComponentInfo{de.donmanfred.MaterialEx1/de.donmanfred.MaterialEx1.main}: android.view.InflateException: Binary XML file line #37: Error inflating class com.android.internal.widget.ActionBarView    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2413)
Regards,
SK
 

Jose Luis Barajas

Member
Licensed User
Hi DonManfred

I am fluent developer in c# and also visual basic 6.
I like to participate in this project but I don have the knowledge in wrapping libraries for b4a,
Exists some material or tutorials that I can use to go forward as staring point for work in your project?
 
Top