ketzalv / auto-validation-edittext

This repo contains a little fork of edittext that enable validate caracteristics of forms to a simple edittext

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Renderer error/Invalid id when options is not set

benjamin-ict opened this issue · comments

When options is not set, 2 issues occur:

  1. There is a renderer issue in Android Studio.
    Render Problem: Resource with id 0x0 is not an array resource, but Styleable
  2. There is an error in the log every time a layout with a ValidationEditText is inflated.
    Invalid ID 0x00000000.

This is caused by options = getResources.getStringArray(id) in ValidationEditText.init().

I would suggest the following change:

int id = typedArray.getResourceId(R.styleable.ValidationEditText_options, 0);
if (id != 0) {
    options = getResources().getStringArray(id);
}

this is fixed and can see in te version 1.0.8, thanks for the support