Java Examples for android.widget.AdapterViewFlipper

The following java examples will help you to understand the usage of android.widget.AdapterViewFlipper. These source code samples are taken from different open source projects.

Example 1
Project: Meishuquan-master  File: OnScrollViewFlipperListener.java View source code
private synchronized void startAll() {
    final int length = mFlippableList.size();
    for (int i = 0; i < length; i++) {
        ViewFlippable flippable = mFlippableList.get(i);
        AdapterViewFlipper flipper = flippable.getViewFlipper();
        if (flipper != null) {
            flipper.startFlipping();
            flipper.showNext();
        }
    }
}
Example 2
Project: android-test-kit-master  File: AdapterViewProtocols.java View source code
@Override
public void makeDataRenderedWithinAdapterView(AdapterView<? extends Adapter> adapterView, AdaptedData data) {
    checkArgument(data.opaqueToken instanceof Integer, "Not my data: %s", data);
    int position = ((Integer) data.opaqueToken).intValue();
    boolean moved = false;
    // though.
    if (Build.VERSION.SDK_INT > 7) {
        if (adapterView instanceof AbsListView) {
            if (Build.VERSION.SDK_INT > 10) {
                ((AbsListView) adapterView).smoothScrollToPositionFromTop(position, adapterView.getPaddingTop(), 0);
            } else {
                ((AbsListView) adapterView).smoothScrollToPosition(position);
            }
            moved = true;
        }
        if (Build.VERSION.SDK_INT > 10) {
            if (adapterView instanceof AdapterViewAnimator) {
                if (adapterView instanceof AdapterViewFlipper) {
                    ((AdapterViewFlipper) adapterView).stopFlipping();
                }
                ((AdapterViewAnimator) adapterView).setDisplayedChild(position);
                moved = true;
            }
        }
    }
    if (!moved) {
        adapterView.setSelection(position);
    }
}
Example 3
Project: itsnat_droid-master  File: TestAssetLayout1.java View source code
public static void test(ScrollView compRoot, ScrollView parsedRoot, InflatedLayout layout) {
    Context ctx = compRoot.getContext();
    final Resources res = ctx.getResources();
    // comp = "Layout compiled"
    // parsed = "Layout dynamically parsed"
    LinearLayout comp = (LinearLayout) compRoot.getChildAt(0);
    LinearLayout parsed = (LinearLayout) parsedRoot.getChildAt(0);
    assertEquals(comp.getOrientation(), parsed.getOrientation());
    int childCount;
    // buttonBack
    {
        childCount = 0;
        Button compButton = (Button) comp.getChildAt(childCount);
        Button parsedButton = (Button) parsed.getChildAt(childCount);
        assertEquals(compButton.getId(), parsedButton.getId());
        assertEquals(compButton.getText(), parsedButton.getText());
    }
    // buttonReload
    {
        childCount++;
        Button compButton = (Button) comp.getChildAt(childCount);
        Button parsedButton = (Button) parsed.getChildAt(childCount);
        assertEquals(compButton.getId(), parsedButton.getId());
        assertEquals(compButton.getText(), parsedButton.getText());
    }
    // test <include>
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Included 1 w:match_parent by include");
        assertEquals(compTextView.getText(), parsedTextView.getText());
        TextView compTextView2 = (TextView) comp.findViewById(R.id.testIncludeId1);
        assertEquals(compTextView2, compTextView);
        TextView parsedTextView2 = (TextView) parsed.findViewById(parsedTextView.getId());
        assertEquals(parsedTextView2, parsedTextView);
        // Porque existe el id compilado y tiene prioridad en el caso dinámico
        assertEquals(compTextView.getId(), parsedTextView.getId());
        ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
        ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
        assertEqualsViewGroupLayoutParams(a_params, b_params, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    }
    // test <include> dynamic (assets) 2
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Included 2 w:match_parent by include");
        assertEquals(compTextView.getText(), parsedTextView.getText());
        assertEquals(((TextView) comp.findViewById(R.id.testIncludeId2)), compTextView);
        assertEquals(((TextView) parsed.findViewById(parsedTextView.getId())), parsedTextView);
        // Porque existe el id compilado y tiene prioridad en el caso dinámico
        assertEquals(compTextView.getId(), parsedTextView.getId());
        ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
        ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
        assertEqualsViewGroupLayoutParams(a_params, b_params, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    }
    // test <include> dynamic (assets) 3
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Included 3 w:wrap_content");
        assertEquals(compTextView.getText(), parsedTextView.getText());
        ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
        ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
        assertEqualsViewGroupLayoutParams(a_params, b_params, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    }
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Included 4 w:match_parent");
        assertEquals(compTextView.getText(), parsedTextView.getText());
        ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
        ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
        assertEqualsViewGroupLayoutParams(a_params, b_params, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    }
    // Testing misc attribs
    {
        childCount++;
        final TextView compTextView = (TextView) comp.getChildAt(childCount);
        final TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test misc attribs");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        {
            RelativeLayout compLayout = (RelativeLayout) comp.getChildAt(childCount);
            RelativeLayout parsedLayout = (RelativeLayout) parsed.getChildAt(childCount);
            int childCountL2;
            {
                childCountL2 = 0;
                final TextView compTextView = (TextView) compLayout.getChildAt(childCountL2);
                final TextView parsedTextView = (TextView) parsedLayout.getChildAt(childCountL2);
                assertEquals(compTextView.getText(), "Test style including LayoutParams attribs");
                assertEquals(compTextView.getText(), parsedTextView.getText());
                assertEquals(compTextView.getTextSize(), ValueUtil.dpToPixelFloatRound(15.3f, res));
                assertEquals(compTextView.getTextSize(), parsedTextView.getTextSize());
                assertEquals(((ColorDrawable) compTextView.getBackground()).getColor(), 0xffdddddd);
                ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
                ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
                assertEquals(a_params.height, ValueUtil.dpToPixelFloatRound(40.3f, res));
                assertEquals(a_params.height, b_params.height);
                assertEquals(a_params.width, ViewGroup.LayoutParams.WRAP_CONTENT);
                assertEquals(a_params.width, b_params.width);
                RelativeLayout.LayoutParams compTextParams = (RelativeLayout.LayoutParams) compTextView.getLayoutParams();
                RelativeLayout.LayoutParams parsedTextParams = (RelativeLayout.LayoutParams) parsedTextView.getLayoutParams();
                int[] compTextRules = compTextParams.getRules();
                int[] parsedTextRules = parsedTextParams.getRules();
                // Por si acaso pero son todas las posibles rules
                assertEquals(compTextRules.length, parsedTextRules.length);
                assertNotZero(compTextRules[RelativeLayout.ALIGN_PARENT_TOP]);
                assertEquals(compTextRules[RelativeLayout.ALIGN_PARENT_TOP], parsedTextRules[RelativeLayout.ALIGN_PARENT_TOP]);
            }
            {
                childCountL2++;
                final TextView compTextView = (TextView) compLayout.getChildAt(childCountL2);
                final TextView parsedTextView = (TextView) parsedLayout.getChildAt(childCountL2);
                // Test id ya definido como recurso compilado
                assertEquals(compTextView.getId(), R.id.textViewTest1);
                assertEquals(((TextView) compLayout.findViewById(R.id.textViewTest1)), compTextView);
                assertEquals(((TextView) parsedLayout.findViewById(parsedTextView.getId())), parsedTextView);
                // Porque existe el id compilado y tiene prioridad en el caso dinámico
                assertEquals(compTextView.getId(), parsedTextView.getId());
                // Test findViewByXMLId
                assertEquals(parsedTextView, layout.findViewByXMLId("textViewTest1"));
                assertEquals(compTextView.getText(), "Hello world 1!");
                assertEquals(compTextView.getText(), parsedTextView.getText());
                assertEquals(compTextView.getTextSize(), ValueUtil.dpToPixelFloatRound(15.3f, res));
                assertEquals(compTextView.getTextSize(), parsedTextView.getTextSize());
                // Test style
                assertEquals(compTextView.getPaddingLeft(), ValueUtil.dpToPixelIntRound(21.3f, res));
                assertEquals(compTextView.getPaddingLeft(), parsedTextView.getPaddingLeft());
                assertEquals(compTextView.getPaddingRight(), ValueUtil.dpToPixelIntRound(21.3f, res));
                assertEquals(compTextView.getPaddingRight(), parsedTextView.getPaddingRight());
                assertEquals(compTextView.getPaddingTop(), ValueUtil.dpToPixelIntRound(10.3f, res));
                assertEquals(compTextView.getPaddingTop(), parsedTextView.getPaddingTop());
                assertEquals(compTextView.getPaddingBottom(), ValueUtil.dpToPixelIntRound(10.3f, res));
                assertEquals(compTextView.getPaddingBottom(), parsedTextView.getPaddingBottom());
                assertEquals(compTextView.getTextColors().getDefaultColor(), 0xff0000ff);
                assertEquals(compTextView.getTextColors(), parsedTextView.getTextColors());
                assertEquals(((ColorDrawable) compTextView.getBackground()).getColor(), res.getColor(res.getIdentifier("@android:color/holo_green_light", null, null)));
                assertEquals(compTextView.getBackground(), parsedTextView.getBackground());
            }
            childCountL2++;
            TextView compTextViewUpper;
            TextView parsedTextViewUpper;
            {
                final TextView compTextView = (TextView) compLayout.getChildAt(childCountL2);
                final TextView parsedTextView = (TextView) parsedLayout.getChildAt(childCountL2);
                // Test id añadido dinámicamente "@+id/..." los ids compilado y asset son nombres diferentes en este caso
                // En este caso el valor del id compilado (que existe) no es igual al añadido dinámicamente
                assertEquals(((TextView) compLayout.findViewById(R.id.textViewTest2_compiled)), compTextView);
                assertEquals(((TextView) parsedLayout.findViewById(parsedTextView.getId())), parsedTextView);
                assertEquals("org.itsnat.itsnatdroidtest:id/textViewTest2_compiled", ctx.getResources().getResourceName(compTextView.getId()));
                assertEquals(compTextView.getText(), "Hello world 2!");
                assertEquals(compTextView.getText(), parsedTextView.getText());
                assertEquals(compTextView.getBackground(), parsedTextView.getBackground());
                // Test atributo style
                // No tenemos una forma de testear "textAppearanceMedium" de forma directa, una forma es testear una de las propiedades que impone, ej el tamaño del texto
                assertEquals(compTextView.getTextSize(), parsedTextView.getTextSize());
                compTextViewUpper = compTextView;
                parsedTextViewUpper = parsedTextView;
            }
            childCountL2++;
            {
                final TextView compTextView = (TextView) compLayout.getChildAt(childCountL2);
                final TextView parsedTextView = (TextView) parsedLayout.getChildAt(childCountL2);
                assertEquals(compTextView.getId(), R.id.test_id_textviewtest3);
                //assertEquals(compTextView.getId(), parsedTextView.getId());
                // Internal access, not valid for end users
                ItsNatDroidImpl itsNatDroid = (ItsNatDroidImpl) ItsNatDroidRoot.get();
                assertEquals(parsedTextView.getId(), itsNatDroid.getXMLInflaterRegistry().findViewIdDynamicallyAdded("textViewTest3"));
                assertEquals(compTextView.getText(), "Text size=15.3dp, color=red,padding");
                assertEquals(compTextView.getText(), parsedTextView.getText());
                ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
                ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
                assertEqualsViewGroupLayoutParams(a_params, b_params, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
                // A pesar de usar un estilo parent de Android con textSize, lo imponemos
                assertEquals(compTextView.getTextSize(), ValueUtil.dpToPixelIntRound(15.3f, res));
                assertEquals(compTextView.getTextSize(), parsedTextView.getTextSize());
                assertEquals(compTextView.getTextColors().getDefaultColor(), 0xffff0000);
                assertEquals(compTextView.getTextColors(), parsedTextView.getTextColors());
                // Test style
                assertEquals(compTextView.getPaddingLeft(), ValueUtil.dpToPixelIntRound(21.3f, res));
                assertEquals(compTextView.getPaddingLeft(), parsedTextView.getPaddingLeft());
                assertEquals(compTextView.getPaddingRight(), ValueUtil.dpToPixelIntRound(21.3f, res));
                assertEquals(compTextView.getPaddingRight(), parsedTextView.getPaddingRight());
                RelativeLayout.LayoutParams compTextParams = (RelativeLayout.LayoutParams) compTextView.getLayoutParams();
                RelativeLayout.LayoutParams parsedTextParams = (RelativeLayout.LayoutParams) parsedTextView.getLayoutParams();
                assertEqualsRelativeLayoutLayoutParamsBellow(compTextParams, parsedTextParams, compTextViewUpper.getId(), parsedTextViewUpper.getId());
                compTextViewUpper = compTextView;
                parsedTextViewUpper = parsedTextView;
            }
            childCountL2++;
            {
                final TextView compTextView = (TextView) compLayout.getChildAt(childCountL2);
                final TextView parsedTextView = (TextView) parsedLayout.getChildAt(childCountL2);
                assertEquals(compTextView.getId(), R.id.textViewTest4);
                assertEquals(compTextView.getId(), parsedTextView.getId());
                assertEquals(compTextView.getText(), "Text size=smaller,color=red,padding");
                assertEquals(compTextView.getText(), parsedTextView.getText());
                ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
                ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
                assertEqualsViewGroupLayoutParams(a_params, b_params, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
                // assertEquals(compTextView.getTextSize(), ValueUtil.dpToPixelIntRound(15.3f, res)); // Se utiliza un style parent de Android, no sabemos el valor exacto
                assertEquals(compTextView.getTextSize(), parsedTextView.getTextSize());
                assertEquals(compTextView.getTextColors().getDefaultColor(), 0xffff0000);
                assertEquals(compTextView.getTextColors(), parsedTextView.getTextColors());
                // Test style
                assertEquals(compTextView.getPaddingLeft(), ValueUtil.dpToPixelIntRound(21.3f, res));
                assertEquals(compTextView.getPaddingLeft(), parsedTextView.getPaddingLeft());
                assertEquals(compTextView.getPaddingRight(), ValueUtil.dpToPixelIntRound(21.3f, res));
                assertEquals(compTextView.getPaddingRight(), parsedTextView.getPaddingRight());
                RelativeLayout.LayoutParams compTextParams = (RelativeLayout.LayoutParams) compTextView.getLayoutParams();
                RelativeLayout.LayoutParams parsedTextParams = (RelativeLayout.LayoutParams) parsedTextView.getLayoutParams();
                assertEqualsRelativeLayoutLayoutParamsBellow(compTextParams, parsedTextParams, compTextViewUpper.getId(), parsedTextViewUpper.getId());
                compTextViewUpper = compTextView;
                parsedTextViewUpper = parsedTextView;
            }
        }
        // Test resource folder filters
        {
            childCount++;
            final TextView compTextView = (TextView) comp.getChildAt(childCount);
            final TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
            assertEquals(compTextView.getText(), "Test resource folder filters");
            assertEquals(compTextView.getText(), parsedTextView.getText());
        }
        {
            childCount++;
            {
                RelativeLayout compLayout = (RelativeLayout) comp.getChildAt(childCount);
                RelativeLayout parsedLayout = (RelativeLayout) parsed.getChildAt(childCount);
                int childCountL2;
                TextView compTextViewUpper;
                TextView parsedTextViewUpper;
                {
                    childCountL2 = 0;
                    {
                        final TextView compTextView = (TextView) compLayout.getChildAt(childCountL2);
                        final TextView parsedTextView = (TextView) parsedLayout.getChildAt(childCountL2);
                        assertEquals(compTextView.getId(), R.id.textViewFilterTest1);
                        assertEquals(compTextView.getId(), parsedTextView.getId());
                        assertTrue(compTextView.getText().toString().startsWith("Device Data to Test Filters:\n"));
                        assertTrue(parsedTextView.getText().toString().startsWith("Device Data to Test Filters:\n"));
                        // Indirectamente testeamos la conversión manual que hacemos de \n, \t (hay más casos de caracteres especiales pero no los testeamos):
                        assertEquals(compTextView.getText(), parsedTextView.getText());
                        ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
                        ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
                        assertEqualsViewGroupLayoutParams(a_params, b_params, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
                        RelativeLayout.LayoutParams compTextParams = (RelativeLayout.LayoutParams) compTextView.getLayoutParams();
                        RelativeLayout.LayoutParams parsedTextParams = (RelativeLayout.LayoutParams) parsedTextView.getLayoutParams();
                        //assertEqualsRelativeLayoutLayoutParamsBellow(compTextParams, parsedTextParams, compTextViewUpper.getId(), parsedTextViewUpper.getId());
                        compTextViewUpper = compTextView;
                        parsedTextViewUpper = parsedTextView;
                    }
                    childCountL2++;
                    {
                        final TextView compTextView = (TextView) compLayout.getChildAt(childCountL2);
                        final TextView parsedTextView = (TextView) parsedLayout.getChildAt(childCountL2);
                        assertEquals(compTextView.getId(), R.id.textViewFilterTest2);
                        assertEquals(compTextView.getId(), parsedTextView.getId());
                        Locale locale = ctx.getResources().getConfiguration().locale;
                        String lang = locale.getLanguage();
                        String region = locale.getCountry();
                        if (lang.equals("es") && region.equals("ES"))
                            assertEquals(compTextView.getText(), "Test filter lang and region: -es-rES");
                        else
                            assertEquals(compTextView.getText(), "Test filter lang and region: (not -es-rES)");
                        assertEquals(compTextView.getText(), parsedTextView.getText());
                        ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
                        ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
                        assertEqualsViewGroupLayoutParams(a_params, b_params, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
                        RelativeLayout.LayoutParams compTextParams = (RelativeLayout.LayoutParams) compTextView.getLayoutParams();
                        RelativeLayout.LayoutParams parsedTextParams = (RelativeLayout.LayoutParams) parsedTextView.getLayoutParams();
                        assertEqualsRelativeLayoutLayoutParamsBellow(compTextParams, parsedTextParams, compTextViewUpper.getId(), parsedTextViewUpper.getId());
                        compTextViewUpper = compTextView;
                        parsedTextViewUpper = parsedTextView;
                    }
                    childCountL2++;
                    {
                        final TextView compTextView = (TextView) compLayout.getChildAt(childCountL2);
                        final TextView parsedTextView = (TextView) parsedLayout.getChildAt(childCountL2);
                        assertEquals(compTextView.getId(), R.id.textViewFilterTest3);
                        assertEquals(compTextView.getId(), parsedTextView.getId());
                        int smallestScreenWidthDp = ctx.getResources().getConfiguration().smallestScreenWidthDp;
                        if (smallestScreenWidthDp < 384)
                            assertEquals(compTextView.getText(), "Test filter smallestWidthDp < 384dp");
                        else
                            assertEquals(compTextView.getText(), "Test filter smallestWidthDp >= 384dp");
                        assertEquals(compTextView.getText(), parsedTextView.getText());
                        ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
                        ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
                        assertEqualsViewGroupLayoutParams(a_params, b_params, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
                        RelativeLayout.LayoutParams compTextParams = (RelativeLayout.LayoutParams) compTextView.getLayoutParams();
                        RelativeLayout.LayoutParams parsedTextParams = (RelativeLayout.LayoutParams) parsedTextView.getLayoutParams();
                        assertEqualsRelativeLayoutLayoutParamsBellow(compTextParams, parsedTextParams, compTextViewUpper.getId(), parsedTextViewUpper.getId());
                        compTextViewUpper = compTextView;
                        parsedTextViewUpper = parsedTextView;
                    }
                    childCountL2++;
                    {
                        final TextView compTextView = (TextView) compLayout.getChildAt(childCountL2);
                        final TextView parsedTextView = (TextView) parsedLayout.getChildAt(childCountL2);
                        assertEquals(compTextView.getId(), R.id.textViewFilterTest4);
                        assertEquals(compTextView.getId(), parsedTextView.getId());
                        int screenWidthDp = ctx.getResources().getConfiguration().screenWidthDp;
                        if (screenWidthDp < 384)
                            assertEquals(compTextView.getText(), "Test filter screenWidthDp < 384dp");
                        else
                            assertEquals(compTextView.getText(), "Test filter screenWidthDp >= 384dp");
                        assertEquals(compTextView.getText(), parsedTextView.getText());
                        ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
                        ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
                        assertEqualsViewGroupLayoutParams(a_params, b_params, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
                        RelativeLayout.LayoutParams compTextParams = (RelativeLayout.LayoutParams) compTextView.getLayoutParams();
                        RelativeLayout.LayoutParams parsedTextParams = (RelativeLayout.LayoutParams) parsedTextView.getLayoutParams();
                        assertEqualsRelativeLayoutLayoutParamsBellow(compTextParams, parsedTextParams, compTextViewUpper.getId(), parsedTextViewUpper.getId());
                        compTextViewUpper = compTextView;
                        parsedTextViewUpper = parsedTextView;
                    }
                    childCountL2++;
                    {
                        final TextView compTextView = (TextView) compLayout.getChildAt(childCountL2);
                        final TextView parsedTextView = (TextView) parsedLayout.getChildAt(childCountL2);
                        assertEquals(compTextView.getId(), R.id.textViewFilterTest5);
                        assertEquals(compTextView.getId(), parsedTextView.getId());
                        int screenHeightDp = ctx.getResources().getConfiguration().screenHeightDp;
                        if (screenHeightDp < 696)
                            assertEquals(compTextView.getText(), "Test filter screenHeightDp < 696dp");
                        else
                            assertEquals(compTextView.getText(), "Test filter screenHeightDp >= 696dp");
                        assertEquals(compTextView.getText(), parsedTextView.getText());
                        ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
                        ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
                        assertEqualsViewGroupLayoutParams(a_params, b_params, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
                        RelativeLayout.LayoutParams compTextParams = (RelativeLayout.LayoutParams) compTextView.getLayoutParams();
                        RelativeLayout.LayoutParams parsedTextParams = (RelativeLayout.LayoutParams) parsedTextView.getLayoutParams();
                        assertEqualsRelativeLayoutLayoutParamsBellow(compTextParams, parsedTextParams, compTextViewUpper.getId(), parsedTextViewUpper.getId());
                        compTextViewUpper = compTextView;
                        parsedTextViewUpper = parsedTextView;
                    }
                    childCountL2++;
                    {
                        final TextView compTextView = (TextView) compLayout.getChildAt(childCountL2);
                        final TextView parsedTextView = (TextView) parsedLayout.getChildAt(childCountL2);
                        assertEquals(compTextView.getId(), R.id.textViewFilterTest6);
                        assertEquals(compTextView.getId(), parsedTextView.getId());
                        int screenLayout = ctx.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK;
                        if (screenLayout < Configuration.SCREENLAYOUT_SIZE_XLARGE)
                            assertEquals(compTextView.getText(), "Test filter screen size < xlarge");
                        else
                            assertEquals(compTextView.getText(), "Test filter screen size >= xlarge");
                        assertEquals(compTextView.getText(), parsedTextView.getText());
                        ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
                        ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
                        assertEqualsViewGroupLayoutParams(a_params, b_params, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
                        RelativeLayout.LayoutParams compTextParams = (RelativeLayout.LayoutParams) compTextView.getLayoutParams();
                        RelativeLayout.LayoutParams parsedTextParams = (RelativeLayout.LayoutParams) parsedTextView.getLayoutParams();
                        assertEqualsRelativeLayoutLayoutParamsBellow(compTextParams, parsedTextParams, compTextViewUpper.getId(), parsedTextViewUpper.getId());
                        compTextViewUpper = compTextView;
                        parsedTextViewUpper = parsedTextView;
                    }
                    childCountL2++;
                    {
                        final TextView compTextView = (TextView) compLayout.getChildAt(childCountL2);
                        final TextView parsedTextView = (TextView) parsedLayout.getChildAt(childCountL2);
                        assertEquals(compTextView.getId(), R.id.textViewFilterTest7);
                        assertEquals(compTextView.getId(), parsedTextView.getId());
                        int screenLayout = ctx.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_LONG_MASK;
                        if (screenLayout == Configuration.SCREENLAYOUT_LONG_NO)
                            assertEquals(compTextView.getText(), "Test filter screen aspect: notlong");
                        else if (screenLayout == Configuration.SCREENLAYOUT_LONG_YES)
                            assertEquals(compTextView.getText(), "Test filter screen aspect: long");
                        else
                            throw new RuntimeException("Unexpected screenLayout " + screenLayout);
                        assertEquals(compTextView.getText(), parsedTextView.getText());
                        ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
                        ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
                        assertEqualsViewGroupLayoutParams(a_params, b_params, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
                        RelativeLayout.LayoutParams compTextParams = (RelativeLayout.LayoutParams) compTextView.getLayoutParams();
                        RelativeLayout.LayoutParams parsedTextParams = (RelativeLayout.LayoutParams) parsedTextView.getLayoutParams();
                        assertEqualsRelativeLayoutLayoutParamsBellow(compTextParams, parsedTextParams, compTextViewUpper.getId(), parsedTextViewUpper.getId());
                        compTextViewUpper = compTextView;
                        parsedTextViewUpper = parsedTextView;
                    }
                    childCountL2++;
                    {
                        final TextView compTextView = (TextView) compLayout.getChildAt(childCountL2);
                        final TextView parsedTextView = (TextView) parsedLayout.getChildAt(childCountL2);
                        assertEquals(compTextView.getId(), R.id.textViewFilterTest8);
                        assertEquals(compTextView.getId(), parsedTextView.getId());
                        int orientation = ctx.getResources().getConfiguration().orientation;
                        if (orientation == Configuration.ORIENTATION_PORTRAIT)
                            assertEquals(compTextView.getText(), "Test filter screen orientation: port");
                        else if (orientation == Configuration.ORIENTATION_LANDSCAPE)
                            assertEquals(compTextView.getText(), "Test filter screen orientation: land");
                        else
                            throw new RuntimeException("Unexpected orientation " + orientation);
                        assertEquals(compTextView.getText(), parsedTextView.getText());
                        ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
                        ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
                        assertEqualsViewGroupLayoutParams(a_params, b_params, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
                        RelativeLayout.LayoutParams compTextParams = (RelativeLayout.LayoutParams) compTextView.getLayoutParams();
                        RelativeLayout.LayoutParams parsedTextParams = (RelativeLayout.LayoutParams) parsedTextView.getLayoutParams();
                        assertEqualsRelativeLayoutLayoutParamsBellow(compTextParams, parsedTextParams, compTextViewUpper.getId(), parsedTextViewUpper.getId());
                        compTextViewUpper = compTextView;
                        parsedTextViewUpper = parsedTextView;
                    }
                    childCountL2++;
                    {
                        final TextView compTextView = (TextView) compLayout.getChildAt(childCountL2);
                        final TextView parsedTextView = (TextView) parsedLayout.getChildAt(childCountL2);
                        assertEquals(compTextView.getId(), R.id.textViewFilterTest9);
                        assertEquals(compTextView.getId(), parsedTextView.getId());
                        int orientation = ctx.getResources().getConfiguration().orientation;
                        if (orientation == Configuration.ORIENTATION_PORTRAIT)
                            assertEquals(compTextView.getText(), "Test filter screen orientation 2: port");
                        else if (orientation == Configuration.ORIENTATION_LANDSCAPE)
                            assertEquals(compTextView.getText(), "Test filter screen orientation 2: land");
                        else
                            throw new RuntimeException("Unexpected orientation " + orientation);
                        assertEquals(compTextView.getText(), parsedTextView.getText());
                        ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
                        ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
                        assertEqualsViewGroupLayoutParams(a_params, b_params, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
                        RelativeLayout.LayoutParams compTextParams = (RelativeLayout.LayoutParams) compTextView.getLayoutParams();
                        RelativeLayout.LayoutParams parsedTextParams = (RelativeLayout.LayoutParams) parsedTextView.getLayoutParams();
                        assertEqualsRelativeLayoutLayoutParamsBellow(compTextParams, parsedTextParams, compTextViewUpper.getId(), parsedTextViewUpper.getId());
                        compTextViewUpper = compTextView;
                        parsedTextViewUpper = parsedTextView;
                    }
                    childCountL2++;
                    {
                        final TextView compTextView = (TextView) compLayout.getChildAt(childCountL2);
                        final TextView parsedTextView = (TextView) parsedLayout.getChildAt(childCountL2);
                        assertEquals(compTextView.getId(), R.id.textViewFilterTest10);
                        assertEquals(compTextView.getId(), parsedTextView.getId());
                        int uiModeType = ctx.getResources().getConfiguration().uiMode & Configuration.UI_MODE_TYPE_MASK;
                        if (uiModeType != Configuration.UI_MODE_TYPE_TELEVISION)
                            assertEquals(compTextView.getText(), "Test filter ui mode type: (other != television)");
                        else
                            // if (uiModeType == Configuration.UI_MODE_TYPE_TELEVISION)
                            assertEquals(compTextView.getText(), "Test filter ui mode type: television");
                        assertEquals(compTextView.getText(), parsedTextView.getText());
                        ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
                        ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
                        assertEqualsViewGroupLayoutParams(a_params, b_params, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
                        RelativeLayout.LayoutParams compTextParams = (RelativeLayout.LayoutParams) compTextView.getLayoutParams();
                        RelativeLayout.LayoutParams parsedTextParams = (RelativeLayout.LayoutParams) parsedTextView.getLayoutParams();
                        assertEqualsRelativeLayoutLayoutParamsBellow(compTextParams, parsedTextParams, compTextViewUpper.getId(), parsedTextViewUpper.getId());
                        compTextViewUpper = compTextView;
                        parsedTextViewUpper = parsedTextView;
                    }
                    childCountL2++;
                    {
                        final TextView compTextView = (TextView) compLayout.getChildAt(childCountL2);
                        final TextView parsedTextView = (TextView) parsedLayout.getChildAt(childCountL2);
                        assertEquals(compTextView.getId(), R.id.textViewFilterTest11);
                        assertEquals(compTextView.getId(), parsedTextView.getId());
                        // El modo night mode podríamos testearlo con un método http://developer.android.com/reference/android/app/UiModeManager.html pero es muy obvio que no vale la pena, testeamos sólo el notnight
                        int uiModeNight = ctx.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
                        if (uiModeNight == Configuration.UI_MODE_NIGHT_NO)
                            assertEquals(compTextView.getText(), "Test filter ui mode night: notnight");
                        else if (uiModeNight == Configuration.UI_MODE_NIGHT_YES)
                            assertEquals(compTextView.getText(), "Test filter ui mode night: night");
                        else
                            throw new RuntimeException("Unexpected ui mode night " + uiModeNight);
                        assertEquals(compTextView.getText(), parsedTextView.getText());
                        ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
                        ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
                        assertEqualsViewGroupLayoutParams(a_params, b_params, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
                        RelativeLayout.LayoutParams compTextParams = (RelativeLayout.LayoutParams) compTextView.getLayoutParams();
                        RelativeLayout.LayoutParams parsedTextParams = (RelativeLayout.LayoutParams) parsedTextView.getLayoutParams();
                        assertEqualsRelativeLayoutLayoutParamsBellow(compTextParams, parsedTextParams, compTextViewUpper.getId(), parsedTextViewUpper.getId());
                        compTextViewUpper = compTextView;
                        parsedTextViewUpper = parsedTextView;
                    }
                    childCountL2++;
                    {
                        final TextView compTextView = (TextView) compLayout.getChildAt(childCountL2);
                        final TextView parsedTextView = (TextView) parsedLayout.getChildAt(childCountL2);
                        assertEquals(compTextView.getId(), R.id.textViewFilterTest12);
                        assertEquals(compTextView.getId(), parsedTextView.getId());
                        // Testear en el caso compilado es más complicado de lo esperado pues si tenemos un /values sin prefijo y un /values-xxhdpi, coge el /values-xxhdpi aunque sea un xhdpi (menor)
                        // por ello necesitamos al menos dos /values-algo para que no seleccione siempre el /values-algo único, se elige el más cercano
                        // Nuestro sistema es mucho más simple, sólo un selector
                        int densityDpi = ctx.getResources().getDisplayMetrics().densityDpi;
                        if (// < xhdpi
                        densityDpi < 320) {
                            assertEquals(compTextView.getText(), "Test filter screen pixel density < xhdpi");
                        } else if (// >= xhdpi && < xxhdpi
                        densityDpi >= 320 && densityDpi < (480 - 320) / 2 + 320) {
                            assertEquals(compTextView.getText(), "Test filter screen pixel density >= xhdpi & < xxhdpi");
                        } else // xxhdpi
                        {
                            assertEquals(compTextView.getText(), "Test filter screen pixel density >= xxhdpi");
                        }
                        if (// < xhdpi
                        densityDpi < 480) {
                            assertEquals(parsedTextView.getText(), "Test filter screen pixel density < xxhdpi");
                        } else // >= 480 (xxhdpi)
                        {
                            assertEquals(parsedTextView.getText(), "Test filter screen pixel density >= xxhdpi");
                        }
                        // assertEquals(compTextView.getText(), parsedTextView.getText());
                        ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
                        ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
                        assertEqualsViewGroupLayoutParams(a_params, b_params, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
                        RelativeLayout.LayoutParams compTextParams = (RelativeLayout.LayoutParams) compTextView.getLayoutParams();
                        RelativeLayout.LayoutParams parsedTextParams = (RelativeLayout.LayoutParams) parsedTextView.getLayoutParams();
                        assertEqualsRelativeLayoutLayoutParamsBellow(compTextParams, parsedTextParams, compTextViewUpper.getId(), parsedTextViewUpper.getId());
                        compTextViewUpper = compTextView;
                        parsedTextViewUpper = parsedTextView;
                    }
                    childCountL2++;
                    {
                        final TextView compTextView = (TextView) compLayout.getChildAt(childCountL2);
                        final TextView parsedTextView = (TextView) parsedLayout.getChildAt(childCountL2);
                        assertEquals(compTextView.getId(), R.id.textViewFilterTest13);
                        assertEquals(compTextView.getId(), parsedTextView.getId());
                        int touchscreen = ctx.getResources().getConfiguration().touchscreen;
                        if (touchscreen == Configuration.TOUCHSCREEN_NOTOUCH)
                            assertEquals(compTextView.getText(), "Test filter touchscreen type: notouch");
                        else if (touchscreen == Configuration.TOUCHSCREEN_FINGER)
                            assertEquals(compTextView.getText(), "Test filter touchscreen type: finger");
                        else
                            throw new RuntimeException("Unexpected filter touchscreen type " + touchscreen);
                        assertEquals(compTextView.getText(), parsedTextView.getText());
                        ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
                        ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
                        assertEqualsViewGroupLayoutParams(a_params, b_params, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
                        RelativeLayout.LayoutParams compTextParams = (RelativeLayout.LayoutParams) compTextView.getLayoutParams();
                        RelativeLayout.LayoutParams parsedTextParams = (RelativeLayout.LayoutParams) parsedTextView.getLayoutParams();
                        assertEqualsRelativeLayoutLayoutParamsBellow(compTextParams, parsedTextParams, compTextViewUpper.getId(), parsedTextViewUpper.getId());
                        compTextViewUpper = compTextView;
                        parsedTextViewUpper = parsedTextView;
                    }
                    childCountL2++;
                    {
                        final TextView compTextView = (TextView) compLayout.getChildAt(childCountL2);
                        final TextView parsedTextView = (TextView) parsedLayout.getChildAt(childCountL2);
                        assertEquals(compTextView.getId(), R.id.textViewFilterTest14);
                        assertEquals(compTextView.getId(), parsedTextView.getId());
                        int keyboard = ctx.getResources().getConfiguration().keyboard;
                        if (keyboard == Configuration.KEYBOARD_QWERTY)
                            assertEquals(compTextView.getText(), "Test filter primary text input: qwerty");
                        else if (keyboard == Configuration.KEYBOARD_NOKEYS)
                            assertEquals(compTextView.getText(), "Test filter primary text input: nokeys");
                        else
                            throw new RuntimeException("Unexpected filter primary text input " + keyboard);
                        assertEquals(compTextView.getText(), parsedTextView.getText());
                        ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
                        ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
                        assertEqualsViewGroupLayoutParams(a_params, b_params, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
                        RelativeLayout.LayoutParams compTextParams = (RelativeLayout.LayoutParams) compTextView.getLayoutParams();
                        RelativeLayout.LayoutParams parsedTextParams = (RelativeLayout.LayoutParams) parsedTextView.getLayoutParams();
                        assertEqualsRelativeLayoutLayoutParamsBellow(compTextParams, parsedTextParams, compTextViewUpper.getId(), parsedTextViewUpper.getId());
                        compTextViewUpper = compTextView;
                        parsedTextViewUpper = parsedTextView;
                    }
                    childCountL2++;
                    {
                        final TextView compTextView = (TextView) compLayout.getChildAt(childCountL2);
                        final TextView parsedTextView = (TextView) parsedLayout.getChildAt(childCountL2);
                        assertEquals(compTextView.getId(), R.id.textViewFilterTest15);
                        assertEquals(compTextView.getId(), parsedTextView.getId());
                        int navigation = ctx.getResources().getConfiguration().navigation;
                        if (navigation != Configuration.NAVIGATION_NONAV)
                            assertEquals(compTextView.getText(), "Test filter prim nontouch nav: (other)");
                        else
                            /* if (navigation == Configuration.NAVIGATION_NONAV) */
                            assertEquals(compTextView.getText(), "Test filter prim nontouch nav: nonav");
                        assertEquals(compTextView.getText(), parsedTextView.getText());
                        ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
                        ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
                        assertEqualsViewGroupLayoutParams(a_params, b_params, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
                        RelativeLayout.LayoutParams compTextParams = (RelativeLayout.LayoutParams) compTextView.getLayoutParams();
                        RelativeLayout.LayoutParams parsedTextParams = (RelativeLayout.LayoutParams) parsedTextView.getLayoutParams();
                        assertEqualsRelativeLayoutLayoutParamsBellow(compTextParams, parsedTextParams, compTextViewUpper.getId(), parsedTextViewUpper.getId());
                        compTextViewUpper = compTextView;
                        parsedTextViewUpper = parsedTextView;
                    }
                }
            }
        }
    }
    // Testing custom View
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test Custom View");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        final CustomTextView compCustomTextView = (CustomTextView) comp.getChildAt(childCount);
        final CustomTextView parsedCustomTextView = (CustomTextView) parsed.getChildAt(childCount);
        assertEquals(compCustomTextView.getText(), "Custom View 1");
        assertEquals(compCustomTextView.getText(), parsedCustomTextView.getText());
        assertEquals(compCustomTextView.getBackground(), parsedCustomTextView.getBackground());
    }
    {
        childCount++;
        final CustomTextView compCustomTextView = (CustomTextView) comp.getChildAt(childCount);
        final CustomTextView parsedCustomTextView = (CustomTextView) parsed.getChildAt(childCount);
        assertEquals(compCustomTextView.getText(), "Custom View 2");
        assertEquals(compCustomTextView.getText(), parsedCustomTextView.getText());
        assertEquals(compCustomTextView.getBackground(), parsedCustomTextView.getBackground());
    }
    // Test View Attribs
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test View Attribs");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        LinearLayout compLinLayout = (LinearLayout) comp.getChildAt(childCount);
        LinearLayout parsedLinLayout = (LinearLayout) parsed.getChildAt(childCount);
        {
            {
                final TextView compTextView = (TextView) compLinLayout.getChildAt(0);
                final TextView parsedTextView = (TextView) parsedLinLayout.getChildAt(0);
                assertEquals(compTextView.getAlpha(), 0.7f);
                assertEquals(compTextView.getAlpha(), parsedTextView.getAlpha());
                assertEquals(((ColorDrawable) compTextView.getBackground()).getColor(), 0xffdddddd);
                assertEquals(compTextView.getBackground(), parsedTextView.getBackground());
                assertFalse(compTextView.isClickable());
                assertEquals(compTextView.isClickable(), parsedTextView.isClickable());
                assertEquals(compTextView.getContentDescription(), "For Testing View Attribs");
                assertEquals(compTextView.getContentDescription(), parsedTextView.getContentDescription());
                assertEquals(compTextView.getDrawingCacheQuality(), View.DRAWING_CACHE_QUALITY_HIGH);
                assertEquals(compTextView.getDrawingCacheQuality(), parsedTextView.getDrawingCacheQuality());
                assertTrue(compTextView.isDuplicateParentStateEnabled());
                assertEquals(compTextView.isDuplicateParentStateEnabled(), parsedTextView.isDuplicateParentStateEnabled());
                assertTrue(compTextView.getFitsSystemWindows());
                assertEquals(compTextView.getFitsSystemWindows(), parsedTextView.getFitsSystemWindows());
            }
            {
                final ScrollView compScrollView = (ScrollView) compLinLayout.getChildAt(1);
                final ScrollView parsedScrollView = (ScrollView) parsedLinLayout.getChildAt(1);
                // Test android:fadingEdgeLength
                assertEquals(compScrollView.getVerticalFadingEdgeLength(), ValueUtil.dpToPixelIntRound(10.3f, res));
                assertEquals(compScrollView.getVerticalFadingEdgeLength(), parsedScrollView.getVerticalFadingEdgeLength());
                assertEquals(compScrollView.getHorizontalFadingEdgeLength(), ValueUtil.dpToPixelIntRound(10.3f, res));
                assertEquals(compScrollView.getHorizontalFadingEdgeLength(), parsedScrollView.getHorizontalFadingEdgeLength());
                // Correspondiente a requiresFadingEdge
                assertTrue(compScrollView.isScrollbarFadingEnabled());
                assertEquals(compScrollView.isScrollbarFadingEnabled(), parsedScrollView.isScrollbarFadingEnabled());
                // Test android:scrollbarAlwaysDrawHorizontalTrack
                final Class[] scrollCacheClasses = new Class[] { View.class, TestUtil.resolveClass("android.view.View$ScrollabilityCache"), TestUtil.resolveClass("android.widget.ScrollBarDrawable") };
                assertTrue((Boolean) TestUtil.getField(compScrollView, scrollCacheClasses, new String[] { "mScrollCache", "scrollBar", "mAlwaysDrawHorizontalTrack" }));
                assertEquals((Boolean) TestUtil.getField(compScrollView, scrollCacheClasses, new String[] { "mScrollCache", "scrollBar", "mAlwaysDrawHorizontalTrack" }), (Boolean) TestUtil.getField(parsedScrollView, scrollCacheClasses, new String[] { "mScrollCache", "scrollBar", "mAlwaysDrawHorizontalTrack" }));
                // Test android:scrollbarAlwaysDrawVerticalTrack
                assertTrue((Boolean) TestUtil.getField(compScrollView, scrollCacheClasses, new String[] { "mScrollCache", "scrollBar", "mAlwaysDrawVerticalTrack" }));
                assertEquals((Boolean) TestUtil.getField(compScrollView, scrollCacheClasses, new String[] { "mScrollCache", "scrollBar", "mAlwaysDrawVerticalTrack" }), (Boolean) TestUtil.getField(parsedScrollView, scrollCacheClasses, new String[] { "mScrollCache", "scrollBar", "mAlwaysDrawVerticalTrack" }));
                // Test android:scrollbarThumbHorizontal
                assertEquals((GradientDrawable) TestUtil.getField(compScrollView, scrollCacheClasses, new String[] { "mScrollCache", "scrollBar", "mHorizontalThumb" }), (GradientDrawable) TestUtil.getField(parsedScrollView, scrollCacheClasses, new String[] { "mScrollCache", "scrollBar", "mHorizontalThumb" }));
                // Test android:scrollbarThumbVertical
                assertEquals((GradientDrawable) TestUtil.getField(compScrollView, scrollCacheClasses, new String[] { "mScrollCache", "scrollBar", "mVerticalThumb" }), (GradientDrawable) TestUtil.getField(parsedScrollView, scrollCacheClasses, new String[] { "mScrollCache", "scrollBar", "mVerticalThumb" }));
                // Test android:scrollbarTrackHorizontal
                assertEquals((GradientDrawable) TestUtil.getField(compScrollView, scrollCacheClasses, new String[] { "mScrollCache", "scrollBar", "mHorizontalTrack" }), (GradientDrawable) TestUtil.getField(parsedScrollView, scrollCacheClasses, new String[] { "mScrollCache", "scrollBar", "mHorizontalTrack" }));
                // Test android:scrollbarTrackVertical
                assertEquals((GradientDrawable) TestUtil.getField(compScrollView, scrollCacheClasses, new String[] { "mScrollCache", "scrollBar", "mVerticalTrack" }), (GradientDrawable) TestUtil.getField(parsedScrollView, scrollCacheClasses, new String[] { "mScrollCache", "scrollBar", "mVerticalTrack" }));
                // Test android:scrollbars
                int scrollbars = (Integer) TestUtil.getField(compScrollView, View.class, "mViewFlags");
                int SCROLLBARS_MASK = 0x00000300;
                scrollbars = scrollbars & SCROLLBARS_MASK;
                // Horizontal
                assertEquals(scrollbars & 0x00000100, 0x00000100);
                // Vertical
                assertEquals(scrollbars & 0x00000200, 0x00000200);
                // Test android:scrollbarDefaultDelayBeforeFade
                // lo testeamos en un ScrollView porque de otra manera el atributo es ignorado si el componente no tiene scrollbars
                assertEquals(compScrollView.getScrollBarDefaultDelayBeforeFade(), 500);
                assertEquals(compScrollView.getScrollBarDefaultDelayBeforeFade(), parsedScrollView.getScrollBarDefaultDelayBeforeFade());
                // No testeamos android:scrollX y android:scrollY (con getScrollX() y getScrollY()) porque después de definirse correctamente
                // algo hace poner a cero los valores, quizás al insertar la View
                assertEquals(compScrollView.getScrollBarFadeDuration(), 600);
                assertEquals(compScrollView.getScrollBarFadeDuration(), parsedScrollView.getScrollBarFadeDuration());
                assertEquals(compScrollView.getScrollBarSize(), ValueUtil.dpToPixelIntRound(10.3f, res));
                assertEquals(compScrollView.getScrollBarSize(), parsedScrollView.getScrollBarSize());
                assertPositive(compScrollView.getScrollBarStyle());
                assertEquals(compScrollView.getScrollBarStyle(), parsedScrollView.getScrollBarStyle());
            }
            {
                // No usamos aquí TextView porque minHeight/minWidth se definen también en TextView y no podríamos testear para View (testearíamos los de TextView)
                final View compTextView2 = compLinLayout.getChildAt(2);
                final View parsedTextView2 = parsedLinLayout.getChildAt(2);
                //assertEquals(compTextView2.getText(), parsedTextView2.getText());
                // Test android:filterTouchesWhenObscured
                assertTrue(compTextView2.getFilterTouchesWhenObscured());
                // por ello mostramos un alertDialog no lanzamos una excepción
                if (compTextView2.getFilterTouchesWhenObscured() != parsedTextView2.getFilterTouchesWhenObscured())
                    TestUtil.alertDialog(compTextView2.getContext(), "Test failed in filterTouchesWhenObscured, don't worry it seems an Android emulator bug (running on 4.1 API 16 emulator?)");
                assertTrue(compTextView2.isFocusable());
                assertEquals(compTextView2.isFocusable(), parsedTextView2.isFocusable());
                assertTrue(compTextView2.isFocusableInTouchMode());
                assertEquals(compTextView2.isFocusableInTouchMode(), parsedTextView2.isFocusableInTouchMode());
                assertFalse(compTextView2.isHapticFeedbackEnabled());
                assertEquals(compTextView2.isHapticFeedbackEnabled(), parsedTextView2.isHapticFeedbackEnabled());
                assertPositive(compTextView2.getId());
                assertEquals(compTextView2.getId(), parsedTextView2.getId());
                assertEquals(compTextView2.getImportantForAccessibility(), View.IMPORTANT_FOR_ACCESSIBILITY_YES);
                assertEquals(compTextView2.getImportantForAccessibility(), parsedTextView2.getImportantForAccessibility());
                assertFalse(compTextView2.isScrollContainer());
                assertEquals(compTextView2.isScrollContainer(), parsedTextView2.isScrollContainer());
                assertTrue(compTextView2.getKeepScreenOn());
                assertEquals(compTextView2.getKeepScreenOn(), parsedTextView2.getKeepScreenOn());
                assertEquals(compTextView2.getLayerType(), View.LAYER_TYPE_HARDWARE);
                assertEquals(compTextView2.getLayerType(), parsedTextView2.getLayerType());
                assertTrue(compTextView2.isLongClickable());
                assertEquals(compTextView2.isLongClickable(), parsedTextView2.isLongClickable());
                // Test android:minHeight
                assertEquals((Integer) TestUtil.getField(compTextView2, View.class, "mMinHeight"), ValueUtil.dpToPixelIntRound(30.3f, res));
                assertEquals((Integer) TestUtil.getField(compTextView2, View.class, "mMinHeight"), (Integer) TestUtil.getField(parsedTextView2, View.class, "mMinHeight"));
                assertEquals((Integer) TestUtil.getField(compTextView2, View.class, "mMinWidth"), ValueUtil.dpToPixelIntRound(30.3f, res));
                assertEquals((Integer) TestUtil.getField(compTextView2, View.class, "mMinWidth"), (Integer) TestUtil.getField(parsedTextView2, View.class, "mMinWidth"));
                assertPositive(compTextView2.getNextFocusDownId());
                assertEquals(compTextView2.getNextFocusDownId(), parsedTextView2.getNextFocusDownId());
                assertPositive(compTextView2.getNextFocusForwardId());
                assertEquals(compTextView2.getNextFocusForwardId(), parsedTextView2.getNextFocusForwardId());
                assertPositive(compTextView2.getNextFocusLeftId());
                assertEquals(compTextView2.getNextFocusLeftId(), parsedTextView2.getNextFocusLeftId());
                assertPositive(compTextView2.getNextFocusRightId());
                assertEquals(compTextView2.getNextFocusRightId(), parsedTextView2.getNextFocusRightId());
                assertPositive(compTextView2.getNextFocusUpId());
                assertEquals(compTextView2.getNextFocusUpId(), parsedTextView2.getNextFocusUpId());
                // No puedo testear android:onClick porque no hay get nativo asociado
                assertEquals(compTextView2.getPaddingLeft(), ValueUtil.dpToPixelIntRound(10.3f, res));
                assertEquals(compTextView2.getPaddingLeft(), parsedTextView2.getPaddingLeft());
                assertEquals(compTextView2.getPaddingRight(), ValueUtil.dpToPixelIntRound(11.3f, res));
                assertEquals(compTextView2.getPaddingRight(), parsedTextView2.getPaddingRight());
                assertEquals(compTextView2.getPaddingTop(), ValueUtil.dpToPixelIntRound(12.3f, res));
                assertEquals(compTextView2.getPaddingTop(), parsedTextView2.getPaddingTop());
                assertEquals(compTextView2.getPaddingBottom(), ValueUtil.dpToPixelIntRound(13.3f, res));
                assertEquals(compTextView2.getPaddingBottom(), parsedTextView2.getPaddingBottom());
                assertEquals(compTextView2.getRotation(), 10.5f);
                assertEquals(compTextView2.getRotation(), parsedTextView2.getRotation());
                assertEquals(compTextView2.getRotationX(), 45.5f);
                assertEquals(compTextView2.getRotationX(), parsedTextView2.getRotationX());
                assertEquals(compTextView2.getRotationY(), 10.5f);
                assertEquals(compTextView2.getRotationY(), parsedTextView2.getRotationY());
                assertFalse(compTextView2.isSaveEnabled());
                assertEquals(compTextView2.isSaveEnabled(), parsedTextView2.isSaveEnabled());
                assertEquals(compTextView2.getScaleX(), 1.2f);
                assertEquals(compTextView2.getScaleX(), parsedTextView2.getScaleX());
                assertEquals(compTextView2.getScaleY(), 1.2f);
                assertEquals(compTextView2.getScaleY(), parsedTextView2.getScaleY());
                assertFalse(compTextView2.isSoundEffectsEnabled());
                assertEquals(compTextView2.isSoundEffectsEnabled(), parsedTextView2.isSoundEffectsEnabled());
                assertEquals((String) compTextView2.getTag(), "theTag");
                assertEquals((String) compTextView2.getTag(), (String) parsedTextView2.getTag());
                /*
                    final int TEXT_ALIGNMENT_MASK_SHIFT = 13;
                    final int TEXT_ALIGNMENT_MASK = 0x00000007 << TEXT_ALIGNMENT_MASK_SHIFT;

                    int compPrivateFlags2 = (Integer)TestUtil.getField(compTextView2,View.class,"mPrivateFlags2");
                    int compTextAlignment = (compPrivateFlags2 & TEXT_ALIGNMENT_MASK) >> TEXT_ALIGNMENT_MASK_SHIFT;
                    assertEquals(compTextAlignment, 4 ); // center
                    */
                assertEquals(compTextView2.getPivotX(), ValueUtil.dpToPixelFloatFloor(70.3f, res));
                assertEquals(compTextView2.getPivotX(), parsedTextView2.getPivotX());
                assertEquals(compTextView2.getPivotY(), ValueUtil.dpToPixelFloatFloor(10.3f, res));
                assertEquals(compTextView2.getPivotY(), parsedTextView2.getPivotY());
                assertEquals(compTextView2.getTranslationX(), ValueUtil.dpToPixelFloatFloor(10.3f, res));
                assertEquals(compTextView2.getTranslationX(), parsedTextView2.getTranslationX());
                assertEquals(compTextView2.getTranslationY(), ValueUtil.dpToPixelFloatFloor(10.3f, res));
                assertEquals(compTextView2.getTranslationY(), parsedTextView2.getTranslationY());
            }
        }
    }
    // Test AnalogClock
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test AnalogClock");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        final AnalogClock compLayout = (AnalogClock) comp.getChildAt(childCount);
        final AnalogClock parsedLayout = (AnalogClock) parsed.getChildAt(childCount);
        // android:dial
        assertNotNull((Drawable) TestUtil.getField(compLayout, "mDial"));
        assertEquals((Drawable) TestUtil.getField(compLayout, "mDial"), (Drawable) TestUtil.getField(parsedLayout, "mDial"));
        // android:hand_hour
        assertNotNull((Drawable) TestUtil.getField(compLayout, "mHourHand"));
        assertEquals((Drawable) TestUtil.getField(compLayout, "mHourHand"), (Drawable) TestUtil.getField(parsedLayout, "mHourHand"));
        // android:hand_minute
        assertNotNull((Drawable) TestUtil.getField(compLayout, "mMinuteHand"));
        assertEquals((Drawable) TestUtil.getField(compLayout, "mMinuteHand"), (Drawable) TestUtil.getField(parsedLayout, "mMinuteHand"));
    }
    // Test ImageView
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test ImageView");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        final ImageView compLayout = (ImageView) comp.getChildAt(childCount);
        final ImageView parsedLayout = (ImageView) parsed.getChildAt(childCount);
        // android:adjustViewBounds (método get es Level 16)
        assertTrue((Boolean) TestUtil.getField(compLayout, "mAdjustViewBounds"));
        assertEquals((Boolean) TestUtil.getField(compLayout, "mAdjustViewBounds"), (Boolean) TestUtil.getField(parsedLayout, "mAdjustViewBounds"));
        assertEquals(compLayout.getBaseline(), ValueUtil.dpToPixelIntFloor(40.3f, res));
        parsedLayout.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {

            @Override
            public void onLayoutChange(View view, int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8) {
                assertEquals(compLayout.getBaseline(), parsedLayout.getBaseline());
            }
        });
        assertTrue(compLayout.getBaselineAlignBottom());
        assertEquals(compLayout.getBaselineAlignBottom(), parsedLayout.getBaselineAlignBottom());
        assertTrue((Boolean) TestUtil.getField(compLayout, "mCropToPadding"));
        assertEquals((Boolean) TestUtil.getField(compLayout, "mCropToPadding"), (Boolean) TestUtil.getField(parsedLayout, "mCropToPadding"));
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaxHeight"), ValueUtil.dpToPixelIntRound(1000.3f, res));
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaxHeight"), (Integer) TestUtil.getField(parsedLayout, "mMaxHeight"));
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaxWidth"), ValueUtil.dpToPixelIntRound(1000.3f, res));
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaxWidth"), (Integer) TestUtil.getField(parsedLayout, "mMaxWidth"));
        assertEquals(compLayout.getScaleType().ordinal(), ImageView.ScaleType.CENTER_INSIDE.ordinal());
        assertEquals(compLayout.getScaleType().ordinal(), parsedLayout.getScaleType().ordinal());
        // android:src (no tiene método get)
        assertNotNull((Drawable) TestUtil.getField(compLayout, "mDrawable"));
        assertEquals((Drawable) TestUtil.getField(compLayout, "mDrawable"), (Drawable) TestUtil.getField(parsedLayout, "mDrawable"));
        // android:tint (no tiene método get)
        if (// LOLLIPOP = 21
        Build.VERSION.SDK_INT < TestUtil.LOLLIPOP) {
            // No hay manera de comparar dos PorterDuffColorFilter, si no define el hint devuelve null por lo que algo es algo
            // 0x55eeee55
            assertNotNull(((PorterDuffColorFilter) TestUtil.getField(compLayout, "mColorFilter")));
            assertNotNull(((PorterDuffColorFilter) TestUtil.getField(parsedLayout, "mColorFilter")));
        } else {
            // A partir de Lollipop via XML no se define el tint con setColorFilter() sino de otra forma
            assertEquals((PorterDuff.Mode) TestUtil.callGetMethod(compLayout, "getImageTintMode"), PorterDuff.Mode.SRC_ATOP);
            assertEquals((PorterDuff.Mode) TestUtil.callGetMethod(compLayout, "getImageTintMode"), (PorterDuff.Mode) TestUtil.callGetMethod(parsedLayout, "getImageTintMode"));
            assertEquals((ColorStateList) TestUtil.callGetMethod(compLayout, "getImageTintList"), ColorStateList.valueOf(0x55eeee55));
            assertEquals((ColorStateList) TestUtil.callGetMethod(compLayout, "getImageTintList"), (ColorStateList) TestUtil.callGetMethod(parsedLayout, "getImageTintList"));
        }
    }
    // Test ProgressBar
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test ProgressBar");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    // Test ProgressBar (indeterminate)
    {
        childCount++;
        final ProgressBar compLayout = (ProgressBar) comp.getChildAt(childCount);
        final ProgressBar parsedLayout = (ProgressBar) parsed.getChildAt(childCount);
        assertTrue(compLayout.isIndeterminate());
        assertEquals(compLayout.isIndeterminate(), parsedLayout.isIndeterminate());
        // android:indeterminateBehavior
        assertEquals((Integer) TestUtil.getField(compLayout, "mBehavior"), 2);
        assertEquals((Integer) TestUtil.getField(compLayout, "mBehavior"), (Integer) TestUtil.getField(parsedLayout, "mBehavior"));
        assertNotNull((LayerDrawable) compLayout.getIndeterminateDrawable());
        assertEquals((LayerDrawable) compLayout.getIndeterminateDrawable(), (LayerDrawable) parsedLayout.getIndeterminateDrawable());
        // android:indeterminateDuration
        assertEquals((Integer) TestUtil.getField(compLayout, "mDuration"), 6000);
        assertEquals((Integer) TestUtil.getField(compLayout, "mDuration"), (Integer) TestUtil.getField(parsedLayout, "mDuration"));
        // android:indeterminateOnly
        assertTrue((Boolean) TestUtil.getField(compLayout, "mOnlyIndeterminate"));
        assertEquals((Boolean) TestUtil.getField(compLayout, "mOnlyIndeterminate"), (Boolean) TestUtil.getField(parsedLayout, "mOnlyIndeterminate"));
        // android:interpolator
        // LinearInterpolator no tiene atributos, simplemente el valor suministrado es devuelto como tal por lo que
        // todos los objetos LinearInterpolator son iguales funcionalmente aunque no sean iguales como instancia
        // testear la no nulidad y el tipo es suficiente
        // http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.3_r1/android/view/animation/LinearInterpolator.java?av=f
        assertNotNull((LinearInterpolator) compLayout.getInterpolator());
        assertNotNull((LinearInterpolator) parsedLayout.getInterpolator());
    }
    // Test ProgressBar (determinate)
    {
        childCount++;
        final ProgressBar compLayout = (ProgressBar) comp.getChildAt(childCount);
        final ProgressBar parsedLayout = (ProgressBar) parsed.getChildAt(childCount);
        assertEquals(compLayout.getMax(), 90);
        assertEquals(compLayout.getMax(), parsedLayout.getMax());
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaxHeight"), ValueUtil.dpToPixelIntRound(30.3f, res));
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaxHeight"), (Integer) TestUtil.getField(parsedLayout, "mMaxHeight"));
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaxWidth"), ValueUtil.dpToPixelIntRound(30.3f, res));
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaxWidth"), (Integer) TestUtil.getField(parsedLayout, "mMaxWidth"));
        assertEquals((Integer) TestUtil.getField(compLayout, "mMinHeight"), ValueUtil.dpToPixelIntRound(20.3f, res));
        assertEquals((Integer) TestUtil.getField(compLayout, "mMinHeight"), (Integer) TestUtil.getField(parsedLayout, "mMinHeight"));
        assertEquals((Integer) TestUtil.getField(compLayout, "mMinWidth"), ValueUtil.dpToPixelIntRound(20.3f, res));
        assertEquals((Integer) TestUtil.getField(compLayout, "mMinWidth"), (Integer) TestUtil.getField(parsedLayout, "mMinWidth"));
        assertEquals(compLayout.getProgress(), 30);
        assertEquals(compLayout.getProgress(), parsedLayout.getProgress());
        assertNotNull((LayerDrawable) compLayout.getProgressDrawable());
        assertEquals((LayerDrawable) compLayout.getProgressDrawable(), (LayerDrawable) parsedLayout.getProgressDrawable());
        assertEquals(compLayout.getSecondaryProgress(), 50);
        assertEquals(compLayout.getSecondaryProgress(), parsedLayout.getSecondaryProgress());
    }
    // Test RatingBar
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test RatingBar");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        final RatingBar compLayout = (RatingBar) comp.getChildAt(childCount);
        final RatingBar parsedLayout = (RatingBar) parsed.getChildAt(childCount);
        assertFalse(compLayout.isIndicator());
        assertEquals(compLayout.isIndicator(), parsedLayout.isIndicator());
        assertEquals(compLayout.getNumStars(), 6);
        assertEquals(compLayout.getNumStars(), parsedLayout.getNumStars());
        assertEquals(compLayout.getRating(), 5.25f);
        assertEquals(compLayout.getRating(), parsedLayout.getRating());
        assertEquals(compLayout.getStepSize(), 0.75f);
        assertEquals(compLayout.getStepSize(), parsedLayout.getStepSize());
    }
    // Test SeekBar
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test SeekBar");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        final SeekBar compLayout = (SeekBar) comp.getChildAt(childCount);
        final SeekBar parsedLayout = (SeekBar) parsed.getChildAt(childCount);
        // Test android:thumb
        assertNotNull((StateListDrawable) TestUtil.getField(compLayout, AbsSeekBar.class, "mThumb"));
        assertEquals((StateListDrawable) TestUtil.getField(parsedLayout, AbsSeekBar.class, "mThumb"), (StateListDrawable) TestUtil.getField(parsedLayout, AbsSeekBar.class, "mThumb"));
    }
    // Test TextView
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test TextView");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    // Test TextView 1
    {
        childCount++;
        final TextView compLayout = (TextView) comp.getChildAt(childCount);
        final TextView parsedLayout = (TextView) parsed.getChildAt(childCount);
        // Test android:autoLink
        // web
        assertEquals(compLayout.getAutoLinkMask() & 0x01, 0x01);
        // email
        assertEquals(compLayout.getAutoLinkMask() & 0x02, 0x02);
        // web|email
        assertEquals(compLayout.getAutoLinkMask(), 0x03);
        assertEquals(compLayout.getAutoLinkMask(), parsedLayout.getAutoLinkMask());
        // Test android:bufferType
        assertEquals((TextView.BufferType) TestUtil.getField(compLayout, "mBufferType"), TextView.BufferType.EDITABLE);
        assertEquals((TextView.BufferType) TestUtil.getField(compLayout, "mBufferType"), (TextView.BufferType) TestUtil.getField(parsedLayout, "mBufferType"));
        // Test android:cursorVisible
        assertTrue((Boolean) TestUtil.callGetMethod(compLayout, "isCursorVisible"));
        assertEquals((Boolean) TestUtil.callGetMethod(compLayout, "isCursorVisible"), (Boolean) TestUtil.callGetMethod(parsedLayout, "isCursorVisible"));
        // Test android:drawableBottom,android:drawableLeft,android:drawableRight,android:drawableTop
        assertEquals(compLayout.getCompoundDrawables().length, 4);
        Drawable[] compDrawArr = compLayout.getCompoundDrawables();
        Drawable[] parsedDrawArr = parsedLayout.getCompoundDrawables();
        for (int i = 0; i < 4; i++) {
            assertEquals(compDrawArr[i], parsedDrawArr[i]);
        }
        // Test android:drawableStart,android:drawableEnd
        // Visualmente no se pueden probar si no es en modo RTL y API 17
        // LO dejamos para cuando el level minimo sea API 17
        /*
            FieldContainer<Object> fieldDrawables = new FieldContainer<Object>(TextView.class,"mDrawables");
            Class classDrawables = fieldDrawables.getField().getType();
            String[] fieldMemberNames = new String[]{"mDrawableStart", "mDrawableEnd"};
            FieldContainer<Drawable>[] fieldMemberDrawables = (FieldContainer<Drawable>[])new FieldContainer[fieldMemberNames.length];
            for (int i = 0; i < fieldMemberNames.length; i++) {
                fieldMemberDrawables[i] = new FieldContainer(classDrawables, fieldMemberNames[i]);
            }
            assertEquals(fieldMemberDrawables[0].get(compLayout),fieldMemberDrawables[0].get(parsedLayout));
            assertEquals(fieldMemberDrawables[1].get(compLayout),fieldMemberDrawables[1].get(parsedLayout));
            */
        // Test android:drawablePadding
        assertEquals(compLayout.getCompoundDrawablePadding(), ValueUtil.dpToPixelIntRound(10.3f, res));
        assertEquals(compLayout.getCompoundDrawablePadding(), parsedLayout.getCompoundDrawablePadding());
        assertEquals(compLayout.getEllipsize(), TextUtils.TruncateAt.MARQUEE);
        assertEquals(compLayout.getEllipsize(), parsedLayout.getEllipsize());
        // Test android:ems  Cuando se define llamando setEms(int) se definen también con el mismo valor minEms y maxEms
        assertEquals((Integer) TestUtil.getField(compLayout, "mMinWidth"), 50);
        assertEquals((Integer) TestUtil.getField(compLayout, "mMinWidth"), (Integer) TestUtil.getField(parsedLayout, "mMinWidth"));
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaxWidth"), 50);
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaxWidth"), (Integer) TestUtil.getField(parsedLayout, "mMaxWidth"));
        // Test android:fontFamily
        assertEquals(compLayout.getTypeface().getStyle(), parsedLayout.getTypeface().getStyle());
        assertTrue(compLayout.getFreezesText());
        assertEquals(compLayout.getFreezesText(), parsedLayout.getFreezesText());
        // Tests android:gravity
        assertEquals(compLayout.getGravity(), Gravity.CENTER_VERTICAL | Gravity.CENTER_HORIZONTAL);
        assertEquals(compLayout.getGravity(), parsedLayout.getGravity());
        /* No testeamos android:height porque se pisa con android:ems
            assertEquals(compLayout.getHeight(),ValueUtil.dpToPixelIntRound(45,res));
            assertEquals(compLayout.getHeight(),parsedLayout.getHeight());
            */
        assertEquals(compLayout.getHint(), "Hint Text Test");
        assertEquals(compLayout.getHint(), parsedLayout.getHint());
        assertEquals(compLayout.getImeActionId(), 0x00000002);
        assertEquals(compLayout.getImeActionId(), parsedLayout.getImeActionId());
        assertEquals(compLayout.getImeActionLabel(), "Gojm");
        assertEquals(compLayout.getImeActionLabel(), parsedLayout.getImeActionLabel());
        assertEquals(compLayout.getImeOptions(), EditorInfo.IME_ACTION_GO | EditorInfo.IME_ACTION_SEARCH);
        assertEquals(compLayout.getImeOptions(), parsedLayout.getImeOptions());
        // Test android:includeFontPadding
        assertFalse((Boolean) TestUtil.getField(compLayout, "mIncludePad"));
        assertEquals((Boolean) TestUtil.getField(compLayout, "mIncludePad"), (Boolean) TestUtil.getField(parsedLayout, "mIncludePad"));
        assertEquals(compLayout.getInputType(), InputType.TYPE_CLASS_TEXT | InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_NORMAL);
        assertEquals(compLayout.getInputType(), parsedLayout.getInputType());
        // Test android:lineSpacingExtra
        assertEquals((Float) TestUtil.getField(compLayout, "mSpacingAdd"), ValueUtil.dpToPixelFloatRound(5.3f, res));
        assertEquals((Float) TestUtil.getField(compLayout, "mSpacingAdd"), (Float) TestUtil.getField(parsedLayout, "mSpacingAdd"));
        // Test android:lineSpacingMultiplier
        assertEquals((Float) TestUtil.getField(compLayout, "mSpacingMult"), 1.2f);
        assertEquals((Float) TestUtil.getField(compLayout, "mSpacingMult"), (Float) TestUtil.getField(parsedLayout, "mSpacingMult"));
        // Test android:lines
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaximum"), 1);
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaximum"), (Integer) TestUtil.getField(parsedLayout, "mMaximum"));
        assertEquals((Integer) TestUtil.getField(compLayout, "mMinimum"), 1);
        assertEquals((Integer) TestUtil.getField(compLayout, "mMinimum"), (Integer) TestUtil.getField(parsedLayout, "mMinimum"));
        // modo LINES = 1
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaxMode"), 1);
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaxMode"), (Integer) TestUtil.getField(parsedLayout, "mMaxMode"));
        assertEquals((Integer) TestUtil.getField(compLayout, "mMinMode"), 1);
        assertEquals((Integer) TestUtil.getField(compLayout, "mMinMode"), (Integer) TestUtil.getField(parsedLayout, "mMinMode"));
        assertFalse(compLayout.getLinksClickable());
        assertEquals(compLayout.getLinksClickable(), parsedLayout.getLinksClickable());
        assertEquals((Integer) TestUtil.getField(compLayout, "mMarqueeRepeatLimit"), -1);
        assertEquals((Integer) TestUtil.getField(compLayout, "mMarqueeRepeatLimit"), (Integer) TestUtil.getField(parsedLayout, "mMarqueeRepeatLimit"));
        // Test android:maxEms
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaxWidth"), 50);
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaxWidth"), (Integer) TestUtil.getField(parsedLayout, "mMaxWidth"));
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaxWidthMode"), 1);
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaxWidthMode"), (Integer) TestUtil.getField(parsedLayout, "mMaxWidthMode"));
        // Test android:maxLength
        assertEquals((InputFilter.LengthFilter) compLayout.getFilters()[0], new InputFilter.LengthFilter(1000));
        assertEquals((InputFilter.LengthFilter) compLayout.getFilters()[0], (InputFilter.LengthFilter) parsedLayout.getFilters()[0]);
        // Test android:maxLines
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaximum"), 1);
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaximum"), (Integer) TestUtil.getField(parsedLayout, "mMaximum"));
        // modo LINES = 1
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaxMode"), 1);
        assertEquals((Integer) TestUtil.getField(compLayout, "mMaxMode"), (Integer) TestUtil.getField(parsedLayout, "mMaxMode"));
        // Test android:minEms
        assertEquals((Integer) TestUtil.getField(compLayout, "mMinWidth"), 50);
        assertEquals((Integer) TestUtil.getField(compLayout, "mMinWidth"), (Integer) TestUtil.getField(parsedLayout, "mMinWidth"));
        assertEquals((Integer) TestUtil.getField(compLayout, "mMinWidthMode"), 1);
        assertEquals((Integer) TestUtil.getField(compLayout, "mMinWidthMode"), (Integer) TestUtil.getField(parsedLayout, "mMinWidthMode"));
        // Test android:minLines
        assertEquals((Integer) TestUtil.getField(compLayout, "mMinimum"), 1);
        assertEquals((Integer) TestUtil.getField(compLayout, "mMinimum"), (Integer) TestUtil.getField(parsedLayout, "mMinimum"));
        assertEquals((Integer) TestUtil.getField(compLayout, "mMinMode"), 1);
        assertEquals((Integer) TestUtil.getField(compLayout, "mMinMode"), (Integer) TestUtil.getField(parsedLayout, "mMinMode"));
        assertEquals(compLayout.getPrivateImeOptions(), "com.example.myapp.JustToWriteSomething=3");
        assertEquals(compLayout.getPrivateImeOptions(), parsedLayout.getPrivateImeOptions());
        // android:scrollHorizontally
        assertTrue((Boolean) TestUtil.getField(compLayout, "mHorizontallyScrolling"));
        assertEquals((Boolean) TestUtil.getField(compLayout, "mHorizontallyScrolling"), (Boolean) TestUtil.getField(parsedLayout, "mHorizontallyScrolling"));
        // Test android:selectAllOnFocus
        // mSelectAllOnFocus está dentro del atributo mEditor (android.widget.Editor) desde 4.1 (API 16)
        Object compEditor = TestUtil.getField(compLayout, "mEditor");
        Object parsedEditor = TestUtil.getField(parsedLayout, "mEditor");
        assertTrue((Boolean) TestUtil.getField(compEditor, "mSelectAllOnFocus"));
        assertEquals((Boolean) TestUtil.getField(compEditor, "mSelectAllOnFocus"), (Boolean) TestUtil.getField(parsedEditor, "mSelectAllOnFocus"));
        // Test android:shadowColor
        // A partir de la versión 16 hay un método getShadowColor(), en teoría se podría seguir usando el atributo interno shadowColor de Paint pero en Level 21 (Lollipop) desaparece, usar el método desde level 16 es la mejor opción
        assertEquals((Integer) TestUtil.callGetMethod(compLayout, "getShadowColor"), 0xffff0000);
        assertEquals((Integer) TestUtil.callGetMethod(compLayout, "getShadowColor"), (Integer) TestUtil.callGetMethod(parsedLayout, "getShadowColor"));
        // Test android:shadowDx
        assertEquals((Float) TestUtil.getField(compLayout, "mShadowDx"), 1.1f);
        assertEquals((Float) TestUtil.getField(compLayout, "mShadowDx"), (Float) TestUtil.getField(parsedLayout, "mShadowDx"));
        // Test android:shadowDy
        assertEquals((Float) TestUtil.getField(compLayout, "mShadowDy"), 1.2f);
        assertEquals((Float) TestUtil.getField(compLayout, "mShadowDy"), (Float) TestUtil.getField(parsedLayout, "mShadowDy"));
        // Test android:shadowRadius
        assertEquals((Float) TestUtil.getField(compLayout, "mShadowRadius"), 1.3f);
        assertEquals((Float) TestUtil.getField(compLayout, "mShadowRadius"), (Float) TestUtil.getField(parsedLayout, "mShadowRadius"));
        // Test android:singleLine
        assertTrue((Boolean) TestUtil.getField(compLayout, "mSingleLine"));
        assertEquals((Boolean) TestUtil.getField(compLayout, "mSingleLine"), (Boolean) TestUtil.getField(parsedLayout, "mSingleLine"));
        // Test android:text
        // El inputType influye en el tipo de objeto de texto
        assertEquals((SpannableStringBuilder) compLayout.getText(), new SpannableStringBuilder("TextView Tests 1 (this text is cut on the right)"));
        assertEquals(compLayout.getText(), parsedLayout.getText());
        // Test: android:textAllCaps no he conseguido que funcione ni en modo compilado en este test
        // pero los TransformationMethod parecen correctos
        TransformationMethod comp_trans = compLayout.getTransformationMethod();
        TransformationMethod parsed_trans = parsedLayout.getTransformationMethod();
        assertEquals(comp_trans.getClass().getName(), "android.text.method.AllCapsTransformationMethod");
        assertEquals(comp_trans.getClass().getName(), parsed_trans.getClass().getName());
        // Test: android:textColor
        assertEquals(compLayout.getTextColors().getDefaultColor(), 0xff00ff00);
        assertEquals(compLayout.getTextColors(), parsedLayout.getTextColors());
        // Test android:textColorHighlight
        assertEquals((Integer) TestUtil.getField(compLayout, "mHighlightColor"), 0xff0000ff);
        assertEquals((Integer) TestUtil.getField(compLayout, "mHighlightColor"), (Integer) TestUtil.getField(parsedLayout, "mHighlightColor"));
        // Test android:textColorHint
        assertEquals(compLayout.getHintTextColors().getDefaultColor(), 0xff00ff00);
        assertEquals(compLayout.getHintTextColors(), parsedLayout.getHintTextColors());
        assertFalse(compLayout.isTextSelectable());
        assertEquals(compLayout.isTextSelectable(), parsedLayout.isTextSelectable());
        assertEquals(compLayout.getTextScaleX(), 1.2f);
        assertEquals(compLayout.getTextScaleX(), parsedLayout.getTextScaleX());
        assertEquals(compLayout.getTextSize(), ValueUtil.dpToPixelFloatRound(15.3f, res));
        assertEquals(compLayout.getTextSize(), parsedLayout.getTextSize());
        // Test android:textStyle y typeface
        int NORMAL = 0, BOLD = 1, ITALIC = 2;
        Typeface compTf = compLayout.getTypeface();
        Typeface parsedTf = parsedLayout.getTypeface();
        assertEquals(compTf.getStyle(), BOLD | ITALIC);
        assertEquals(compTf.getStyle(), parsedTf.getStyle());
        if (Build.VERSION.SDK_INT < TestUtil.LOLLIPOP)
            assertEquals((Integer) TestUtil.getField(compTf, "native_instance"), (Integer) TestUtil.getField(parsedTf, "native_instance"));
        else
            // A partir de Lollipop (level 21) es un long
            assertEquals((Long) TestUtil.getField(compTf, "native_instance"), (Long) TestUtil.getField(parsedTf, "native_instance"));
    }
    // Test TextView 2
    // Se testean de nuevo algunos atributos y otros que no podían testearse antes
    {
        childCount++;
        final TextView compLayout = (TextView) comp.getChildAt(childCount);
        final TextView parsedLayout = (TextView) parsed.getChildAt(childCount);
        // Test android:textStyle y fontFamily
        int NORMAL = 0, BOLD = 1, ITALIC = 2;
        // sans-serif
        Typeface compTf = compLayout.getTypeface();
        Typeface parsedTf = parsedLayout.getTypeface();
        assertEquals(compTf.getStyle(), NORMAL | BOLD | ITALIC);
        assertEquals(compTf.getStyle(), parsedTf.getStyle());
        if (Build.VERSION.SDK_INT < TestUtil.LOLLIPOP)
            assertEquals((Integer) TestUtil.getField(compTf, "native_instance"), (Integer) TestUtil.getField(parsedTf, "native_instance"));
        else
            // A partir de Lollipop (level 21) es un long
            assertEquals((Long) TestUtil.getField(compTf, "native_instance"), (Long) TestUtil.getField(parsedTf, "native_instance"));
        assertEquals((SpannableString) compLayout.getText(), new SpannableString("TextView Tests 2 (this text is much more longer and is cut on the right with ellipsis points)"));
        assertEquals(compLayout.getText(), parsedLayout.getText());
        // Test android:bufferType
        // Repetimos este test con SPANNABLE porque en el anterior por alguna razón se cambiaba a EDITABLE
        assertEquals((TextView.BufferType) TestUtil.getField(compLayout, "mBufferType"), TextView.BufferType.SPANNABLE);
        assertEquals((TextView.BufferType) TestUtil.getField(compLayout, "mBufferType"), (TextView.BufferType) TestUtil.getField(parsedLayout, "mBufferType"));
        assertEquals(compLayout.getEllipsize(), TextUtils.TruncateAt.END);
        assertEquals(compLayout.getEllipsize(), parsedLayout.getEllipsize());
        // Test android:height, android:maxHeight
        parsedLayout.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {

            @Override
            public void onLayoutChange(View view, int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8) {
                // getHeight() no se corresponde exactamente con setHeight(int) pero el resultado es coherente (NO CON PRECISION)
                //assertEquals(compLayout.getHeight(), ValueUtil.dpToPixelIntRound(30.3f, res));
                //assertEquals(compLayout.getHeight(), parsedLayout.getHeight());
                // Via mMinWidth y mMaximum testeamos indirectamente el android:height, la discordancia es por el setHeight() que no usa internamente Android (mMinHeight es 0 en parsedLayout)
                assertEquals((Integer) TestUtil.getField(compLayout, View.class, "mMinHeight"), ValueUtil.dpToPixelIntRound(30.3f, res));
                assertEquals((Integer) TestUtil.getField(compLayout, View.class, "mMinHeight"), (Integer) TestUtil.getField(parsedLayout, "mMaximum"));
            // Estos tests no funcionan porque mi impresión es que layout_height="30dp" define la altura por su cuenta pero
            // no como PIXELS sino como LINES en el layout compilado
            //assertEquals((Integer)TestUtil.getField(compLayout, "mMaxMode"),2); // modo PIXELS = 2
            //assertEquals((Integer)TestUtil.getField(compLayout, "mMaxMode"),(Integer)TestUtil.getField(parsedLayout, "mMaxMode"));
            //assertEquals((Integer)TestUtil.getField(compLayout, "mMaximum"),ValueUtil.dpToPixelIntRound(30,res));
            //assertEquals((Integer)TestUtil.getField(compLayout, "mMaximum"),(Integer)TestUtil.getField(parsedLayout, "mMaximum"));
            }
        });
        // Test android:width, android:maxWidth
        parsedLayout.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {

            @Override
            public void onLayoutChange(View view, int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8) {
                // Ver notas de android:height, android:maxHeight
                //assertEquals(compLayout.getWidth(), ValueUtil.dpToPixelIntRound(200.3f, res));
                //assertEquals(compLayout.getWidth(), parsedLayout.getWidth());
                // Via mMinWidth testeamos indirectamente el android:width
                assertEquals((Integer) TestUtil.getField(compLayout, "mMinWidth"), ValueUtil.dpToPixelIntRound(200.3f, res));
                assertEquals((Integer) TestUtil.getField(compLayout, "mMinWidth"), (Integer) TestUtil.getField(parsedLayout, "mMinWidth"));
                assertEquals((Integer) TestUtil.getField(compLayout, "mMaxWidth"), ValueUtil.dpToPixelIntRound(200.3f, res));
                assertEquals((Integer) TestUtil.getField(compLayout, "mMaxWidth"), (Integer) TestUtil.getField(parsedLayout, "mMaxWidth"));
            }
        });
        // Test: android:textAllCaps
        TransformationMethod comp_trans = compLayout.getTransformationMethod();
        TransformationMethod parsed_trans = parsedLayout.getTransformationMethod();
        assertEquals(comp_trans.getClass().getName(), "android.text.method.AllCapsTransformationMethod");
        assertEquals(comp_trans.getClass().getName(), parsed_trans.getClass().getName());
        assertTrue(compLayout.isTextSelectable());
        assertEquals(compLayout.isTextSelectable(), parsedLayout.isTextSelectable());
        // Test android:singleLine
        assertTrue((Boolean) TestUtil.getField(compLayout, "mSingleLine"));
        assertEquals((Boolean) TestUtil.getField(compLayout, "mSingleLine"), (Boolean) TestUtil.getField(parsedLayout, "mSingleLine"));
    }
    // Test TextView 3-1 (textAppearance y hint)
    {
        childCount++;
        final TextView compLayout = (TextView) comp.getChildAt(childCount);
        final TextView parsedLayout = (TextView) parsed.getChildAt(childCount);
        assertEquals(compLayout.getHint(), "Hint Text (TextView Tests 3-1)");
        assertEquals(compLayout.getHint(), parsedLayout.getHint());
        // Test del textAppearance style incluyendo el parent="...", el size explícito substituye el definido en el parent
        assertEquals(compLayout.getTextSize(), ValueUtil.dpToPixelFloatRound(21.3f, res));
        assertEquals(compLayout.getTextSize(), parsedLayout.getTextSize());
    }
    // Test TextView 3-2 (textAppearance)
    {
        childCount++;
        final TextView compLayout = (TextView) comp.getChildAt(childCount);
        final TextView parsedLayout = (TextView) parsed.getChildAt(childCount);
        assertEquals(compLayout.getText(), "TextView Tests 3-2 (text color=red,size=small)");
        assertEquals(compLayout.getText(), parsedLayout.getText());
        // Test del <style> incluyendo el parent="..."
        int[] attrs = { android.R.attr.textSize };
        TypedArray ta = ctx.obtainStyledAttributes(ctx.getResources().getIdentifier("@android:style/TextAppearance.DeviceDefault.Small", null, null), attrs);
        float textSize = ta.getDimension(0, 0);
        ta.recycle();
        // El textSize se define haciendo un float-round, eso mismo tenemos que hacer con el default de TextAppearance:
        textSize = (int) (textSize + 0.5f);
        assertEquals(compLayout.getTextSize(), textSize);
        assertEquals(compLayout.getTextSize(), parsedLayout.getTextSize());
        assertEquals(compLayout.getCurrentTextColor(), 0xFFFF0000);
        assertEquals(compLayout.getCurrentTextColor(), parsedLayout.getCurrentTextColor());
    }
    // CompoundButton Tests (a través de CheckBox)
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test CompoundButton via CheckBox");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        final CheckBox compLayout = (CheckBox) comp.getChildAt(childCount);
        final CheckBox parsedLayout = (CheckBox) parsed.getChildAt(childCount);
        assertEquals(compLayout.getText(), "CompoundButton Tests");
        assertEquals(compLayout.getText(), parsedLayout.getText());
        assertNotNull((StateListDrawable) TestUtil.getField(compLayout, CompoundButton.class, "mButtonDrawable"));
        assertEquals((StateListDrawable) TestUtil.getField(compLayout, CompoundButton.class, "mButtonDrawable"), (StateListDrawable) TestUtil.getField(parsedLayout, CompoundButton.class, "mButtonDrawable"));
        assertTrue(compLayout.isChecked());
        assertEquals(compLayout.isChecked(), parsedLayout.isChecked());
    }
    // Switch Tests
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test Switch");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        final Switch compLayout = (Switch) comp.getChildAt(childCount);
        final Switch parsedLayout = (Switch) parsed.getChildAt(childCount);
        assertEquals(compLayout.getText(), "Switch Tests");
        assertEquals(compLayout.getText(), parsedLayout.getText());
        // android:switchMinWidth
        assertEquals((Integer) TestUtil.getField(compLayout, "mSwitchMinWidth"), ValueUtil.dpToPixelIntRound(150.3f, res));
        assertEquals((Integer) TestUtil.getField(compLayout, "mSwitchMinWidth"), (Integer) TestUtil.getField(parsedLayout, "mSwitchMinWidth"));
        // android:switchPadding
        assertEquals((Integer) TestUtil.getField(compLayout, "mSwitchPadding"), ValueUtil.dpToPixelIntRound(30.3f, res));
        assertEquals((Integer) TestUtil.getField(compLayout, "mSwitchPadding"), (Integer) TestUtil.getField(parsedLayout, "mSwitchPadding"));
        // android:switchTextAppearance
        // No tenemos una forma de testear "switchTextAppearanceLarge" de forma directa, una forma es testear una de las propiedades que impone, ej el tamaño del texto
        Paint compTextPaint = (Paint) TestUtil.getField(compLayout, "mTextPaint");
        Paint parsedTextPaint = (Paint) TestUtil.getField(parsedLayout, "mTextPaint");
        assertEquals((Float) TestUtil.callMethod(compTextPaint, null, Paint.class, "getTextSize", null), (Float) TestUtil.callMethod(parsedTextPaint, null, Paint.class, "getTextSize", null));
        assertEquals(compLayout.getTextOff(), "NORL");
        assertEquals(compLayout.getTextOff(), parsedLayout.getTextOff());
        assertEquals(compLayout.getTextOn(), "YESRL");
        assertEquals(compLayout.getTextOn(), parsedLayout.getTextOn());
        // Test android:textStyle y android:typeface
        int NORMAL = 0, BOLD = 1, ITALIC = 2;
        Typeface compTf = compLayout.getTypeface();
        Typeface parsedTf = parsedLayout.getTypeface();
        assertEquals(compTf.getStyle(), BOLD | ITALIC);
        assertEquals(compTf.getStyle(), parsedTf.getStyle());
        if (Build.VERSION.SDK_INT < TestUtil.LOLLIPOP)
            assertEquals((Integer) TestUtil.getField(compTf, "native_instance"), (Integer) TestUtil.getField(parsedTf, "native_instance"));
        else
            // A partir de Lollipop (level 21) es un long
            assertEquals((Long) TestUtil.getField(compTf, "native_instance"), (Long) TestUtil.getField(parsedTf, "native_instance"));
        // Test android:thumb
        assertNotNull((StateListDrawable) TestUtil.getField(compLayout, "mThumbDrawable"));
        assertEquals((StateListDrawable) TestUtil.getField(parsedLayout, "mThumbDrawable"), (StateListDrawable) TestUtil.getField(parsedLayout, "mThumbDrawable"));
        // Test android:thumbTextPadding
        assertEquals((Integer) TestUtil.getField(compLayout, "mThumbTextPadding"), ValueUtil.dpToPixelIntRound(20.3f, res));
        assertEquals((Integer) TestUtil.getField(compLayout, "mThumbTextPadding"), (Integer) TestUtil.getField(parsedLayout, "mThumbTextPadding"));
        // Test android:track
        assertNotNull((StateListDrawable) TestUtil.getField(compLayout, "mTrackDrawable"));
        assertEquals((StateListDrawable) TestUtil.getField(parsedLayout, "mTrackDrawable"), (StateListDrawable) TestUtil.getField(parsedLayout, "mTrackDrawable"));
    }
    // ToggleButton Tests
    // Nota: ToggleButton ha sido reemplazado totalmente por Switch, lo implementamos para los despistados
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test ToggleButton");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        final ToggleButton compLayout = (ToggleButton) comp.getChildAt(childCount);
        final ToggleButton parsedLayout = (ToggleButton) parsed.getChildAt(childCount);
        assertEquals((Float) TestUtil.getField(compLayout, "mDisabledAlpha"), 0.6f);
        assertEquals((Float) TestUtil.getField(compLayout, "mDisabledAlpha"), (Float) TestUtil.getField(parsedLayout, "mDisabledAlpha"));
        assertEquals(compLayout.getTextOff(), "NORL");
        assertEquals(compLayout.getTextOff(), parsedLayout.getTextOff());
        assertEquals(compLayout.getTextOn(), "YESRL");
        assertEquals(compLayout.getTextOn(), parsedLayout.getTextOn());
    }
    // CheckedTextView Tests
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test CheckedTextView");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        final CheckedTextView compLayout = (CheckedTextView) comp.getChildAt(childCount);
        final CheckedTextView parsedLayout = (CheckedTextView) parsed.getChildAt(childCount);
        assertNotNull((StateListDrawable) TestUtil.getField(compLayout, "mCheckMarkDrawable"));
        assertEquals((StateListDrawable) TestUtil.getField(parsedLayout, "mCheckMarkDrawable"), (StateListDrawable) TestUtil.getField(parsedLayout, "mCheckMarkDrawable"));
        assertTrue(compLayout.isChecked());
        assertEquals(compLayout.isChecked(), parsedLayout.isChecked());
    }
    // Chronometer Tests
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test Chronometer");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        final Chronometer compLayout = (Chronometer) comp.getChildAt(childCount);
        final Chronometer parsedLayout = (Chronometer) parsed.getChildAt(childCount);
        assertEquals(compLayout.getFormat(), "Time: %s");
        assertEquals(compLayout.getFormat(), parsedLayout.getFormat());
    }
    // EditText Tests
    // No tiene atributos propios pero nos interesa probar si funciona visualmente inputType
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test EditText");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        final EditText compLayout = (EditText) comp.getChildAt(childCount);
        final EditText parsedLayout = (EditText) parsed.getChildAt(childCount);
        assertEquals(compLayout.getImeActionId(), 0x00000002);
        assertEquals(compLayout.getImeActionId(), parsedLayout.getImeActionId());
        assertEquals(compLayout.getImeActionLabel(), "Go Next");
        assertEquals(compLayout.getImeActionLabel(), parsedLayout.getImeActionLabel());
        assertEquals(compLayout.getImeOptions(), EditorInfo.IME_ACTION_NEXT);
        assertEquals(compLayout.getImeOptions(), parsedLayout.getImeOptions());
        assertEquals(compLayout.getInputType(), InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL | InputType.TYPE_NUMBER_FLAG_SIGNED);
        assertEquals(compLayout.getInputType(), parsedLayout.getInputType());
        assertEquals(compLayout.getPrivateImeOptions(), "com.example.myapp.JustToWriteSomething=3");
        assertEquals(compLayout.getPrivateImeOptions(), parsedLayout.getPrivateImeOptions());
        assertFalse(compLayout.isTextSelectable());
        assertEquals(compLayout.isTextSelectable(), parsedLayout.isTextSelectable());
    }
    // AutoCompleteTextView Tests
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test AutoCompleteTextView");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        final AutoCompleteTextView compLayout = (AutoCompleteTextView) comp.getChildAt(childCount);
        final AutoCompleteTextView parsedLayout = (AutoCompleteTextView) parsed.getChildAt(childCount);
        // android:completionHint
        assertEquals((CharSequence) TestUtil.getField(compLayout, "mHintText"), "Sports suggested");
        assertEquals((CharSequence) TestUtil.getField(compLayout, "mHintText"), (CharSequence) TestUtil.getField(parsedLayout, "mHintText"));
        // android:completionHintView
        assertPositive((Integer) TestUtil.getField(compLayout, "mHintResource"));
        assertEquals((Integer) TestUtil.getField(compLayout, "mHintResource"), (Integer) TestUtil.getField(parsedLayout, "mHintResource"));
        assertEquals((Integer) TestUtil.getField(compLayout, "mHintResource"), R.layout.auto_complete_text_view_hint_view);
        // Porque existe el id compilado y tiene prioridad en el caso dinámico
        assertEquals((Integer) TestUtil.getField(compLayout, "mHintResource"), (Integer) TestUtil.getField(parsedLayout, "mHintResource"));
        // android:completionThreshold
        assertEquals((Integer) TestUtil.getField(compLayout, "mThreshold"), 3);
        assertEquals((Integer) TestUtil.getField(compLayout, "mThreshold"), (Integer) TestUtil.getField(parsedLayout, "mThreshold"));
        assertEquals(compLayout.getDropDownAnchor(), res.getIdentifier("id/anchorOfAutoCompleteTextViewDropDownId", null, ctx.getPackageName()));
        assertEquals(compLayout.getDropDownAnchor(), parsedLayout.getDropDownAnchor());
        assertEquals(compLayout.getDropDownHeight(), ValueUtil.dpToPixelIntRound(150.3f, res));
        assertEquals(compLayout.getDropDownHeight(), parsedLayout.getDropDownHeight());
        assertEquals(compLayout.getDropDownHorizontalOffset(), ValueUtil.dpToPixelIntFloor(10.3f, res));
        assertEquals(compLayout.getDropDownHorizontalOffset(), parsedLayout.getDropDownHorizontalOffset());
        assertNotNull((StateListDrawable) TestUtil.getField(compLayout, new Class[] { AutoCompleteTextView.class, ListPopupWindow.class }, new String[] { "mPopup", "mDropDownListHighlight" }));
        assertEquals((StateListDrawable) TestUtil.getField(compLayout, new Class[] { AutoCompleteTextView.class, ListPopupWindow.class }, new String[] { "mPopup", "mDropDownListHighlight" }), (StateListDrawable) TestUtil.getField(parsedLayout, new Class[] { AutoCompleteTextView.class, ListPopupWindow.class }, new String[] { "mPopup", "mDropDownListHighlight" }));
        assertEquals(compLayout.getDropDownVerticalOffset(), ValueUtil.dpToPixelIntFloor(5.3f, res));
        assertEquals(compLayout.getDropDownVerticalOffset(), parsedLayout.getDropDownVerticalOffset());
        assertEquals(compLayout.getDropDownWidth(), ValueUtil.dpToPixelIntRound(300.3f, res));
        assertEquals(compLayout.getDropDownWidth(), parsedLayout.getDropDownWidth());
        // popupBackground test
        assertEquals(((ColorDrawable) compLayout.getDropDownBackground()).getColor(), 0xffddddff);
        assertEquals(((ColorDrawable) compLayout.getDropDownBackground()).getColor(), ((ColorDrawable) parsedLayout.getDropDownBackground()).getColor());
    }
    // TextView used as anchor of AutoCompleteTextView Suggest Drop Down (upper View)
    {
        childCount++;
        final TextView compLayout = (TextView) comp.getChildAt(childCount);
        final TextView parsedLayout = (TextView) parsed.getChildAt(childCount);
        assertEquals(compLayout.getText(), "Anchor of AutoCompleteTextView Suggest Drop Down");
        assertEquals(compLayout.getText(), parsedLayout.getText());
    }
    {
        childCount++;
        final AutoCompleteTextView compLayout = (AutoCompleteTextView) comp.getChildAt(childCount);
        final AutoCompleteTextView parsedLayout = (AutoCompleteTextView) parsed.getChildAt(childCount);
        // android:completionHint
        assertEquals((CharSequence) TestUtil.getField(compLayout, "mHintText"), "Sports suggested");
        assertEquals((CharSequence) TestUtil.getField(compLayout, "mHintText"), (CharSequence) TestUtil.getField(parsedLayout, "mHintText"));
        // android:completionHintView
        assertEquals((Integer) TestUtil.getField(compLayout, "mHintResource"), R.layout.auto_complete_text_view_hint_view_compiled);
        // El layout por defecto, en este test no se toca mHintResource, se define directamente mHintView
        assertPositive((Integer) TestUtil.getField(compLayout, "mHintResource"));
        assertPositive((Integer) TestUtil.getField(parsedLayout, "mHintResource"));
        TextView compHintView = (TextView) TestUtil.getField(compLayout, "mHintView");
        assertEquals(compHintView.getCurrentTextColor(), 0xFFFF0000);
        TextView parsedHintView = (TextView) TestUtil.getField(parsedLayout, "mHintView");
        assertEquals(parsedHintView.getCurrentTextColor(), 0xFFFF0000);
        // android:completionThreshold
        assertEquals((Integer) TestUtil.getField(compLayout, "mThreshold"), 3);
        assertEquals((Integer) TestUtil.getField(compLayout, "mThreshold"), (Integer) TestUtil.getField(parsedLayout, "mThreshold"));
        assertEquals(compLayout.getDropDownAnchor(), res.getIdentifier("id/anchorOfAutoCompleteTextViewDropDownId2", null, ctx.getPackageName()));
        assertEquals(compLayout.getDropDownAnchor(), parsedLayout.getDropDownAnchor());
        assertEquals(compLayout.getDropDownHeight(), ValueUtil.dpToPixelIntRound(150.3f, res));
        assertEquals(compLayout.getDropDownHeight(), parsedLayout.getDropDownHeight());
        assertEquals(compLayout.getDropDownHorizontalOffset(), ValueUtil.dpToPixelIntFloor(10.3f, res));
        assertEquals(compLayout.getDropDownHorizontalOffset(), parsedLayout.getDropDownHorizontalOffset());
        assertNotNull((StateListDrawable) TestUtil.getField(compLayout, new Class[] { AutoCompleteTextView.class, ListPopupWindow.class }, new String[] { "mPopup", "mDropDownListHighlight" }));
        assertEquals((StateListDrawable) TestUtil.getField(compLayout, new Class[] { AutoCompleteTextView.class, ListPopupWindow.class }, new String[] { "mPopup", "mDropDownListHighlight" }), (StateListDrawable) TestUtil.getField(parsedLayout, new Class[] { AutoCompleteTextView.class, ListPopupWindow.class }, new String[] { "mPopup", "mDropDownListHighlight" }));
        assertEquals(compLayout.getDropDownVerticalOffset(), ValueUtil.dpToPixelIntFloor(5.3f, res));
        assertEquals(compLayout.getDropDownVerticalOffset(), parsedLayout.getDropDownVerticalOffset());
        assertEquals(compLayout.getDropDownWidth(), ValueUtil.dpToPixelIntRound(300.3f, res));
        assertEquals(compLayout.getDropDownWidth(), parsedLayout.getDropDownWidth());
    // popupBackground test
    //            assertEquals(((ColorDrawable) compLayout.getDropDownBackground()).getColor(), 0xffddddff);
    //            assertEquals(((ColorDrawable) compLayout.getDropDownBackground()).getColor(), ((ColorDrawable) parsedLayout.getDropDownBackground()).getColor());
    }
    // TextView used as anchor of AutoCompleteTextView Suggest Drop Down (upper View)
    {
        childCount++;
        final TextView compLayout = (TextView) comp.getChildAt(childCount);
        final TextView parsedLayout = (TextView) parsed.getChildAt(childCount);
        assertEquals(compLayout.getText(), "Anchor of AutoCompleteTextView Suggest Drop Down 2");
        assertEquals(compLayout.getText(), parsedLayout.getText());
    }
    // Test AdapterViewFlipper y AdapterViewAnimator
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test AdapterViewFlipper (and AdapterViewAnimator)");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        final AdapterViewFlipper compLayout = (AdapterViewFlipper) comp.getChildAt(childCount);
        final AdapterViewFlipper parsedLayout = (AdapterViewFlipper) parsed.getChildAt(childCount);
        // AdapterViewAnimator
        assertTrue((Boolean) TestUtil.getField(compLayout, AdapterViewAnimator.class, "mAnimateFirstTime"));
        assertEquals((Boolean) TestUtil.getField(compLayout, AdapterViewAnimator.class, "mAnimateFirstTime"), (Boolean) TestUtil.getField(parsedLayout, AdapterViewAnimator.class, "mAnimateFirstTime"));
        assertNotNull(compLayout.getInAnimation());
        assertEquals(compLayout.getInAnimation(), parsedLayout.getInAnimation());
        assertTrue((Boolean) TestUtil.getField(compLayout, AdapterViewAnimator.class, "mLoopViews"));
        assertEquals((Boolean) TestUtil.getField(compLayout, AdapterViewAnimator.class, "mLoopViews"), (Boolean) TestUtil.getField(parsedLayout, AdapterViewAnimator.class, "mLoopViews"));
        assertNotNull(compLayout.getOutAnimation());
        assertEquals(compLayout.getOutAnimation(), parsedLayout.getOutAnimation());
        // AdapterViewFlipper
        assertTrue(compLayout.isAutoStart());
        assertEquals(compLayout.isAutoStart(), parsedLayout.isAutoStart());
        // android:flipInterval  (getFlipInterval es Level 16)
        assertEquals((Integer) TestUtil.getField(compLayout, "mFlipInterval"), 3000);
        assertEquals((Integer) TestUtil.getField(compLayout, "mFlipInterval"), (Integer) TestUtil.getField(parsedLayout, "mFlipInterval"));
    }
    // Test ViewGroup Attribs and ViewGroup.LayoutParams
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test ViewGroup attrs and ViewGroup.LayoutParams");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        final LinearLayout compLayout = (LinearLayout) comp.getChildAt(childCount);
        final LinearLayout parsedLayout = (LinearLayout) parsed.getChildAt(childCount);
        assertTrue(compLayout.addStatesFromChildren());
        assertEquals(compLayout.addStatesFromChildren(), parsedLayout.addStatesFromChildren());
        assertFalse(compLayout.isAlwaysDrawnWithCacheEnabled());
        assertEquals(compLayout.isAlwaysDrawnWithCacheEnabled(), parsedLayout.isAlwaysDrawnWithCacheEnabled());
        // Test de android:animateLayoutChanges
        // Si animateLayoutChanges="false" getLayoutTransition() devuelve null por lo que el chequear a null es suficiente test
        assertNotNull(compLayout.getLayoutTransition());
        assertNotNull(parsedLayout.getLayoutTransition());
        assertFalse(compLayout.isAnimationCacheEnabled());
        assertEquals(compLayout.isAnimationCacheEnabled(), parsedLayout.isAnimationCacheEnabled());
        // Tests de android:clipChildren (el método get es Level 18)
        // FLAG_CLIP_CHILDREN = 0x1
        assertFalse(((Integer) TestUtil.getField(compLayout, ViewGroup.class, "mGroupFlags") & 0x1) == 0x1);
        assertEquals(((int) (Integer) TestUtil.getField(compLayout, ViewGroup.class, "mGroupFlags") & 0x1) == 0x1, ((int) (Integer) TestUtil.getField(parsedLayout, ViewGroup.class, "mGroupFlags") & 0x1) == 0x1);
        // Tests de android:clipToPadding
        // FLAG_CLIP_TO_PADDING = 0x2
        assertFalse(((Integer) TestUtil.getField(compLayout, ViewGroup.class, "mGroupFlags") & 0x2) == 0x2);
        assertEquals(((int) (Integer) TestUtil.getField(compLayout, ViewGroup.class, "mGroupFlags") & 0x2) == 0x2, ((int) (Integer) TestUtil.getField(parsedLayout, ViewGroup.class, "mGroupFlags") & 0x2) == 0x2);
        assertEquals(compLayout.getDescendantFocusability(), ViewGroup.FOCUS_AFTER_DESCENDANTS);
        assertEquals(compLayout.getDescendantFocusability(), parsedLayout.getDescendantFocusability());
        // Testeamos el delay porque testear la igualdad del LayoutAnimationController es un rollo
        assertTrue((compLayout.getLayoutAnimation().getDelay() - 1.0f * 10 / 100) < 0.00001);
        assertEquals(compLayout.getLayoutAnimation().getDelay(), parsedLayout.getLayoutAnimation().getDelay());
        assertEquals(compLayout.getPersistentDrawingCache(), parsedLayout.getPersistentDrawingCache());
        assertTrue(compLayout.isMotionEventSplittingEnabled());
        assertEquals(compLayout.isMotionEventSplittingEnabled(), parsedLayout.isMotionEventSplittingEnabled());
        // Testing ViewGroup.LayoutParams
        {
            final TextView compTextView = (TextView) compLayout.getChildAt(0);
            final TextView parsedTextView = (TextView) parsedLayout.getChildAt(0);
            assertEquals(compTextView.getText(), "Test ViewGroup Attribs");
            assertEquals(compTextView.getText(), parsedTextView.getText());
            ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
            ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
            assertEquals(a_params.height, ViewGroup.LayoutParams.WRAP_CONTENT);
            assertEquals(a_params.height, b_params.height);
            assertEquals(a_params.width, ViewGroup.LayoutParams.MATCH_PARENT);
            assertEquals(a_params.width, b_params.width);
            parsedLayout.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {

                @Override
                public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
                    //if (oldLeft == 0 && oldTop == 0 && oldRight == 0 && oldBottom == 0)
                    {
                        assertEquals(compTextView.getWidth(), parsedTextView.getWidth());
                        assertEquals(compTextView.getHeight(), parsedTextView.getHeight());
                    }
                //else TestUtil.alertDialog(parsedTextView.getContext(),"Test ignored when rotating the device watching the dynamic view"); // El compilado está en la otra orientación
                }
            });
        }
        {
            final TextView compTextView = (TextView) compLayout.getChildAt(1);
            final TextView parsedTextView = (TextView) parsedLayout.getChildAt(1);
            assertEquals(compTextView.getText(), "Test ViewGroup Attribs 2");
            assertEquals(compTextView.getText(), parsedTextView.getText());
            ViewGroup.LayoutParams a_params = compTextView.getLayoutParams();
            ViewGroup.LayoutParams b_params = parsedTextView.getLayoutParams();
            assertEquals(a_params.height, ValueUtil.dpToPixelFloatRound(30.3f, res));
            assertEquals(a_params.height, b_params.height);
            assertEquals(a_params.width, ValueUtil.dpToPixelFloatRound(200.3f, res));
            assertEquals(a_params.width, b_params.width);
            parsedLayout.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {

                @Override
                public void onLayoutChange(View view, int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8) {
                    assertEquals(compTextView.getWidth(), parsedTextView.getWidth());
                    assertEquals(compTextView.getHeight(), parsedTextView.getHeight());
                }
            });
        }
    }
    // Test ViewGroup.MarginLayoutParams
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test ViewGroup.MarginLayoutParams");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        LinearLayout compLinLayout = (LinearLayout) comp.getChildAt(childCount);
        LinearLayout parsedLinLayout = (LinearLayout) parsed.getChildAt(childCount);
        {
            final TextView compTextView = (TextView) compLinLayout.getChildAt(0);
            final TextView parsedTextView = (TextView) parsedLinLayout.getChildAt(0);
            assertEquals(compTextView.getText(), "Test Margins 1");
            assertEquals(compTextView.getText(), parsedTextView.getText());
            ViewGroup.MarginLayoutParams a_params = (ViewGroup.MarginLayoutParams) compTextView.getLayoutParams();
            ViewGroup.MarginLayoutParams b_params = (ViewGroup.MarginLayoutParams) parsedTextView.getLayoutParams();
            assertEquals(a_params.topMargin, ValueUtil.dpToPixelIntRound(15.3f, res));
            assertEquals(a_params.topMargin, b_params.topMargin);
            assertEquals(a_params.leftMargin, ValueUtil.dpToPixelIntRound(10.3f, res));
            assertEquals(a_params.leftMargin, b_params.leftMargin);
            assertEquals(a_params.bottomMargin, ValueUtil.dpToPixelIntRound(5.3f, res));
            assertEquals(a_params.bottomMargin, b_params.bottomMargin);
            assertEquals(a_params.rightMargin, ValueUtil.dpToPixelIntRound(1.3f, res));
            assertEquals(a_params.rightMargin, b_params.rightMargin);
        }
        {
            final TextView compTextView = (TextView) compLinLayout.getChildAt(1);
            final TextView parsedTextView = (TextView) parsedLinLayout.getChildAt(1);
            assertEquals(compTextView.getText(), "Test Margins 2");
            assertEquals(compTextView.getText(), parsedTextView.getText());
            ViewGroup.MarginLayoutParams a_params = (ViewGroup.MarginLayoutParams) compTextView.getLayoutParams();
            ViewGroup.MarginLayoutParams b_params = (ViewGroup.MarginLayoutParams) parsedTextView.getLayoutParams();
            int margin = ValueUtil.dpToPixelIntRound(10.3f, res);
            assertEquals(a_params.topMargin, margin);
            assertEquals(a_params.topMargin, b_params.topMargin);
            assertEquals(a_params.leftMargin, margin);
            assertEquals(a_params.leftMargin, b_params.leftMargin);
            assertEquals(a_params.bottomMargin, margin);
            assertEquals(a_params.bottomMargin, b_params.bottomMargin);
            assertEquals(a_params.rightMargin, margin);
            assertEquals(a_params.rightMargin, b_params.rightMargin);
        }
    }
    // Test AbsListView
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test AbsListView (and AdapterView) via ListView");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        ListView compLayout = (ListView) comp.getChildAt(childCount);
        ListView parsedLayout = (ListView) parsed.getChildAt(childCount);
        assertEquals(compLayout.getCacheColorHint(), 0xffff0000);
        assertEquals(compLayout.getCacheColorHint(), parsedLayout.getCacheColorHint());
        assertEquals(compLayout.getChoiceMode(), AbsListView.CHOICE_MODE_MULTIPLE);
        assertEquals(compLayout.getChoiceMode(), parsedLayout.getChoiceMode());
        // No podemos testear android:drawSelectorOnTop porque no hay un isDrawSelectorOnTop
        // Preferiría testear el true pero no se porqué razón se ignora el true
        assertFalse(compLayout.isFastScrollEnabled());
        assertEquals(compLayout.isFastScrollEnabled(), parsedLayout.isFastScrollEnabled());
        // android:listSelector
        assertEquals(((ColorDrawable) compLayout.getSelector()).getColor(), 0x6600ff00);
        assertEquals(compLayout.getSelector(), parsedLayout.getSelector());
        assertFalse(compLayout.isScrollingCacheEnabled());
        assertEquals(compLayout.isScrollingCacheEnabled(), parsedLayout.isScrollingCacheEnabled());
        assertFalse(compLayout.isSmoothScrollbarEnabled());
        assertEquals(compLayout.isSmoothScrollbarEnabled(), parsedLayout.isSmoothScrollbarEnabled());
        assertTrue(compLayout.isStackFromBottom());
        assertEquals(compLayout.isStackFromBottom(), parsedLayout.isStackFromBottom());
        assertTrue(compLayout.isTextFilterEnabled());
        assertEquals(compLayout.isTextFilterEnabled(), parsedLayout.isTextFilterEnabled());
        assertEquals(compLayout.getTranscriptMode(), AbsListView.TRANSCRIPT_MODE_ALWAYS_SCROLL);
        assertEquals(compLayout.getTranscriptMode(), parsedLayout.getTranscriptMode());
    }
    // Test GridView
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test GridView");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        final GridView compLayout = (GridView) comp.getChildAt(childCount);
        final GridView parsedLayout = (GridView) parsed.getChildAt(childCount);
        // Tests android:columnWidth (getColumnWidth es Level 16):
        // En teoría existe el atributo mColumnWidth pero el valor final puede no coincidir con el columnWidth especificado
        // porque es corregido dinámicamente
        assertEquals((Integer) TestUtil.getField(compLayout, "mRequestedColumnWidth"), ValueUtil.dpToPixelIntFloor(30.3f, res));
        assertEquals((Integer) TestUtil.getField(compLayout, "mRequestedColumnWidth"), (Integer) TestUtil.getField(parsedLayout, "mRequestedColumnWidth"));
        // Tests android:gravity (getGravity es Level 16)
        assertEquals((Integer) TestUtil.getField(compLayout, "mGravity"), Gravity.CENTER_VERTICAL | Gravity.CENTER_HORIZONTAL);
        assertEquals((Integer) TestUtil.getField(compLayout, "mGravity"), (Integer) TestUtil.getField(parsedLayout, "mGravity"));
        // Tests android:horizontalSpacing (getHorizontalSpacing es Level 16):
        assertEquals((Integer) TestUtil.getField(compLayout, "mHorizontalSpacing"), ValueUtil.dpToPixelIntFloor(5.3f, res));
        parsedLayout.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {

            @Override
            public void onLayoutChange(View view, int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8) {
                // No se consolida hasta que se hace el Layout
                assertEquals((Integer) TestUtil.getField(compLayout, "mHorizontalSpacing"), (Integer) TestUtil.getField(parsedLayout, "mHorizontalSpacing"));
            }
        });
        assertEquals(compLayout.getNumColumns(), 3);
        parsedLayout.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {

            @Override
            public void onLayoutChange(View view, int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8) {
                // Usamos un OnLayoutChangeListener porque el setNumColumns define un atributo "request" que no es el atributo
                // donde va el numColumns definitivo el cual se calcula al hacer el layout
                assertEquals(compLayout.getNumColumns(), parsedLayout.getNumColumns());
            }
        });
        // Es el modo por defecto pero los demás modos en nuestro test se ven muy mal
        assertEquals(compLayout.getStretchMode(), GridView.STRETCH_COLUMN_WIDTH);
        assertEquals(compLayout.getStretchMode(), parsedLayout.getStretchMode());
        // Tests android:verticalSpacing (getVerticalSpacing es Level 16):
        assertEquals((Integer) TestUtil.getField(compLayout, "mVerticalSpacing"), ValueUtil.dpToPixelIntFloor(5.3f, res));
        parsedLayout.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {

            @Override
            public void onLayoutChange(View view, int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8) {
                // No se consolida hasta que se hace el Layout
                assertEquals((Integer) TestUtil.getField(compLayout, "mVerticalSpacing"), (Integer) TestUtil.getField(parsedLayout, "mVerticalSpacing"));
            }
        });
    }
    // Test ListView
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test ListView");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        final ListView compLayout = (ListView) comp.getChildAt(childCount);
        final ListView parsedLayout = (ListView) parsed.getChildAt(childCount);
        // Test android:divider
        // Test visual: líneas rojas separadoras de items
        assertEquals((GradientDrawable) compLayout.getDivider(), (GradientDrawable) parsedLayout.getDivider());
        // Test android:entries
        ListAdapter compAdapter = compLayout.getAdapter();
        ListAdapter parsedAdapter = parsedLayout.getAdapter();
        assertEquals(compAdapter.getCount(), 6);
        assertEquals(compAdapter.getCount(), parsedAdapter.getCount());
        for (int i = 0; i < compAdapter.getCount(); i++) {
            Object compItem = compAdapter.getItem(i);
            Object parsedItem = parsedAdapter.getItem(i);
            if (i >= 0 && i <= 1) {
                assertEquals(compItem.getClass(), SpannedString.class);
                assertEquals(compItem.getClass(), parsedItem.getClass());
                String compUnstyledText = ((SpannedString) compItem).toString();
                String parsedUnstyledText = ((SpannedString) parsedItem).toString();
                if (i == 0) {
                    assertEquals(compUnstyledText, "Barcelona");
                } else if (i == 1) {
                    assertEquals(compUnstyledText, "Madrid");
                }
                //else if (i == 2) { assertEquals(compUnstyledText,"Bilbao"); }
                assertEquals(compUnstyledText, parsedUnstyledText);
            } else {
                assertEquals(compItem.getClass(), String.class);
                assertEquals(compItem.getClass(), parsedItem.getClass());
                String compUnstyledText = compItem.toString();
                String parsedUnstyledText = parsedItem.toString();
                assertEquals(compUnstyledText, parsedUnstyledText);
            }
        }
        assertEquals(compLayout.getDividerHeight(), ValueUtil.dpToPixelIntRound(2.3f, res));
        assertEquals(compLayout.getDividerHeight(), parsedLayout.getDividerHeight());
        // Test android:footerDividersEnabled (areFooterDividersEnabled es Level 19)
        assertFalse((Boolean) TestUtil.getField(compLayout, "mFooterDividersEnabled"));
        assertEquals((Boolean) TestUtil.getField(compLayout, "mFooterDividersEnabled"), (Boolean) TestUtil.getField(parsedLayout, "mFooterDividersEnabled"));
        // Test android:headerDividersEnabled (areHeaderDividersEnabled es Level 19)
        assertFalse((Boolean) TestUtil.getField(compLayout, "mHeaderDividersEnabled"));
        assertEquals((Boolean) TestUtil.getField(compLayout, "mHeaderDividersEnabled"), (Boolean) TestUtil.getField(parsedLayout, "mHeaderDividersEnabled"));
    }
    // Test ExpandableListView
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test ExpandableListView");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        final ExpandableListView compLayout = (ExpandableListView) comp.getChildAt(childCount);
        final ExpandableListView parsedLayout = (ExpandableListView) parsed.getChildAt(childCount);
        // Test android:childDivider, no hay método get
        // Test visual: líneas rojas separadoras de items
        assertEquals((GradientDrawable) TestUtil.getField(compLayout, "mChildDivider"), (GradientDrawable) TestUtil.getField(parsedLayout, "mChildDivider"));
        // Test android:childIndicator, no hay método get, si no se define devuelve null
        assertEquals((GradientDrawable) TestUtil.getField(compLayout, "mChildIndicator"), (GradientDrawable) TestUtil.getField(parsedLayout, "mChildIndicator"));
        // Test android:childIndicatorLeft, no hay método get
        // No podemos testearlo porque por ej en 4.4.1 tras definir mChildIndicatorLeft y mChildIndicatorright
        // se llama a un método que los cambia de nuevo de una forma inexplicable, en 4.0.3 no hay tal llamada
        //assertPositive((Integer)TestUtil.getField(compLayout,"mChildIndicatorLeft"));
        //assertEquals((Integer)getField(compLayout,"mChildIndicatorLeft"),(Integer)getField(parsedLayout,"mChildIndicatorLeft"));
        // No testeamos android:childIndicatorRight pues tenemos idéntico problema que childIndicatorLeft
        // Test android:groupIndicator, no hay método get
        assertNotNull((StateListDrawable) TestUtil.getField(compLayout, "mGroupIndicator"));
        assertEquals((StateListDrawable) TestUtil.getField(parsedLayout, "mGroupIndicator"), (StateListDrawable) TestUtil.getField(parsedLayout, "mGroupIndicator"));
    // No testeamos android:indicatorLeft ni indicatorRight porque les pasa igual que a childIndicatorLeft
    //assertPositive((Integer)getField(compLayout,"mIndicatorLeft"));
    }
    // Test AbsSpinner (entries sólo) y Gallery
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test Gallery");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    {
        childCount++;
        @SuppressWarnings("deprecation") final android.widget.Gallery compLayout = (android.widget.Gallery) comp.getChildAt(childCount);
        @SuppressWarnings("deprecation") final android.widget.Gallery parsedLayout = (android.widget.Gallery) parsed.getChildAt(childCount);
        assertEquals((Integer) TestUtil.getField(compLayout, "mAnimationDuration"), 100);
        assertEquals((Integer) TestUtil.getField(compLayout, "mAnimationDuration"), (Integer) TestUtil.getField(parsedLayout, "mAnimationDuration"));
        assertEquals((Integer) TestUtil.getField(compLayout, "mGravity"), Gravity.CENTER_VERTICAL);
        assertEquals((Integer) TestUtil.getField(compLayout, "mGravity"), (Integer) TestUtil.getField(parsedLayout, "mGravity"));
        assertEquals((Integer) TestUtil.getField(compLayout, "mSpacing"), ValueUtil.dpToPixelIntFloor(50.3f, res));
        assertEquals((Integer) TestUtil.getField(compLayout, "mSpacing"), (Integer) TestUtil.getField(parsedLayout, "mSpacing"));
        assertEquals((Float) TestUtil.getField(compLayout, "mUnselectedAlpha"), 0.6f);
        assertEquals((Float) TestUtil.getField(compLayout, "mUnselectedAlpha"), (Float) TestUtil.getField(parsedLayout, "mUnselectedAlpha"));
    }
    // Test Spinner
    {
        childCount++;
        TextView compTextView = (TextView) comp.getChildAt(childCount);
        TextView parsedTextView = (TextView) parsed.getChildAt(childCount);
        assertEquals(compTextView.getText(), "Test Spinner");
        assertEquals(compTextView.getText(), parsedTextView.getText());
    }
    // Test Spinner (dropdown)
    {
        childCount++;
        final Spinner compLayout = (Spinner) comp.getChildAt(childCount);
        final Spinner parsedLayout = (Spinner) parsed.getChildAt(childCount);
        // Tests android:dropDownHorizontalOffset
        // Este atributo es difícil de testear pues se solapa con paddingLeft (definido en el style en este ejemplo) el cual suele imponer su valor
        // http://stackoverflow.com/questions/21503142/android-spinner-dropdownhorizontaloffset-not-functioning-but-dropdownverticleoff
        assertEquals((Integer) TestUtil.getField(compLayout, new Class[] { Spinner.class, ListPopupWindow.class }, new String[] { "mPopup", "mDropDownHorizontalOffset" }), ValueUtil.dpToPixelIntFloor(21.3f, res));
        assertEquals((Integer) TestUtil.getField(compLayout, new Class[] { Spinner.class, ListPopupWindow.class }, new String[] { "mPopup", "mDropDownHorizontalOffset" }), (Integer) TestUtil.getField(parsedLayout, new Class[] { Spinner.class, ListPopupWindow.class }, new String[] { "mPopup", "mDropDownHorizontalOffset" }));
        // Tests android:dropDownVerticalOffset
        assertEquals((Integer) TestUtil.getField(compLayout, new Class[] { Spinner.class, ListPopupWindow.class }, new String[] { "mPopup", "mDropDownVerticalOffset" }), ValueUtil.dpToPixelIntFloor(10.3f, res));
        assertEquals((Integer) TestUtil.getField(compLayout, new Class[] { Spinner.class, ListPopupWindow.class }, new String[] { "mPopup", "mDropDownVerticalOffset" }), (Integer) TestUtil.getField(parsedLayout, new Class[] { Spinner.class, ListPopupWindow.class }, new String[] { "mPopup", "mDropDownVerticalOffset" }));
        // Tests android:dropDownWidth ( getDropDownWidth() es Level 16)
        assertEquals((Integer) TestUtil.getField(compLayout, "mDropDownWidth"), ValueUtil.dpToPixelIntRound(200.3f, res));
        assertEquals((Integer) TestUtil.getField(compLayout, "mDropDownWidth"), (Integer) TestUtil.getField(parsedLayout, "mDropDownWidth"));
        // Tests android:gravity (no get en Level 15)
        assertEquals((Integer) TestUtil.getField(compLayout, "mGravity"), Gravity.CENTER_VERTICAL | Gravity.CENTER_HORIZONTAL);
        assertEquals((Integer) TestUtil.getField(compLayout, "mGravity"), (Integer) TestUtil.getField(parsedLayout, "mGravity"));
        // Tests android:popupBackground
        assertEquals(((ColorDrawable) TestUtil.getField(compLayout, new Class[] { Spinner.class, ListPopupWindow.class, PopupWindow.class }, new String[] { "mPopup", "mPopup", "mBackground" })).getColor(), 0xffeeee55);
        assertEquals((ColorDrawable) TestUtil.getField(compLayout, new Class[] { Spinner.class, ListPopupWindow.class, PopupWindow.class }, new String[] { "mPopup", "mPopup", "mBackground" }), (ColorDrawable) TestUtil.getField(parsedLayout, new Class[] { Spinner.class, ListPopupWindow.class, PopupWindow.class }, new String[] { "mPopup", "mPopup", "mBackground" }));
        // Test style (necesario testear porque se construye de forma especial)
        assertEquals(compLayout.getPaddingLeft(), ValueUtil.dpToPixelIntRound(21.3f, res));
        assertEquals(compLayout.getPaddingLeft(), parsedLayout.getPaddingLeft());
        assertEquals(compLayout.getPaddingRight(), ValueUtil.dpToPixelIntRound(21.3f, res));
        assertEquals(compLayout.getPaddingRight(), parsedLayout.getPaddingRight());
    }
    // Test Spinner (dialog)
    {
        childCount++;
        final Spinner compLayout = (Spinner) comp.getChildAt(childCount);
        final Spinner parsedLayout = (Spinner) parsed.getChildAt(childCount);
        assertEquals(compLayout.getPrompt(), "Sport List");
        assertEquals(compLayout.getPrompt(), parsedLayout.getPrompt());
    }
//         System.out.println("\n\n\nDEFAULT VALUE: " + compLayout.getColumnCount() + " " + parsedLayout.getColumnCount());
//System.out.println("\n\n\n");
}
Example 4
Project: eduOnline_android-master  File: TestFragment.java View source code
@SuppressLint("NewApi")
public void initView() {
    mPullListView = (PullToRefreshListView) mview.findViewById(R.id.myview);
    mPullListView.setPullLoadEnabled(false);
    mPullListView.setScrollLoadEnabled(true);
    mPullListView.setOnRefreshListener(new OnRefreshListener<ListView>() {

        @Override
        public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {
            mPullListView.onPullDownRefreshComplete();
        }

        @Override
        public void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {
            mPullListView.onPullUpRefreshComplete();
        }
    });
    mPullListView.doPullRefreshing(true, 500);
    mlistview = mPullListView.getRefreshableView();
    mlistview.setOnItemClickListener(this);
    myadapter = new TestAdapter(datalist, mcontext);
    mlistview.setAdapter(myadapter);
    viewflipper = (AdapterViewFlipper) mview.findViewById(R.id.fliper);
    viewflipperAdapter = new TestfliperAdapter(datalist, mcontext);
    viewflipper.setAdapter(viewflipperAdapter);
    viewflipper.startFlipping();
}
Example 5
Project: anvil-master  File: DSL.java View source code
public boolean set(View v, String name, final Object arg, final Object old) {
    switch(name) {
        case "accessibilityDelegate":
            if (arg instanceof View.AccessibilityDelegate) {
                v.setAccessibilityDelegate((View.AccessibilityDelegate) arg);
                return true;
            }
            break;
        case "accessibilityLiveRegion":
            if (arg instanceof Integer) {
                v.setAccessibilityLiveRegion((int) arg);
                return true;
            }
            break;
        case "activated":
            if (arg instanceof Boolean) {
                v.setActivated((boolean) arg);
                return true;
            }
            break;
        case "activity":
            if (v instanceof FragmentBreadCrumbs && arg instanceof Activity) {
                ((FragmentBreadCrumbs) v).setActivity((Activity) arg);
                return true;
            }
            break;
        case "adapter":
            if (v instanceof AdapterView && arg instanceof Adapter) {
                ((AdapterView) v).setAdapter((Adapter) arg);
                return true;
            }
            if (v instanceof ExpandableListView && arg instanceof ExpandableListAdapter) {
                ((ExpandableListView) v).setAdapter((ExpandableListAdapter) arg);
                return true;
            }
            break;
        case "addStatesFromChildren":
            if (v instanceof ViewGroup && arg instanceof Boolean) {
                ((ViewGroup) v).setAddStatesFromChildren((boolean) arg);
                return true;
            }
            break;
        case "adjustViewBounds":
            if (v instanceof ImageView && arg instanceof Boolean) {
                ((ImageView) v).setAdjustViewBounds((boolean) arg);
                return true;
            }
            break;
        case "alignmentMode":
            if (v instanceof GridLayout && arg instanceof Integer) {
                ((GridLayout) v).setAlignmentMode((int) arg);
                return true;
            }
            break;
        case "allCaps":
            if (v instanceof TextView && arg instanceof Boolean) {
                ((TextView) v).setAllCaps((boolean) arg);
                return true;
            }
            break;
        case "alpha":
            if (arg instanceof Float) {
                v.setAlpha((float) arg);
                return true;
            }
            break;
        case "alwaysDrawnWithCacheEnabled":
            if (v instanceof ViewGroup && arg instanceof Boolean) {
                ((ViewGroup) v).setAlwaysDrawnWithCacheEnabled((boolean) arg);
                return true;
            }
            break;
        case "anchorView":
            if (v instanceof MediaController && arg instanceof View) {
                ((MediaController) v).setAnchorView((View) arg);
                return true;
            }
            break;
        case "animateFirstView":
            if (v instanceof AdapterViewAnimator && arg instanceof Boolean) {
                ((AdapterViewAnimator) v).setAnimateFirstView((boolean) arg);
                return true;
            }
            if (v instanceof ViewAnimator && arg instanceof Boolean) {
                ((ViewAnimator) v).setAnimateFirstView((boolean) arg);
                return true;
            }
            break;
        case "animation":
            if (arg instanceof Animation) {
                v.setAnimation((Animation) arg);
                return true;
            }
            break;
        case "animationCacheEnabled":
            if (v instanceof ViewGroup && arg instanceof Boolean) {
                ((ViewGroup) v).setAnimationCacheEnabled((boolean) arg);
                return true;
            }
            break;
        case "animationDuration":
            if (v instanceof Gallery && arg instanceof Integer) {
                ((Gallery) v).setAnimationDuration((int) arg);
                return true;
            }
            break;
        case "autoLinkMask":
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setAutoLinkMask((int) arg);
                return true;
            }
            break;
        case "autoStart":
            if (v instanceof AdapterViewFlipper && arg instanceof Boolean) {
                ((AdapterViewFlipper) v).setAutoStart((boolean) arg);
                return true;
            }
            if (v instanceof ViewFlipper && arg instanceof Boolean) {
                ((ViewFlipper) v).setAutoStart((boolean) arg);
                return true;
            }
            break;
        case "background":
            if (arg instanceof Drawable) {
                v.setBackground((Drawable) arg);
                return true;
            }
            break;
        case "backgroundColor":
            if (arg instanceof Integer) {
                v.setBackgroundColor((int) arg);
                return true;
            }
            break;
        case "backgroundResource":
            if (arg instanceof Integer) {
                v.setBackgroundResource((int) arg);
                return true;
            }
            break;
        case "base":
            if (v instanceof Chronometer && arg instanceof Long) {
                ((Chronometer) v).setBase((long) arg);
                return true;
            }
            break;
        case "baseline":
            if (v instanceof ImageView && arg instanceof Integer) {
                ((ImageView) v).setBaseline((int) arg);
                return true;
            }
            break;
        case "baselineAlignBottom":
            if (v instanceof ImageView && arg instanceof Boolean) {
                ((ImageView) v).setBaselineAlignBottom((boolean) arg);
                return true;
            }
            break;
        case "baselineAligned":
            if (v instanceof LinearLayout && arg instanceof Boolean) {
                ((LinearLayout) v).setBaselineAligned((boolean) arg);
                return true;
            }
            break;
        case "baselineAlignedChildIndex":
            if (v instanceof LinearLayout && arg instanceof Integer) {
                ((LinearLayout) v).setBaselineAlignedChildIndex((int) arg);
                return true;
            }
            break;
        case "bottom":
            if (arg instanceof Integer) {
                v.setBottom((int) arg);
                return true;
            }
            break;
        case "buttonDrawable":
            if (v instanceof CompoundButton && arg instanceof Drawable) {
                ((CompoundButton) v).setButtonDrawable((Drawable) arg);
                return true;
            }
            if (v instanceof CompoundButton && arg instanceof Integer) {
                ((CompoundButton) v).setButtonDrawable((int) arg);
                return true;
            }
            break;
        case "cacheColorHint":
            if (v instanceof AbsListView && arg instanceof Integer) {
                ((AbsListView) v).setCacheColorHint((int) arg);
                return true;
            }
            break;
        case "calendarViewShown":
            if (v instanceof DatePicker && arg instanceof Boolean) {
                ((DatePicker) v).setCalendarViewShown((boolean) arg);
                return true;
            }
            break;
        case "callbackDuringFling":
            if (v instanceof Gallery && arg instanceof Boolean) {
                ((Gallery) v).setCallbackDuringFling((boolean) arg);
                return true;
            }
            break;
        case "cameraDistance":
            if (arg instanceof Float) {
                v.setCameraDistance((float) arg);
                return true;
            }
            break;
        case "checkMarkDrawable":
            if (v instanceof CheckedTextView && arg instanceof Drawable) {
                ((CheckedTextView) v).setCheckMarkDrawable((Drawable) arg);
                return true;
            }
            if (v instanceof CheckedTextView && arg instanceof Integer) {
                ((CheckedTextView) v).setCheckMarkDrawable((int) arg);
                return true;
            }
            break;
        case "checked":
            if (v instanceof CheckedTextView && arg instanceof Boolean) {
                ((CheckedTextView) v).setChecked((boolean) arg);
                return true;
            }
            if (v instanceof CompoundButton && arg instanceof Boolean) {
                ((CompoundButton) v).setChecked((boolean) arg);
                return true;
            }
            break;
        case "childDivider":
            if (v instanceof ExpandableListView && arg instanceof Drawable) {
                ((ExpandableListView) v).setChildDivider((Drawable) arg);
                return true;
            }
            break;
        case "childIndicator":
            if (v instanceof ExpandableListView && arg instanceof Drawable) {
                ((ExpandableListView) v).setChildIndicator((Drawable) arg);
                return true;
            }
            break;
        case "choiceMode":
            if (v instanceof AbsListView && arg instanceof Integer) {
                ((AbsListView) v).setChoiceMode((int) arg);
                return true;
            }
            break;
        case "clickable":
            if (arg instanceof Boolean) {
                v.setClickable((boolean) arg);
                return true;
            }
            break;
        case "clipBounds":
            if (arg instanceof Rect) {
                v.setClipBounds((Rect) arg);
                return true;
            }
            break;
        case "clipChildren":
            if (v instanceof ViewGroup && arg instanceof Boolean) {
                ((ViewGroup) v).setClipChildren((boolean) arg);
                return true;
            }
            break;
        case "clipToPadding":
            if (v instanceof ViewGroup && arg instanceof Boolean) {
                ((ViewGroup) v).setClipToPadding((boolean) arg);
                return true;
            }
            break;
        case "colorFilter":
            if (v instanceof ImageView && arg instanceof ColorFilter) {
                ((ImageView) v).setColorFilter((ColorFilter) arg);
                return true;
            }
            if (v instanceof ImageView && arg instanceof Integer) {
                ((ImageView) v).setColorFilter((int) arg);
                return true;
            }
            break;
        case "columnCount":
            if (v instanceof GridLayout && arg instanceof Integer) {
                ((GridLayout) v).setColumnCount((int) arg);
                return true;
            }
            break;
        case "columnOrderPreserved":
            if (v instanceof GridLayout && arg instanceof Boolean) {
                ((GridLayout) v).setColumnOrderPreserved((boolean) arg);
                return true;
            }
            break;
        case "columnWidth":
            if (v instanceof GridView && arg instanceof Integer) {
                ((GridView) v).setColumnWidth((int) arg);
                return true;
            }
            break;
        case "completionHint":
            if (v instanceof AutoCompleteTextView && arg instanceof CharSequence) {
                ((AutoCompleteTextView) v).setCompletionHint((CharSequence) arg);
                return true;
            }
            break;
        case "compoundDrawablePadding":
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setCompoundDrawablePadding((int) arg);
                return true;
            }
            break;
        case "contentDescription":
            if (arg instanceof CharSequence) {
                v.setContentDescription((CharSequence) arg);
                return true;
            }
            break;
        case "cropToPadding":
            if (v instanceof ImageView && arg instanceof Boolean) {
                ((ImageView) v).setCropToPadding((boolean) arg);
                return true;
            }
            break;
        case "currentHour":
            if (v instanceof TimePicker && arg instanceof Integer) {
                ((TimePicker) v).setCurrentHour((Integer) arg);
                return true;
            }
            break;
        case "currentMinute":
            if (v instanceof TimePicker && arg instanceof Integer) {
                ((TimePicker) v).setCurrentMinute((Integer) arg);
                return true;
            }
            break;
        case "currentTab":
            if (v instanceof TabHost && arg instanceof Integer) {
                ((TabHost) v).setCurrentTab((int) arg);
                return true;
            }
            if (v instanceof TabWidget && arg instanceof Integer) {
                ((TabWidget) v).setCurrentTab((int) arg);
                return true;
            }
            break;
        case "currentTabByTag":
            if (v instanceof TabHost && arg instanceof String) {
                ((TabHost) v).setCurrentTabByTag((String) arg);
                return true;
            }
            break;
        case "currentText":
            if (v instanceof TextSwitcher && arg instanceof CharSequence) {
                ((TextSwitcher) v).setCurrentText((CharSequence) arg);
                return true;
            }
            break;
        case "cursorVisible":
            if (v instanceof TextView && arg instanceof Boolean) {
                ((TextView) v).setCursorVisible((boolean) arg);
                return true;
            }
            break;
        case "customSelectionActionModeCallback":
            if (v instanceof TextView && arg instanceof ActionMode.Callback) {
                ((TextView) v).setCustomSelectionActionModeCallback((ActionMode.Callback) arg);
                return true;
            }
            break;
        case "date":
            if (v instanceof CalendarView && arg instanceof Long) {
                ((CalendarView) v).setDate((long) arg);
                return true;
            }
            break;
        case "dateTextAppearance":
            if (v instanceof CalendarView && arg instanceof Integer) {
                ((CalendarView) v).setDateTextAppearance((int) arg);
                return true;
            }
            break;
        case "debugFlags":
            if (v instanceof GLSurfaceView && arg instanceof Integer) {
                ((GLSurfaceView) v).setDebugFlags((int) arg);
                return true;
            }
            break;
        case "descendantFocusability":
            if (v instanceof ViewGroup && arg instanceof Integer) {
                ((ViewGroup) v).setDescendantFocusability((int) arg);
                return true;
            }
            break;
        case "digitsWatcher":
            if (v instanceof DialerFilter && arg instanceof TextWatcher) {
                ((DialerFilter) v).setDigitsWatcher((TextWatcher) arg);
                return true;
            }
            break;
        case "displayedChild":
            if (v instanceof AdapterViewAnimator && arg instanceof Integer) {
                ((AdapterViewAnimator) v).setDisplayedChild((int) arg);
                return true;
            }
            if (v instanceof ViewAnimator && arg instanceof Integer) {
                ((ViewAnimator) v).setDisplayedChild((int) arg);
                return true;
            }
            break;
        case "displayedValues":
            if (v instanceof NumberPicker && arg instanceof String[]) {
                ((NumberPicker) v).setDisplayedValues((String[]) arg);
                return true;
            }
            break;
        case "divider":
            if (v instanceof ListView && arg instanceof Drawable) {
                ((ListView) v).setDivider((Drawable) arg);
                return true;
            }
            break;
        case "dividerDrawable":
            if (v instanceof LinearLayout && arg instanceof Drawable) {
                ((LinearLayout) v).setDividerDrawable((Drawable) arg);
                return true;
            }
            if (v instanceof TabWidget && arg instanceof Integer) {
                ((TabWidget) v).setDividerDrawable((int) arg);
                return true;
            }
            break;
        case "dividerHeight":
            if (v instanceof ListView && arg instanceof Integer) {
                ((ListView) v).setDividerHeight((int) arg);
                return true;
            }
            break;
        case "dividerPadding":
            if (v instanceof LinearLayout && arg instanceof Integer) {
                ((LinearLayout) v).setDividerPadding((int) arg);
                return true;
            }
            break;
        case "downloadListener":
            if (v instanceof WebView && arg instanceof DownloadListener) {
                ((WebView) v).setDownloadListener((DownloadListener) arg);
                return true;
            }
            break;
        case "drawSelectorOnTop":
            if (v instanceof AbsListView && arg instanceof Boolean) {
                ((AbsListView) v).setDrawSelectorOnTop((boolean) arg);
                return true;
            }
            break;
        case "drawingCacheBackgroundColor":
            if (arg instanceof Integer) {
                v.setDrawingCacheBackgroundColor((int) arg);
                return true;
            }
            break;
        case "drawingCacheEnabled":
            if (arg instanceof Boolean) {
                v.setDrawingCacheEnabled((boolean) arg);
                return true;
            }
            break;
        case "drawingCacheQuality":
            if (arg instanceof Integer) {
                v.setDrawingCacheQuality((int) arg);
                return true;
            }
            break;
        case "dropDownAnchor":
            if (v instanceof AutoCompleteTextView && arg instanceof Integer) {
                ((AutoCompleteTextView) v).setDropDownAnchor((int) arg);
                return true;
            }
            break;
        case "dropDownBackgroundDrawable":
            if (v instanceof AutoCompleteTextView && arg instanceof Drawable) {
                ((AutoCompleteTextView) v).setDropDownBackgroundDrawable((Drawable) arg);
                return true;
            }
            break;
        case "dropDownBackgroundResource":
            if (v instanceof AutoCompleteTextView && arg instanceof Integer) {
                ((AutoCompleteTextView) v).setDropDownBackgroundResource((int) arg);
                return true;
            }
            break;
        case "dropDownHeight":
            if (v instanceof AutoCompleteTextView && arg instanceof Integer) {
                ((AutoCompleteTextView) v).setDropDownHeight((int) arg);
                return true;
            }
            break;
        case "dropDownHorizontalOffset":
            if (v instanceof AutoCompleteTextView && arg instanceof Integer) {
                ((AutoCompleteTextView) v).setDropDownHorizontalOffset((int) arg);
                return true;
            }
            if (v instanceof Spinner && arg instanceof Integer) {
                ((Spinner) v).setDropDownHorizontalOffset((int) arg);
                return true;
            }
            break;
        case "dropDownVerticalOffset":
            if (v instanceof AutoCompleteTextView && arg instanceof Integer) {
                ((AutoCompleteTextView) v).setDropDownVerticalOffset((int) arg);
                return true;
            }
            if (v instanceof Spinner && arg instanceof Integer) {
                ((Spinner) v).setDropDownVerticalOffset((int) arg);
                return true;
            }
            break;
        case "dropDownWidth":
            if (v instanceof AutoCompleteTextView && arg instanceof Integer) {
                ((AutoCompleteTextView) v).setDropDownWidth((int) arg);
                return true;
            }
            if (v instanceof Spinner && arg instanceof Integer) {
                ((Spinner) v).setDropDownWidth((int) arg);
                return true;
            }
            break;
        case "duplicateParentStateEnabled":
            if (arg instanceof Boolean) {
                v.setDuplicateParentStateEnabled((boolean) arg);
                return true;
            }
            break;
        case "eGLConfigChooser":
            if (v instanceof GLSurfaceView && arg instanceof GLSurfaceView.EGLConfigChooser) {
                ((GLSurfaceView) v).setEGLConfigChooser((GLSurfaceView.EGLConfigChooser) arg);
                return true;
            }
            if (v instanceof GLSurfaceView && arg instanceof Boolean) {
                ((GLSurfaceView) v).setEGLConfigChooser((boolean) arg);
                return true;
            }
            break;
        case "eGLContextClientVersion":
            if (v instanceof GLSurfaceView && arg instanceof Integer) {
                ((GLSurfaceView) v).setEGLContextClientVersion((int) arg);
                return true;
            }
            break;
        case "eGLContextFactory":
            if (v instanceof GLSurfaceView && arg instanceof GLSurfaceView.EGLContextFactory) {
                ((GLSurfaceView) v).setEGLContextFactory((GLSurfaceView.EGLContextFactory) arg);
                return true;
            }
            break;
        case "eGLWindowSurfaceFactory":
            if (v instanceof GLSurfaceView && arg instanceof GLSurfaceView.EGLWindowSurfaceFactory) {
                ((GLSurfaceView) v).setEGLWindowSurfaceFactory((GLSurfaceView.EGLWindowSurfaceFactory) arg);
                return true;
            }
            break;
        case "editableFactory":
            if (v instanceof TextView && arg instanceof Editable.Factory) {
                ((TextView) v).setEditableFactory((Editable.Factory) arg);
                return true;
            }
            break;
        case "ellipsize":
            if (v instanceof TextView && arg instanceof TextUtils.TruncateAt) {
                ((TextView) v).setEllipsize((TextUtils.TruncateAt) arg);
                return true;
            }
            break;
        case "emptyView":
            if (v instanceof AdapterView && arg instanceof View) {
                ((AdapterView) v).setEmptyView((View) arg);
                return true;
            }
            break;
        case "ems":
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setEms((int) arg);
                return true;
            }
            break;
        case "enabled":
            if (arg instanceof Boolean) {
                v.setEnabled((boolean) arg);
                return true;
            }
            break;
        case "error":
            if (v instanceof TextView && arg instanceof CharSequence) {
                ((TextView) v).setError((CharSequence) arg);
                return true;
            }
            break;
        case "eventsInterceptionEnabled":
            if (v instanceof GestureOverlayView && arg instanceof Boolean) {
                ((GestureOverlayView) v).setEventsInterceptionEnabled((boolean) arg);
                return true;
            }
            break;
        case "excludeMimes":
            if (v instanceof QuickContactBadge && arg instanceof String[]) {
                ((QuickContactBadge) v).setExcludeMimes((String[]) arg);
                return true;
            }
            break;
        case "extendedSettingsClickListener":
            if (v instanceof MediaRouteButton && arg instanceof View.OnClickListener) {
                ((MediaRouteButton) v).setExtendedSettingsClickListener((View.OnClickListener) arg);
                return true;
            }
            break;
        case "extractedText":
            if (v instanceof TextView && arg instanceof ExtractedText) {
                ((TextView) v).setExtractedText((ExtractedText) arg);
                return true;
            }
            break;
        case "factory":
            if (v instanceof ViewSwitcher && arg instanceof ViewSwitcher.ViewFactory) {
                ((ViewSwitcher) v).setFactory((ViewSwitcher.ViewFactory) arg);
                return true;
            }
            break;
        case "fadeEnabled":
            if (v instanceof GestureOverlayView && arg instanceof Boolean) {
                ((GestureOverlayView) v).setFadeEnabled((boolean) arg);
                return true;
            }
            break;
        case "fadeOffset":
            if (v instanceof GestureOverlayView && arg instanceof Long) {
                ((GestureOverlayView) v).setFadeOffset((long) arg);
                return true;
            }
            break;
        case "fadingEdgeLength":
            if (arg instanceof Integer) {
                v.setFadingEdgeLength((int) arg);
                return true;
            }
            break;
        case "fastScrollAlwaysVisible":
            if (v instanceof AbsListView && arg instanceof Boolean) {
                ((AbsListView) v).setFastScrollAlwaysVisible((boolean) arg);
                return true;
            }
            break;
        case "fastScrollEnabled":
            if (v instanceof AbsListView && arg instanceof Boolean) {
                ((AbsListView) v).setFastScrollEnabled((boolean) arg);
                return true;
            }
            break;
        case "fillViewport":
            if (v instanceof HorizontalScrollView && arg instanceof Boolean) {
                ((HorizontalScrollView) v).setFillViewport((boolean) arg);
                return true;
            }
            if (v instanceof ScrollView && arg instanceof Boolean) {
                ((ScrollView) v).setFillViewport((boolean) arg);
                return true;
            }
            break;
        case "filterText":
            if (v instanceof AbsListView && arg instanceof String) {
                ((AbsListView) v).setFilterText((String) arg);
                return true;
            }
            break;
        case "filterTouchesWhenObscured":
            if (arg instanceof Boolean) {
                v.setFilterTouchesWhenObscured((boolean) arg);
                return true;
            }
            break;
        case "filterWatcher":
            if (v instanceof DialerFilter && arg instanceof TextWatcher) {
                ((DialerFilter) v).setFilterWatcher((TextWatcher) arg);
                return true;
            }
            break;
        case "filters":
            if (v instanceof TextView && arg instanceof InputFilter[]) {
                ((TextView) v).setFilters((InputFilter[]) arg);
                return true;
            }
            break;
        case "findListener":
            if (v instanceof WebView && arg instanceof WebView.FindListener) {
                ((WebView) v).setFindListener((WebView.FindListener) arg);
                return true;
            }
            break;
        case "firstDayOfWeek":
            if (v instanceof CalendarView && arg instanceof Integer) {
                ((CalendarView) v).setFirstDayOfWeek((int) arg);
                return true;
            }
            break;
        case "fitsSystemWindows":
            if (arg instanceof Boolean) {
                v.setFitsSystemWindows((boolean) arg);
                return true;
            }
            break;
        case "flipInterval":
            if (v instanceof AdapterViewFlipper && arg instanceof Integer) {
                ((AdapterViewFlipper) v).setFlipInterval((int) arg);
                return true;
            }
            if (v instanceof ViewFlipper && arg instanceof Integer) {
                ((ViewFlipper) v).setFlipInterval((int) arg);
                return true;
            }
            break;
        case "focusable":
            if (arg instanceof Boolean) {
                v.setFocusable((boolean) arg);
                return true;
            }
            break;
        case "focusableInTouchMode":
            if (arg instanceof Boolean) {
                v.setFocusableInTouchMode((boolean) arg);
                return true;
            }
            break;
        case "focusedMonthDateColor":
            if (v instanceof CalendarView && arg instanceof Integer) {
                ((CalendarView) v).setFocusedMonthDateColor((int) arg);
                return true;
            }
            break;
        case "footerDividersEnabled":
            if (v instanceof ListView && arg instanceof Boolean) {
                ((ListView) v).setFooterDividersEnabled((boolean) arg);
                return true;
            }
            break;
        case "foreground":
            if (v instanceof FrameLayout && arg instanceof Drawable) {
                ((FrameLayout) v).setForeground((Drawable) arg);
                return true;
            }
            break;
        case "foregroundGravity":
            if (v instanceof FrameLayout && arg instanceof Integer) {
                ((FrameLayout) v).setForegroundGravity((int) arg);
                return true;
            }
            break;
        case "format":
            if (v instanceof Chronometer && arg instanceof String) {
                ((Chronometer) v).setFormat((String) arg);
                return true;
            }
            break;
        case "format12Hour":
            if (v instanceof TextClock && arg instanceof CharSequence) {
                ((TextClock) v).setFormat12Hour((CharSequence) arg);
                return true;
            }
            break;
        case "format24Hour":
            if (v instanceof TextClock && arg instanceof CharSequence) {
                ((TextClock) v).setFormat24Hour((CharSequence) arg);
                return true;
            }
            break;
        case "formatter":
            if (v instanceof NumberPicker && arg instanceof NumberPicker.Formatter) {
                ((NumberPicker) v).setFormatter((NumberPicker.Formatter) arg);
                return true;
            }
            break;
        case "freezesText":
            if (v instanceof TextView && arg instanceof Boolean) {
                ((TextView) v).setFreezesText((boolean) arg);
                return true;
            }
            break;
        case "friction":
            if (v instanceof AbsListView && arg instanceof Float) {
                ((AbsListView) v).setFriction((float) arg);
                return true;
            }
            break;
        case "gLWrapper":
            if (v instanceof GLSurfaceView && arg instanceof GLSurfaceView.GLWrapper) {
                ((GLSurfaceView) v).setGLWrapper((GLSurfaceView.GLWrapper) arg);
                return true;
            }
            break;
        case "gesture":
            if (v instanceof GestureOverlayView && arg instanceof Gesture) {
                ((GestureOverlayView) v).setGesture((Gesture) arg);
                return true;
            }
            break;
        case "gestureColor":
            if (v instanceof GestureOverlayView && arg instanceof Integer) {
                ((GestureOverlayView) v).setGestureColor((int) arg);
                return true;
            }
            break;
        case "gestureStrokeAngleThreshold":
            if (v instanceof GestureOverlayView && arg instanceof Float) {
                ((GestureOverlayView) v).setGestureStrokeAngleThreshold((float) arg);
                return true;
            }
            break;
        case "gestureStrokeLengthThreshold":
            if (v instanceof GestureOverlayView && arg instanceof Float) {
                ((GestureOverlayView) v).setGestureStrokeLengthThreshold((float) arg);
                return true;
            }
            break;
        case "gestureStrokeSquarenessTreshold":
            if (v instanceof GestureOverlayView && arg instanceof Float) {
                ((GestureOverlayView) v).setGestureStrokeSquarenessTreshold((float) arg);
                return true;
            }
            break;
        case "gestureStrokeType":
            if (v instanceof GestureOverlayView && arg instanceof Integer) {
                ((GestureOverlayView) v).setGestureStrokeType((int) arg);
                return true;
            }
            break;
        case "gestureStrokeWidth":
            if (v instanceof GestureOverlayView && arg instanceof Float) {
                ((GestureOverlayView) v).setGestureStrokeWidth((float) arg);
                return true;
            }
            break;
        case "gestureVisible":
            if (v instanceof GestureOverlayView && arg instanceof Boolean) {
                ((GestureOverlayView) v).setGestureVisible((boolean) arg);
                return true;
            }
            break;
        case "gravity":
            if (v instanceof Gallery && arg instanceof Integer) {
                ((Gallery) v).setGravity((int) arg);
                return true;
            }
            if (v instanceof GridView && arg instanceof Integer) {
                ((GridView) v).setGravity((int) arg);
                return true;
            }
            if (v instanceof LinearLayout && arg instanceof Integer) {
                ((LinearLayout) v).setGravity((int) arg);
                return true;
            }
            if (v instanceof RelativeLayout && arg instanceof Integer) {
                ((RelativeLayout) v).setGravity((int) arg);
                return true;
            }
            if (v instanceof Spinner && arg instanceof Integer) {
                ((Spinner) v).setGravity((int) arg);
                return true;
            }
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setGravity((int) arg);
                return true;
            }
            break;
        case "groupIndicator":
            if (v instanceof ExpandableListView && arg instanceof Drawable) {
                ((ExpandableListView) v).setGroupIndicator((Drawable) arg);
                return true;
            }
            break;
        case "hapticFeedbackEnabled":
            if (arg instanceof Boolean) {
                v.setHapticFeedbackEnabled((boolean) arg);
                return true;
            }
            break;
        case "hasTransientState":
            if (arg instanceof Boolean) {
                v.setHasTransientState((boolean) arg);
                return true;
            }
            break;
        case "headerDividersEnabled":
            if (v instanceof ListView && arg instanceof Boolean) {
                ((ListView) v).setHeaderDividersEnabled((boolean) arg);
                return true;
            }
            break;
        case "height":
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setHeight((int) arg);
                return true;
            }
            break;
        case "highlightColor":
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setHighlightColor((int) arg);
                return true;
            }
            break;
        case "hint":
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setHint((int) arg);
                return true;
            }
            if (v instanceof TextView && arg instanceof CharSequence) {
                ((TextView) v).setHint((CharSequence) arg);
                return true;
            }
            break;
        case "hintTextColor":
            if (v instanceof TextView && arg instanceof ColorStateList) {
                ((TextView) v).setHintTextColor((ColorStateList) arg);
                return true;
            }
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setHintTextColor((int) arg);
                return true;
            }
            break;
        case "horizontalFadingEdgeEnabled":
            if (arg instanceof Boolean) {
                v.setHorizontalFadingEdgeEnabled((boolean) arg);
                return true;
            }
            break;
        case "horizontalGravity":
            if (v instanceof LinearLayout && arg instanceof Integer) {
                ((LinearLayout) v).setHorizontalGravity((int) arg);
                return true;
            }
            if (v instanceof RelativeLayout && arg instanceof Integer) {
                ((RelativeLayout) v).setHorizontalGravity((int) arg);
                return true;
            }
            break;
        case "horizontalScrollBarEnabled":
            if (arg instanceof Boolean) {
                v.setHorizontalScrollBarEnabled((boolean) arg);
                return true;
            }
            break;
        case "horizontalScrollbarOverlay":
            if (v instanceof WebView && arg instanceof Boolean) {
                ((WebView) v).setHorizontalScrollbarOverlay((boolean) arg);
                return true;
            }
            break;
        case "horizontalSpacing":
            if (v instanceof GridView && arg instanceof Integer) {
                ((GridView) v).setHorizontalSpacing((int) arg);
                return true;
            }
            break;
        case "horizontallyScrolling":
            if (v instanceof TextView && arg instanceof Boolean) {
                ((TextView) v).setHorizontallyScrolling((boolean) arg);
                return true;
            }
            break;
        case "hovered":
            if (arg instanceof Boolean) {
                v.setHovered((boolean) arg);
                return true;
            }
            break;
        case "iconified":
            if (v instanceof SearchView && arg instanceof Boolean) {
                ((SearchView) v).setIconified((boolean) arg);
                return true;
            }
            break;
        case "iconifiedByDefault":
            if (v instanceof SearchView && arg instanceof Boolean) {
                ((SearchView) v).setIconifiedByDefault((boolean) arg);
                return true;
            }
            break;
        case "id":
            if (arg instanceof Integer) {
                v.setId((int) arg);
                return true;
            }
            break;
        case "ignoreGravity":
            if (v instanceof RelativeLayout && arg instanceof Integer) {
                ((RelativeLayout) v).setIgnoreGravity((int) arg);
                return true;
            }
            break;
        case "imageAlpha":
            if (v instanceof ImageView && arg instanceof Integer) {
                ((ImageView) v).setImageAlpha((int) arg);
                return true;
            }
            break;
        case "imageBitmap":
            if (v instanceof ImageView && arg instanceof Bitmap) {
                ((ImageView) v).setImageBitmap((Bitmap) arg);
                return true;
            }
            break;
        case "imageDrawable":
            if (v instanceof ImageSwitcher && arg instanceof Drawable) {
                ((ImageSwitcher) v).setImageDrawable((Drawable) arg);
                return true;
            }
            if (v instanceof ImageView && arg instanceof Drawable) {
                ((ImageView) v).setImageDrawable((Drawable) arg);
                return true;
            }
            break;
        case "imageLevel":
            if (v instanceof ImageView && arg instanceof Integer) {
                ((ImageView) v).setImageLevel((int) arg);
                return true;
            }
            break;
        case "imageMatrix":
            if (v instanceof ImageView && arg instanceof Matrix) {
                ((ImageView) v).setImageMatrix((Matrix) arg);
                return true;
            }
            break;
        case "imageResource":
            if (v instanceof ImageSwitcher && arg instanceof Integer) {
                ((ImageSwitcher) v).setImageResource((int) arg);
                return true;
            }
            if (v instanceof ImageView && arg instanceof Integer) {
                ((ImageView) v).setImageResource((int) arg);
                return true;
            }
            break;
        case "imageURI":
            if (v instanceof ImageSwitcher && arg instanceof Uri) {
                ((ImageSwitcher) v).setImageURI((Uri) arg);
                return true;
            }
            if (v instanceof ImageView && arg instanceof Uri) {
                ((ImageView) v).setImageURI((Uri) arg);
                return true;
            }
            break;
        case "imeOptions":
            if (v instanceof SearchView && arg instanceof Integer) {
                ((SearchView) v).setImeOptions((int) arg);
                return true;
            }
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setImeOptions((int) arg);
                return true;
            }
            break;
        case "importantForAccessibility":
            if (arg instanceof Integer) {
                v.setImportantForAccessibility((int) arg);
                return true;
            }
            break;
        case "inAnimation":
            if (v instanceof AdapterViewAnimator && arg instanceof ObjectAnimator) {
                ((AdapterViewAnimator) v).setInAnimation((ObjectAnimator) arg);
                return true;
            }
            if (v instanceof ViewAnimator && arg instanceof Animation) {
                ((ViewAnimator) v).setInAnimation((Animation) arg);
                return true;
            }
            break;
        case "includeFontPadding":
            if (v instanceof TextView && arg instanceof Boolean) {
                ((TextView) v).setIncludeFontPadding((boolean) arg);
                return true;
            }
            break;
        case "indeterminate":
            if (v instanceof ProgressBar && arg instanceof Boolean) {
                ((ProgressBar) v).setIndeterminate((boolean) arg);
                return true;
            }
            break;
        case "indeterminateDrawable":
            if (v instanceof ProgressBar && arg instanceof Drawable) {
                ((ProgressBar) v).setIndeterminateDrawable((Drawable) arg);
                return true;
            }
            break;
        case "inflatedId":
            if (v instanceof ViewStub && arg instanceof Integer) {
                ((ViewStub) v).setInflatedId((int) arg);
                return true;
            }
            break;
        case "initialScale":
            if (v instanceof WebView && arg instanceof Integer) {
                ((WebView) v).setInitialScale((int) arg);
                return true;
            }
            break;
        case "inputExtras":
            try {
                if (v instanceof android.widget.TextView && arg instanceof Integer)
                    ((android.widget.TextView) v).setInputExtras((int) arg);
            } catch (org.xmlpull.v1.XmlPullParserException e) {
                e.printStackTrace();
            } catch (java.io.IOException e) {
                e.printStackTrace();
            }
            break;
        case "inputType":
            if (v instanceof SearchView && arg instanceof Integer) {
                ((SearchView) v).setInputType((int) arg);
                return true;
            }
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setInputType((int) arg);
                return true;
            }
            break;
        case "interpolator":
            if (v instanceof ProgressBar && arg instanceof Interpolator) {
                ((ProgressBar) v).setInterpolator((Interpolator) arg);
                return true;
            }
            break;
        case "is24HourView":
            if (v instanceof TimePicker && arg instanceof Boolean) {
                ((TimePicker) v).setIs24HourView((Boolean) arg);
                return true;
            }
            break;
        case "isIndicator":
            if (v instanceof RatingBar && arg instanceof Boolean) {
                ((RatingBar) v).setIsIndicator((boolean) arg);
                return true;
            }
            break;
        case "isZoomInEnabled":
            if (v instanceof ZoomControls && arg instanceof Boolean) {
                ((ZoomControls) v).setIsZoomInEnabled((boolean) arg);
                return true;
            }
            break;
        case "isZoomOutEnabled":
            if (v instanceof ZoomControls && arg instanceof Boolean) {
                ((ZoomControls) v).setIsZoomOutEnabled((boolean) arg);
                return true;
            }
            break;
        case "itemsCanFocus":
            if (v instanceof ListView && arg instanceof Boolean) {
                ((ListView) v).setItemsCanFocus((boolean) arg);
                return true;
            }
            break;
        case "keepScreenOn":
            if (arg instanceof Boolean) {
                v.setKeepScreenOn((boolean) arg);
                return true;
            }
            break;
        case "keyListener":
            if (v instanceof TextView && arg instanceof KeyListener) {
                ((TextView) v).setKeyListener((KeyListener) arg);
                return true;
            }
            break;
        case "keyProgressIncrement":
            if (v instanceof AbsSeekBar && arg instanceof Integer) {
                ((AbsSeekBar) v).setKeyProgressIncrement((int) arg);
                return true;
            }
            break;
        case "keyboard":
            if (v instanceof KeyboardView && arg instanceof Keyboard) {
                ((KeyboardView) v).setKeyboard((Keyboard) arg);
                return true;
            }
            break;
        case "labelFor":
            if (arg instanceof Integer) {
                v.setLabelFor((int) arg);
                return true;
            }
            break;
        case "layerPaint":
            if (arg instanceof Paint) {
                v.setLayerPaint((Paint) arg);
                return true;
            }
            break;
        case "layoutAnimation":
            if (v instanceof ViewGroup && arg instanceof LayoutAnimationController) {
                ((ViewGroup) v).setLayoutAnimation((LayoutAnimationController) arg);
                return true;
            }
            break;
        case "layoutAnimationListener":
            if (v instanceof ViewGroup && arg instanceof Animation.AnimationListener) {
                ((ViewGroup) v).setLayoutAnimationListener((Animation.AnimationListener) arg);
                return true;
            }
            break;
        case "layoutDirection":
            if (arg instanceof Integer) {
                v.setLayoutDirection((int) arg);
                return true;
            }
            break;
        case "layoutInflater":
            if (v instanceof ViewStub && arg instanceof LayoutInflater) {
                ((ViewStub) v).setLayoutInflater((LayoutInflater) arg);
                return true;
            }
            break;
        case "layoutMode":
            if (v instanceof ViewGroup && arg instanceof Integer) {
                ((ViewGroup) v).setLayoutMode((int) arg);
                return true;
            }
            break;
        case "layoutParams":
            if (arg instanceof ViewGroup.LayoutParams) {
                v.setLayoutParams((ViewGroup.LayoutParams) arg);
                return true;
            }
            break;
        case "layoutResource":
            if (v instanceof ViewStub && arg instanceof Integer) {
                ((ViewStub) v).setLayoutResource((int) arg);
                return true;
            }
            break;
        case "layoutTransition":
            if (v instanceof ViewGroup && arg instanceof LayoutTransition) {
                ((ViewGroup) v).setLayoutTransition((LayoutTransition) arg);
                return true;
            }
            break;
        case "left":
            if (arg instanceof Integer) {
                v.setLeft((int) arg);
                return true;
            }
            break;
        case "leftStripDrawable":
            if (v instanceof TabWidget && arg instanceof Drawable) {
                ((TabWidget) v).setLeftStripDrawable((Drawable) arg);
                return true;
            }
            if (v instanceof TabWidget && arg instanceof Integer) {
                ((TabWidget) v).setLeftStripDrawable((int) arg);
                return true;
            }
            break;
        case "lettersWatcher":
            if (v instanceof DialerFilter && arg instanceof TextWatcher) {
                ((DialerFilter) v).setLettersWatcher((TextWatcher) arg);
                return true;
            }
            break;
        case "lines":
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setLines((int) arg);
                return true;
            }
            break;
        case "linkTextColor":
            if (v instanceof TextView && arg instanceof ColorStateList) {
                ((TextView) v).setLinkTextColor((ColorStateList) arg);
                return true;
            }
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setLinkTextColor((int) arg);
                return true;
            }
            break;
        case "linksClickable":
            if (v instanceof TextView && arg instanceof Boolean) {
                ((TextView) v).setLinksClickable((boolean) arg);
                return true;
            }
            break;
        case "listSelection":
            if (v instanceof AutoCompleteTextView && arg instanceof Integer) {
                ((AutoCompleteTextView) v).setListSelection((int) arg);
                return true;
            }
            break;
        case "longClickable":
            if (arg instanceof Boolean) {
                v.setLongClickable((boolean) arg);
                return true;
            }
            break;
        case "marqueeRepeatLimit":
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setMarqueeRepeatLimit((int) arg);
                return true;
            }
            break;
        case "max":
            if (v instanceof ProgressBar && arg instanceof Integer) {
                ((ProgressBar) v).setMax((int) arg);
                return true;
            }
            break;
        case "maxDate":
            if (v instanceof CalendarView && arg instanceof Long) {
                ((CalendarView) v).setMaxDate((long) arg);
                return true;
            }
            if (v instanceof DatePicker && arg instanceof Long) {
                ((DatePicker) v).setMaxDate((long) arg);
                return true;
            }
            break;
        case "maxEms":
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setMaxEms((int) arg);
                return true;
            }
            break;
        case "maxHeight":
            if (v instanceof ImageView && arg instanceof Integer) {
                ((ImageView) v).setMaxHeight((int) arg);
                return true;
            }
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setMaxHeight((int) arg);
                return true;
            }
            break;
        case "maxLines":
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setMaxLines((int) arg);
                return true;
            }
            break;
        case "maxValue":
            if (v instanceof NumberPicker && arg instanceof Integer) {
                ((NumberPicker) v).setMaxValue((int) arg);
                return true;
            }
            break;
        case "maxVisible":
            if (v instanceof FragmentBreadCrumbs && arg instanceof Integer) {
                ((FragmentBreadCrumbs) v).setMaxVisible((int) arg);
                return true;
            }
            break;
        case "maxWidth":
            if (v instanceof ImageView && arg instanceof Integer) {
                ((ImageView) v).setMaxWidth((int) arg);
                return true;
            }
            if (v instanceof SearchView && arg instanceof Integer) {
                ((SearchView) v).setMaxWidth((int) arg);
                return true;
            }
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setMaxWidth((int) arg);
                return true;
            }
            break;
        case "measureAllChildren":
            if (v instanceof FrameLayout && arg instanceof Boolean) {
                ((FrameLayout) v).setMeasureAllChildren((boolean) arg);
                return true;
            }
            break;
        case "measureWithLargestChildEnabled":
            if (v instanceof LinearLayout && arg instanceof Boolean) {
                ((LinearLayout) v).setMeasureWithLargestChildEnabled((boolean) arg);
                return true;
            }
            break;
        case "mediaController":
            if (v instanceof VideoView && arg instanceof MediaController) {
                ((VideoView) v).setMediaController((MediaController) arg);
                return true;
            }
            break;
        case "mediaPlayer":
            if (v instanceof MediaController && arg instanceof MediaController.MediaPlayerControl) {
                ((MediaController) v).setMediaPlayer((MediaController.MediaPlayerControl) arg);
                return true;
            }
            break;
        case "minDate":
            if (v instanceof CalendarView && arg instanceof Long) {
                ((CalendarView) v).setMinDate((long) arg);
                return true;
            }
            if (v instanceof DatePicker && arg instanceof Long) {
                ((DatePicker) v).setMinDate((long) arg);
                return true;
            }
            break;
        case "minEms":
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setMinEms((int) arg);
                return true;
            }
            break;
        case "minHeight":
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setMinHeight((int) arg);
                return true;
            }
            break;
        case "minLines":
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setMinLines((int) arg);
                return true;
            }
            break;
        case "minValue":
            if (v instanceof NumberPicker && arg instanceof Integer) {
                ((NumberPicker) v).setMinValue((int) arg);
                return true;
            }
            break;
        case "minWidth":
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setMinWidth((int) arg);
                return true;
            }
            break;
        case "minimumHeight":
            if (arg instanceof Integer) {
                v.setMinimumHeight((int) arg);
                return true;
            }
            break;
        case "minimumWidth":
            if (arg instanceof Integer) {
                v.setMinimumWidth((int) arg);
                return true;
            }
            break;
        case "mode":
            if (v instanceof DialerFilter && arg instanceof Integer) {
                ((DialerFilter) v).setMode((int) arg);
                return true;
            }
            if (v instanceof QuickContactBadge && arg instanceof Integer) {
                ((QuickContactBadge) v).setMode((int) arg);
                return true;
            }
            break;
        case "motionEventSplittingEnabled":
            if (v instanceof ViewGroup && arg instanceof Boolean) {
                ((ViewGroup) v).setMotionEventSplittingEnabled((boolean) arg);
                return true;
            }
            break;
        case "movementMethod":
            if (v instanceof TextView && arg instanceof MovementMethod) {
                ((TextView) v).setMovementMethod((MovementMethod) arg);
                return true;
            }
            break;
        case "multiChoiceModeListener":
            if (v instanceof AbsListView && arg instanceof AbsListView.MultiChoiceModeListener) {
                ((AbsListView) v).setMultiChoiceModeListener((AbsListView.MultiChoiceModeListener) arg);
                return true;
            }
            break;
        case "networkAvailable":
            if (v instanceof WebView && arg instanceof Boolean) {
                ((WebView) v).setNetworkAvailable((boolean) arg);
                return true;
            }
            break;
        case "nextFocusDownId":
            if (arg instanceof Integer) {
                v.setNextFocusDownId((int) arg);
                return true;
            }
            break;
        case "nextFocusForwardId":
            if (arg instanceof Integer) {
                v.setNextFocusForwardId((int) arg);
                return true;
            }
            break;
        case "nextFocusLeftId":
            if (arg instanceof Integer) {
                v.setNextFocusLeftId((int) arg);
                return true;
            }
            break;
        case "nextFocusRightId":
            if (arg instanceof Integer) {
                v.setNextFocusRightId((int) arg);
                return true;
            }
            break;
        case "nextFocusUpId":
            if (arg instanceof Integer) {
                v.setNextFocusUpId((int) arg);
                return true;
            }
            break;
        case "numColumns":
            if (v instanceof GridView && arg instanceof Integer) {
                ((GridView) v).setNumColumns((int) arg);
                return true;
            }
            break;
        case "numStars":
            if (v instanceof RatingBar && arg instanceof Integer) {
                ((RatingBar) v).setNumStars((int) arg);
                return true;
            }
            break;
        case "onBreadCrumbClick":
            if (v instanceof FragmentBreadCrumbs && arg instanceof FragmentBreadCrumbs.OnBreadCrumbClickListener) {
                if (arg != null) {
                    ((FragmentBreadCrumbs) v).setOnBreadCrumbClickListener(new FragmentBreadCrumbs.OnBreadCrumbClickListener() {

                        public boolean onBreadCrumbClick(FragmentManager.BackStackEntry a0, int a1) {
                            boolean r = ((FragmentBreadCrumbs.OnBreadCrumbClickListener) arg).onBreadCrumbClick(a0, a1);
                            Anvil.render();
                            return r;
                        }
                    });
                } else {
                    ((FragmentBreadCrumbs) v).setOnBreadCrumbClickListener((FragmentBreadCrumbs.OnBreadCrumbClickListener) null);
                }
                return true;
            }
            break;
        case "onCheckedChange":
            if (v instanceof CompoundButton && arg instanceof CompoundButton.OnCheckedChangeListener) {
                if (arg != null) {
                    ((CompoundButton) v).setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {

                        public void onCheckedChanged(CompoundButton a0, boolean a1) {
                            ((CompoundButton.OnCheckedChangeListener) arg).onCheckedChanged(a0, a1);
                            Anvil.render();
                        }
                    });
                } else {
                    ((CompoundButton) v).setOnCheckedChangeListener((CompoundButton.OnCheckedChangeListener) null);
                }
                return true;
            }
            if (v instanceof RadioGroup && arg instanceof RadioGroup.OnCheckedChangeListener) {
                if (arg != null) {
                    ((RadioGroup) v).setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {

                        public void onCheckedChanged(RadioGroup a0, int a1) {
                            ((RadioGroup.OnCheckedChangeListener) arg).onCheckedChanged(a0, a1);
                            Anvil.render();
                        }
                    });
                } else {
                    ((RadioGroup) v).setOnCheckedChangeListener((RadioGroup.OnCheckedChangeListener) null);
                }
                return true;
            }
            break;
        case "onChildClick":
            if (v instanceof ExpandableListView && arg instanceof ExpandableListView.OnChildClickListener) {
                if (arg != null) {
                    ((ExpandableListView) v).setOnChildClickListener(new ExpandableListView.OnChildClickListener() {

                        public boolean onChildClick(ExpandableListView a0, View a1, int a2, int a3, long a4) {
                            boolean r = ((ExpandableListView.OnChildClickListener) arg).onChildClick(a0, a1, a2, a3, a4);
                            Anvil.render();
                            return r;
                        }
                    });
                } else {
                    ((ExpandableListView) v).setOnChildClickListener((ExpandableListView.OnChildClickListener) null);
                }
                return true;
            }
            break;
        case "onChronometerTick":
            if (v instanceof Chronometer && arg instanceof Chronometer.OnChronometerTickListener) {
                if (arg != null) {
                    ((Chronometer) v).setOnChronometerTickListener(new Chronometer.OnChronometerTickListener() {

                        public void onChronometerTick(Chronometer a0) {
                            ((Chronometer.OnChronometerTickListener) arg).onChronometerTick(a0);
                            Anvil.render();
                        }
                    });
                } else {
                    ((Chronometer) v).setOnChronometerTickListener((Chronometer.OnChronometerTickListener) null);
                }
                return true;
            }
            break;
        case "onClick":
            if (arg != null) {
                v.setOnClickListener(new View.OnClickListener() {

                    public void onClick(View a0) {
                        ((View.OnClickListener) arg).onClick(a0);
                        Anvil.render();
                    }
                });
            } else {
                v.setOnClickListener((View.OnClickListener) null);
            }
            return true;
        case "onClose":
            if (v instanceof SearchView && arg instanceof SearchView.OnCloseListener) {
                if (arg != null) {
                    ((SearchView) v).setOnCloseListener(new SearchView.OnCloseListener() {

                        public boolean onClose() {
                            boolean r = ((SearchView.OnCloseListener) arg).onClose();
                            Anvil.render();
                            return r;
                        }
                    });
                } else {
                    ((SearchView) v).setOnCloseListener((SearchView.OnCloseListener) null);
                }
                return true;
            }
            break;
        case "onCompletion":
            if (v instanceof VideoView && arg instanceof MediaPlayer.OnCompletionListener) {
                if (arg != null) {
                    ((VideoView) v).setOnCompletionListener(new MediaPlayer.OnCompletionListener() {

                        public void onCompletion(MediaPlayer a0) {
                            ((MediaPlayer.OnCompletionListener) arg).onCompletion(a0);
                            Anvil.render();
                        }
                    });
                } else {
                    ((VideoView) v).setOnCompletionListener((MediaPlayer.OnCompletionListener) null);
                }
                return true;
            }
            break;
        case "onCreateContextMenu":
            if (arg != null) {
                v.setOnCreateContextMenuListener(new View.OnCreateContextMenuListener() {

                    public void onCreateContextMenu(ContextMenu a0, View a1, ContextMenu.ContextMenuInfo a2) {
                        ((View.OnCreateContextMenuListener) arg).onCreateContextMenu(a0, a1, a2);
                        Anvil.render();
                    }
                });
            } else {
                v.setOnCreateContextMenuListener((View.OnCreateContextMenuListener) null);
            }
            return true;
        case "onDateChange":
            if (v instanceof CalendarView && arg instanceof CalendarView.OnDateChangeListener) {
                if (arg != null) {
                    ((CalendarView) v).setOnDateChangeListener(new CalendarView.OnDateChangeListener() {

                        public void onSelectedDayChange(CalendarView a0, int a1, int a2, int a3) {
                            ((CalendarView.OnDateChangeListener) arg).onSelectedDayChange(a0, a1, a2, a3);
                            Anvil.render();
                        }
                    });
                } else {
                    ((CalendarView) v).setOnDateChangeListener((CalendarView.OnDateChangeListener) null);
                }
                return true;
            }
            break;
        case "onDismiss":
            if (v instanceof AutoCompleteTextView && arg instanceof AutoCompleteTextView.OnDismissListener) {
                if (arg != null) {
                    ((AutoCompleteTextView) v).setOnDismissListener(new AutoCompleteTextView.OnDismissListener() {

                        public void onDismiss() {
                            ((AutoCompleteTextView.OnDismissListener) arg).onDismiss();
                            Anvil.render();
                        }
                    });
                } else {
                    ((AutoCompleteTextView) v).setOnDismissListener((AutoCompleteTextView.OnDismissListener) null);
                }
                return true;
            }
            break;
        case "onDrag":
            if (arg != null) {
                v.setOnDragListener(new View.OnDragListener() {

                    public boolean onDrag(View a0, DragEvent a1) {
                        boolean r = ((View.OnDragListener) arg).onDrag(a0, a1);
                        Anvil.render();
                        return r;
                    }
                });
            } else {
                v.setOnDragListener((View.OnDragListener) null);
            }
            return true;
        case "onDrawerClose":
            if (v instanceof SlidingDrawer && arg instanceof SlidingDrawer.OnDrawerCloseListener) {
                if (arg != null) {
                    ((SlidingDrawer) v).setOnDrawerCloseListener(new SlidingDrawer.OnDrawerCloseListener() {

                        public void onDrawerClosed() {
                            ((SlidingDrawer.OnDrawerCloseListener) arg).onDrawerClosed();
                            Anvil.render();
                        }
                    });
                } else {
                    ((SlidingDrawer) v).setOnDrawerCloseListener((SlidingDrawer.OnDrawerCloseListener) null);
                }
                return true;
            }
            break;
        case "onDrawerOpen":
            if (v instanceof SlidingDrawer && arg instanceof SlidingDrawer.OnDrawerOpenListener) {
                if (arg != null) {
                    ((SlidingDrawer) v).setOnDrawerOpenListener(new SlidingDrawer.OnDrawerOpenListener() {

                        public void onDrawerOpened() {
                            ((SlidingDrawer.OnDrawerOpenListener) arg).onDrawerOpened();
                            Anvil.render();
                        }
                    });
                } else {
                    ((SlidingDrawer) v).setOnDrawerOpenListener((SlidingDrawer.OnDrawerOpenListener) null);
                }
                return true;
            }
            break;
        case "onDrawerScroll":
            if (v instanceof SlidingDrawer && arg instanceof SlidingDrawer.OnDrawerScrollListener) {
                if (arg != null) {
                    ((SlidingDrawer) v).setOnDrawerScrollListener(new SlidingDrawer.OnDrawerScrollListener() {

                        public void onScrollEnded() {
                            ((SlidingDrawer.OnDrawerScrollListener) arg).onScrollEnded();
                            Anvil.render();
                        }

                        public void onScrollStarted() {
                            ((SlidingDrawer.OnDrawerScrollListener) arg).onScrollStarted();
                            Anvil.render();
                        }
                    });
                } else {
                    ((SlidingDrawer) v).setOnDrawerScrollListener((SlidingDrawer.OnDrawerScrollListener) null);
                }
                return true;
            }
            break;
        case "onEditorAction":
            if (v instanceof TextView && arg instanceof TextView.OnEditorActionListener) {
                if (arg != null) {
                    ((TextView) v).setOnEditorActionListener(new TextView.OnEditorActionListener() {

                        public boolean onEditorAction(TextView a0, int a1, KeyEvent a2) {
                            boolean r = ((TextView.OnEditorActionListener) arg).onEditorAction(a0, a1, a2);
                            Anvil.render();
                            return r;
                        }
                    });
                } else {
                    ((TextView) v).setOnEditorActionListener((TextView.OnEditorActionListener) null);
                }
                return true;
            }
            break;
        case "onError":
            if (v instanceof VideoView && arg instanceof MediaPlayer.OnErrorListener) {
                if (arg != null) {
                    ((VideoView) v).setOnErrorListener(new MediaPlayer.OnErrorListener() {

                        public boolean onError(MediaPlayer a0, int a1, int a2) {
                            boolean r = ((MediaPlayer.OnErrorListener) arg).onError(a0, a1, a2);
                            Anvil.render();
                            return r;
                        }
                    });
                } else {
                    ((VideoView) v).setOnErrorListener((MediaPlayer.OnErrorListener) null);
                }
                return true;
            }
            break;
        case "onFocusChange":
            if (arg != null) {
                v.setOnFocusChangeListener(new View.OnFocusChangeListener() {

                    public void onFocusChange(View a0, boolean a1) {
                        ((View.OnFocusChangeListener) arg).onFocusChange(a0, a1);
                        Anvil.render();
                    }
                });
            } else {
                v.setOnFocusChangeListener((View.OnFocusChangeListener) null);
            }
            return true;
        case "onGenericMotion":
            if (arg != null) {
                v.setOnGenericMotionListener(new View.OnGenericMotionListener() {

                    public boolean onGenericMotion(View a0, MotionEvent a1) {
                        boolean r = ((View.OnGenericMotionListener) arg).onGenericMotion(a0, a1);
                        Anvil.render();
                        return r;
                    }
                });
            } else {
                v.setOnGenericMotionListener((View.OnGenericMotionListener) null);
            }
            return true;
        case "onGroupClick":
            if (v instanceof ExpandableListView && arg instanceof ExpandableListView.OnGroupClickListener) {
                if (arg != null) {
                    ((ExpandableListView) v).setOnGroupClickListener(new ExpandableListView.OnGroupClickListener() {

                        public boolean onGroupClick(ExpandableListView a0, View a1, int a2, long a3) {
                            boolean r = ((ExpandableListView.OnGroupClickListener) arg).onGroupClick(a0, a1, a2, a3);
                            Anvil.render();
                            return r;
                        }
                    });
                } else {
                    ((ExpandableListView) v).setOnGroupClickListener((ExpandableListView.OnGroupClickListener) null);
                }
                return true;
            }
            break;
        case "onGroupCollapse":
            if (v instanceof ExpandableListView && arg instanceof ExpandableListView.OnGroupCollapseListener) {
                if (arg != null) {
                    ((ExpandableListView) v).setOnGroupCollapseListener(new ExpandableListView.OnGroupCollapseListener() {

                        public void onGroupCollapse(int a0) {
                            ((ExpandableListView.OnGroupCollapseListener) arg).onGroupCollapse(a0);
                            Anvil.render();
                        }
                    });
                } else {
                    ((ExpandableListView) v).setOnGroupCollapseListener((ExpandableListView.OnGroupCollapseListener) null);
                }
                return true;
            }
            break;
        case "onGroupExpand":
            if (v instanceof ExpandableListView && arg instanceof ExpandableListView.OnGroupExpandListener) {
                if (arg != null) {
                    ((ExpandableListView) v).setOnGroupExpandListener(new ExpandableListView.OnGroupExpandListener() {

                        public void onGroupExpand(int a0) {
                            ((ExpandableListView.OnGroupExpandListener) arg).onGroupExpand(a0);
                            Anvil.render();
                        }
                    });
                } else {
                    ((ExpandableListView) v).setOnGroupExpandListener((ExpandableListView.OnGroupExpandListener) null);
                }
                return true;
            }
            break;
        case "onHierarchyChange":
            if (v instanceof ViewGroup && arg instanceof ViewGroup.OnHierarchyChangeListener) {
                if (arg != null) {
                    ((ViewGroup) v).setOnHierarchyChangeListener(new ViewGroup.OnHierarchyChangeListener() {

                        public void onChildViewAdded(View a0, View a1) {
                            ((ViewGroup.OnHierarchyChangeListener) arg).onChildViewAdded(a0, a1);
                            Anvil.render();
                        }

                        public void onChildViewRemoved(View a0, View a1) {
                            ((ViewGroup.OnHierarchyChangeListener) arg).onChildViewRemoved(a0, a1);
                            Anvil.render();
                        }
                    });
                } else {
                    ((ViewGroup) v).setOnHierarchyChangeListener((ViewGroup.OnHierarchyChangeListener) null);
                }
                return true;
            }
            break;
        case "onHover":
            if (arg != null) {
                v.setOnHoverListener(new View.OnHoverListener() {

                    public boolean onHover(View a0, MotionEvent a1) {
                        boolean r = ((View.OnHoverListener) arg).onHover(a0, a1);
                        Anvil.render();
                        return r;
                    }
                });
            } else {
                v.setOnHoverListener((View.OnHoverListener) null);
            }
            return true;
        case "onInflate":
            if (v instanceof ViewStub && arg instanceof ViewStub.OnInflateListener) {
                if (arg != null) {
                    ((ViewStub) v).setOnInflateListener(new ViewStub.OnInflateListener() {

                        public void onInflate(ViewStub a0, View a1) {
                            ((ViewStub.OnInflateListener) arg).onInflate(a0, a1);
                            Anvil.render();
                        }
                    });
                } else {
                    ((ViewStub) v).setOnInflateListener((ViewStub.OnInflateListener) null);
                }
                return true;
            }
            break;
        case "onInfo":
            if (v instanceof VideoView && arg instanceof MediaPlayer.OnInfoListener) {
                if (arg != null) {
                    ((VideoView) v).setOnInfoListener(new MediaPlayer.OnInfoListener() {

                        public boolean onInfo(MediaPlayer a0, int a1, int a2) {
                            boolean r = ((MediaPlayer.OnInfoListener) arg).onInfo(a0, a1, a2);
                            Anvil.render();
                            return r;
                        }
                    });
                } else {
                    ((VideoView) v).setOnInfoListener((MediaPlayer.OnInfoListener) null);
                }
                return true;
            }
            break;
        case "onItemClick":
            if (v instanceof AdapterView && arg instanceof AdapterView.OnItemClickListener) {
                if (arg != null) {
                    ((AdapterView) v).setOnItemClickListener(new AdapterView.OnItemClickListener() {

                        public void onItemClick(AdapterView a0, View a1, int a2, long a3) {
                            ((AdapterView.OnItemClickListener) arg).onItemClick(a0, a1, a2, a3);
                            Anvil.render();
                        }
                    });
                } else {
                    ((AdapterView) v).setOnItemClickListener((AdapterView.OnItemClickListener) null);
                }
                return true;
            }
            if (v instanceof AutoCompleteTextView && arg instanceof AdapterView.OnItemClickListener) {
                if (arg != null) {
                    ((AutoCompleteTextView) v).setOnItemClickListener(new AdapterView.OnItemClickListener() {

                        public void onItemClick(AdapterView a0, View a1, int a2, long a3) {
                            ((AdapterView.OnItemClickListener) arg).onItemClick(a0, a1, a2, a3);
                            Anvil.render();
                        }
                    });
                } else {
                    ((AutoCompleteTextView) v).setOnItemClickListener((AdapterView.OnItemClickListener) null);
                }
                return true;
            }
            break;
        case "onItemLongClick":
            if (v instanceof AdapterView && arg instanceof AdapterView.OnItemLongClickListener) {
                if (arg != null) {
                    ((AdapterView) v).setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {

                        public boolean onItemLongClick(AdapterView a0, View a1, int a2, long a3) {
                            boolean r = ((AdapterView.OnItemLongClickListener) arg).onItemLongClick(a0, a1, a2, a3);
                            Anvil.render();
                            return r;
                        }
                    });
                } else {
                    ((AdapterView) v).setOnItemLongClickListener((AdapterView.OnItemLongClickListener) null);
                }
                return true;
            }
            break;
        case "onItemSelected":
            if (v instanceof AdapterView && arg instanceof AdapterView.OnItemSelectedListener) {
                if (arg != null) {
                    ((AdapterView) v).setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {

                        public void onItemSelected(AdapterView a0, View a1, int a2, long a3) {
                            ((AdapterView.OnItemSelectedListener) arg).onItemSelected(a0, a1, a2, a3);
                            Anvil.render();
                        }

                        public void onNothingSelected(AdapterView a0) {
                            ((AdapterView.OnItemSelectedListener) arg).onNothingSelected(a0);
                            Anvil.render();
                        }
                    });
                } else {
                    ((AdapterView) v).setOnItemSelectedListener((AdapterView.OnItemSelectedListener) null);
                }
                return true;
            }
            if (v instanceof AutoCompleteTextView && arg instanceof AdapterView.OnItemSelectedListener) {
                if (arg != null) {
                    ((AutoCompleteTextView) v).setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {

                        public void onItemSelected(AdapterView a0, View a1, int a2, long a3) {
                            ((AdapterView.OnItemSelectedListener) arg).onItemSelected(a0, a1, a2, a3);
                            Anvil.render();
                        }

                        public void onNothingSelected(AdapterView a0) {
                            ((AdapterView.OnItemSelectedListener) arg).onNothingSelected(a0);
                            Anvil.render();
                        }
                    });
                } else {
                    ((AutoCompleteTextView) v).setOnItemSelectedListener((AdapterView.OnItemSelectedListener) null);
                }
                return true;
            }
            break;
        case "onKey":
            if (arg != null) {
                v.setOnKeyListener(new View.OnKeyListener() {

                    public boolean onKey(View a0, int a1, KeyEvent a2) {
                        boolean r = ((View.OnKeyListener) arg).onKey(a0, a1, a2);
                        Anvil.render();
                        return r;
                    }
                });
            } else {
                v.setOnKeyListener((View.OnKeyListener) null);
            }
            return true;
        case "onKeyboardAction":
            if (v instanceof KeyboardView && arg instanceof KeyboardView.OnKeyboardActionListener) {
                if (arg != null) {
                    ((KeyboardView) v).setOnKeyboardActionListener(new KeyboardView.OnKeyboardActionListener() {

                        public void onKey(int a0, int[] a1) {
                            ((KeyboardView.OnKeyboardActionListener) arg).onKey(a0, a1);
                            Anvil.render();
                        }

                        public void onPress(int a0) {
                            ((KeyboardView.OnKeyboardActionListener) arg).onPress(a0);
                            Anvil.render();
                        }

                        public void onRelease(int a0) {
                            ((KeyboardView.OnKeyboardActionListener) arg).onRelease(a0);
                            Anvil.render();
                        }

                        public void onText(CharSequence a0) {
                            ((KeyboardView.OnKeyboardActionListener) arg).onText(a0);
                            Anvil.render();
                        }

                        public void swipeDown() {
                            ((KeyboardView.OnKeyboardActionListener) arg).swipeDown();
                            Anvil.render();
                        }

                        public void swipeLeft() {
                            ((KeyboardView.OnKeyboardActionListener) arg).swipeLeft();
                            Anvil.render();
                        }

                        public void swipeRight() {
                            ((KeyboardView.OnKeyboardActionListener) arg).swipeRight();
                            Anvil.render();
                        }

                        public void swipeUp() {
                            ((KeyboardView.OnKeyboardActionListener) arg).swipeUp();
                            Anvil.render();
                        }
                    });
                } else {
                    ((KeyboardView) v).setOnKeyboardActionListener((KeyboardView.OnKeyboardActionListener) null);
                }
                return true;
            }
            break;
        case "onLongClick":
            if (arg != null) {
                v.setOnLongClickListener(new View.OnLongClickListener() {

                    public boolean onLongClick(View a0) {
                        boolean r = ((View.OnLongClickListener) arg).onLongClick(a0);
                        Anvil.render();
                        return r;
                    }
                });
            } else {
                v.setOnLongClickListener((View.OnLongClickListener) null);
            }
            return true;
        case "onLongPressUpdateInterval":
            if (v instanceof NumberPicker && arg instanceof Long) {
                ((NumberPicker) v).setOnLongPressUpdateInterval((long) arg);
                return true;
            }
            break;
        case "onPrepared":
            if (v instanceof VideoView && arg instanceof MediaPlayer.OnPreparedListener) {
                if (arg != null) {
                    ((VideoView) v).setOnPreparedListener(new MediaPlayer.OnPreparedListener() {

                        public void onPrepared(MediaPlayer a0) {
                            ((MediaPlayer.OnPreparedListener) arg).onPrepared(a0);
                            Anvil.render();
                        }
                    });
                } else {
                    ((VideoView) v).setOnPreparedListener((MediaPlayer.OnPreparedListener) null);
                }
                return true;
            }
            break;
        case "onQueryText":
            if (v instanceof SearchView && arg instanceof SearchView.OnQueryTextListener) {
                if (arg != null) {
                    ((SearchView) v).setOnQueryTextListener(new SearchView.OnQueryTextListener() {

                        public boolean onQueryTextChange(String a0) {
                            boolean r = ((SearchView.OnQueryTextListener) arg).onQueryTextChange(a0);
                            Anvil.render();
                            return r;
                        }

                        public boolean onQueryTextSubmit(String a0) {
                            boolean r = ((SearchView.OnQueryTextListener) arg).onQueryTextSubmit(a0);
                            Anvil.render();
                            return r;
                        }
                    });
                } else {
                    ((SearchView) v).setOnQueryTextListener((SearchView.OnQueryTextListener) null);
                }
                return true;
            }
            break;
        case "onQueryTextFocusChange":
            if (v instanceof SearchView && arg instanceof View.OnFocusChangeListener) {
                if (arg != null) {
                    ((SearchView) v).setOnQueryTextFocusChangeListener(new View.OnFocusChangeListener() {

                        public void onFocusChange(View a0, boolean a1) {
                            ((View.OnFocusChangeListener) arg).onFocusChange(a0, a1);
                            Anvil.render();
                        }
                    });
                } else {
                    ((SearchView) v).setOnQueryTextFocusChangeListener((View.OnFocusChangeListener) null);
                }
                return true;
            }
            break;
        case "onRatingBarChange":
            if (v instanceof RatingBar && arg instanceof RatingBar.OnRatingBarChangeListener) {
                if (arg != null) {
                    ((RatingBar) v).setOnRatingBarChangeListener(new RatingBar.OnRatingBarChangeListener() {

                        public void onRatingChanged(RatingBar a0, float a1, boolean a2) {
                            ((RatingBar.OnRatingBarChangeListener) arg).onRatingChanged(a0, a1, a2);
                            Anvil.render();
                        }
                    });
                } else {
                    ((RatingBar) v).setOnRatingBarChangeListener((RatingBar.OnRatingBarChangeListener) null);
                }
                return true;
            }
            break;
        case "onScroll":
            if (v instanceof AbsListView && arg instanceof AbsListView.OnScrollListener) {
                if (arg != null) {
                    ((AbsListView) v).setOnScrollListener(new AbsListView.OnScrollListener() {

                        public void onScroll(AbsListView a0, int a1, int a2, int a3) {
                            ((AbsListView.OnScrollListener) arg).onScroll(a0, a1, a2, a3);
                            Anvil.render();
                        }

                        public void onScrollStateChanged(AbsListView a0, int a1) {
                            ((AbsListView.OnScrollListener) arg).onScrollStateChanged(a0, a1);
                            Anvil.render();
                        }
                    });
                } else {
                    ((AbsListView) v).setOnScrollListener((AbsListView.OnScrollListener) null);
                }
                return true;
            }
            if (v instanceof NumberPicker && arg instanceof NumberPicker.OnScrollListener) {
                if (arg != null) {
                    ((NumberPicker) v).setOnScrollListener(new NumberPicker.OnScrollListener() {

                        public void onScrollStateChange(NumberPicker a0, int a1) {
                            ((NumberPicker.OnScrollListener) arg).onScrollStateChange(a0, a1);
                            Anvil.render();
                        }
                    });
                } else {
                    ((NumberPicker) v).setOnScrollListener((NumberPicker.OnScrollListener) null);
                }
                return true;
            }
            break;
        case "onSearchClick":
            if (v instanceof SearchView && arg instanceof View.OnClickListener) {
                if (arg != null) {
                    ((SearchView) v).setOnSearchClickListener(new View.OnClickListener() {

                        public void onClick(View a0) {
                            ((View.OnClickListener) arg).onClick(a0);
                            Anvil.render();
                        }
                    });
                } else {
                    ((SearchView) v).setOnSearchClickListener((View.OnClickListener) null);
                }
                return true;
            }
            break;
        case "onSeekBarChange":
            if (v instanceof SeekBar && arg instanceof SeekBar.OnSeekBarChangeListener) {
                if (arg != null) {
                    ((SeekBar) v).setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {

                        public void onProgressChanged(SeekBar a0, int a1, boolean a2) {
                            ((SeekBar.OnSeekBarChangeListener) arg).onProgressChanged(a0, a1, a2);
                            Anvil.render();
                        }

                        public void onStartTrackingTouch(SeekBar a0) {
                            ((SeekBar.OnSeekBarChangeListener) arg).onStartTrackingTouch(a0);
                            Anvil.render();
                        }

                        public void onStopTrackingTouch(SeekBar a0) {
                            ((SeekBar.OnSeekBarChangeListener) arg).onStopTrackingTouch(a0);
                            Anvil.render();
                        }
                    });
                } else {
                    ((SeekBar) v).setOnSeekBarChangeListener((SeekBar.OnSeekBarChangeListener) null);
                }
                return true;
            }
            break;
        case "onSuggestion":
            if (v instanceof SearchView && arg instanceof SearchView.OnSuggestionListener) {
                if (arg != null) {
                    ((SearchView) v).setOnSuggestionListener(new SearchView.OnSuggestionListener() {

                        public boolean onSuggestionClick(int a0) {
                            boolean r = ((SearchView.OnSuggestionListener) arg).onSuggestionClick(a0);
                            Anvil.render();
                            return r;
                        }

                        public boolean onSuggestionSelect(int a0) {
                            boolean r = ((SearchView.OnSuggestionListener) arg).onSuggestionSelect(a0);
                            Anvil.render();
                            return r;
                        }
                    });
                } else {
                    ((SearchView) v).setOnSuggestionListener((SearchView.OnSuggestionListener) null);
                }
                return true;
            }
            break;
        case "onSystemUiVisibilityChange":
            if (arg != null) {
                v.setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener() {

                    public void onSystemUiVisibilityChange(int a0) {
                        ((View.OnSystemUiVisibilityChangeListener) arg).onSystemUiVisibilityChange(a0);
                        Anvil.render();
                    }
                });
            } else {
                v.setOnSystemUiVisibilityChangeListener((View.OnSystemUiVisibilityChangeListener) null);
            }
            return true;
        case "onTabChanged":
            if (v instanceof TabHost && arg instanceof TabHost.OnTabChangeListener) {
                if (arg != null) {
                    ((TabHost) v).setOnTabChangedListener(new TabHost.OnTabChangeListener() {

                        public void onTabChanged(String a0) {
                            ((TabHost.OnTabChangeListener) arg).onTabChanged(a0);
                            Anvil.render();
                        }
                    });
                } else {
                    ((TabHost) v).setOnTabChangedListener((TabHost.OnTabChangeListener) null);
                }
                return true;
            }
            break;
        case "onTimeChanged":
            if (v instanceof TimePicker && arg instanceof TimePicker.OnTimeChangedListener) {
                if (arg != null) {
                    ((TimePicker) v).setOnTimeChangedListener(new TimePicker.OnTimeChangedListener() {

                        public void onTimeChanged(TimePicker a0, int a1, int a2) {
                            ((TimePicker.OnTimeChangedListener) arg).onTimeChanged(a0, a1, a2);
                            Anvil.render();
                        }
                    });
                } else {
                    ((TimePicker) v).setOnTimeChangedListener((TimePicker.OnTimeChangedListener) null);
                }
                return true;
            }
            break;
        case "onTouch":
            if (arg != null) {
                v.setOnTouchListener(new View.OnTouchListener() {

                    public boolean onTouch(View a0, MotionEvent a1) {
                        boolean r = ((View.OnTouchListener) arg).onTouch(a0, a1);
                        Anvil.render();
                        return r;
                    }
                });
            } else {
                v.setOnTouchListener((View.OnTouchListener) null);
            }
            return true;
        case "onValueChanged":
            if (v instanceof NumberPicker && arg instanceof NumberPicker.OnValueChangeListener) {
                if (arg != null) {
                    ((NumberPicker) v).setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {

                        public void onValueChange(NumberPicker a0, int a1, int a2) {
                            ((NumberPicker.OnValueChangeListener) arg).onValueChange(a0, a1, a2);
                            Anvil.render();
                        }
                    });
                } else {
                    ((NumberPicker) v).setOnValueChangedListener((NumberPicker.OnValueChangeListener) null);
                }
                return true;
            }
            break;
        case "onZoomInClick":
            if (v instanceof ZoomControls && arg instanceof View.OnClickListener) {
                if (arg != null) {
                    ((ZoomControls) v).setOnZoomInClickListener(new View.OnClickListener() {

                        public void onClick(View a0) {
                            ((View.OnClickListener) arg).onClick(a0);
                            Anvil.render();
                        }
                    });
                } else {
                    ((ZoomControls) v).setOnZoomInClickListener((View.OnClickListener) null);
                }
                return true;
            }
            break;
        case "onZoomOutClick":
            if (v instanceof ZoomControls && arg instanceof View.OnClickListener) {
                if (arg != null) {
                    ((ZoomControls) v).setOnZoomOutClickListener(new View.OnClickListener() {

                        public void onClick(View a0) {
                            ((View.OnClickListener) arg).onClick(a0);
                            Anvil.render();
                        }
                    });
                } else {
                    ((ZoomControls) v).setOnZoomOutClickListener((View.OnClickListener) null);
                }
                return true;
            }
            break;
        case "opaque":
            if (v instanceof TextureView && arg instanceof Boolean) {
                ((TextureView) v).setOpaque((boolean) arg);
                return true;
            }
            break;
        case "orientation":
            if (v instanceof GestureOverlayView && arg instanceof Integer) {
                ((GestureOverlayView) v).setOrientation((int) arg);
                return true;
            }
            if (v instanceof GridLayout && arg instanceof Integer) {
                ((GridLayout) v).setOrientation((int) arg);
                return true;
            }
            if (v instanceof LinearLayout && arg instanceof Integer) {
                ((LinearLayout) v).setOrientation((int) arg);
                return true;
            }
            break;
        case "outAnimation":
            if (v instanceof AdapterViewAnimator && arg instanceof ObjectAnimator) {
                ((AdapterViewAnimator) v).setOutAnimation((ObjectAnimator) arg);
                return true;
            }
            if (v instanceof ViewAnimator && arg instanceof Animation) {
                ((ViewAnimator) v).setOutAnimation((Animation) arg);
                return true;
            }
            break;
        case "overScrollMode":
            if (arg instanceof Integer) {
                v.setOverScrollMode((int) arg);
                return true;
            }
            break;
        case "overscrollFooter":
            if (v instanceof ListView && arg instanceof Drawable) {
                ((ListView) v).setOverscrollFooter((Drawable) arg);
                return true;
            }
            break;
        case "overscrollHeader":
            if (v instanceof ListView && arg instanceof Drawable) {
                ((ListView) v).setOverscrollHeader((Drawable) arg);
                return true;
            }
            break;
        case "paintFlags":
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setPaintFlags((int) arg);
                return true;
            }
            break;
        case "persistentDrawingCache":
            if (v instanceof ViewGroup && arg instanceof Integer) {
                ((ViewGroup) v).setPersistentDrawingCache((int) arg);
                return true;
            }
            break;
        case "pivotX":
            if (arg instanceof Float) {
                v.setPivotX((float) arg);
                return true;
            }
            break;
        case "pivotY":
            if (arg instanceof Float) {
                v.setPivotY((float) arg);
                return true;
            }
            break;
        case "popupBackgroundDrawable":
            if (v instanceof Spinner && arg instanceof Drawable) {
                ((Spinner) v).setPopupBackgroundDrawable((Drawable) arg);
                return true;
            }
            break;
        case "popupBackgroundResource":
            if (v instanceof Spinner && arg instanceof Integer) {
                ((Spinner) v).setPopupBackgroundResource((int) arg);
                return true;
            }
            break;
        case "popupParent":
            if (v instanceof KeyboardView && arg instanceof View) {
                ((KeyboardView) v).setPopupParent((View) arg);
                return true;
            }
            break;
        case "preserveEGLContextOnPause":
            if (v instanceof GLSurfaceView && arg instanceof Boolean) {
                ((GLSurfaceView) v).setPreserveEGLContextOnPause((boolean) arg);
                return true;
            }
            break;
        case "pressed":
            if (arg instanceof Boolean) {
                v.setPressed((boolean) arg);
                return true;
            }
            break;
        case "previewEnabled":
            if (v instanceof KeyboardView && arg instanceof Boolean) {
                ((KeyboardView) v).setPreviewEnabled((boolean) arg);
                return true;
            }
            break;
        case "privateImeOptions":
            if (v instanceof TextView && arg instanceof String) {
                ((TextView) v).setPrivateImeOptions((String) arg);
                return true;
            }
            break;
        case "progress":
            if (v instanceof ProgressBar && arg instanceof Integer) {
                ((ProgressBar) v).setProgress((int) arg);
                return true;
            }
            break;
        case "progressDrawable":
            if (v instanceof ProgressBar && arg instanceof Drawable) {
                ((ProgressBar) v).setProgressDrawable((Drawable) arg);
                return true;
            }
            break;
        case "prompt":
            if (v instanceof Spinner && arg instanceof CharSequence) {
                ((Spinner) v).setPrompt((CharSequence) arg);
                return true;
            }
            break;
        case "promptId":
            if (v instanceof Spinner && arg instanceof Integer) {
                ((Spinner) v).setPromptId((int) arg);
                return true;
            }
            break;
        case "proximityCorrectionEnabled":
            if (v instanceof KeyboardView && arg instanceof Boolean) {
                ((KeyboardView) v).setProximityCorrectionEnabled((boolean) arg);
                return true;
            }
            break;
        case "queryHint":
            if (v instanceof SearchView && arg instanceof CharSequence) {
                ((SearchView) v).setQueryHint((CharSequence) arg);
                return true;
            }
            break;
        case "queryRefinementEnabled":
            if (v instanceof SearchView && arg instanceof Boolean) {
                ((SearchView) v).setQueryRefinementEnabled((boolean) arg);
                return true;
            }
            break;
        case "rating":
            if (v instanceof RatingBar && arg instanceof Float) {
                ((RatingBar) v).setRating((float) arg);
                return true;
            }
            break;
        case "rawInputType":
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setRawInputType((int) arg);
                return true;
            }
            break;
        case "recyclerListener":
            if (v instanceof AbsListView && arg instanceof AbsListView.RecyclerListener) {
                ((AbsListView) v).setRecyclerListener((AbsListView.RecyclerListener) arg);
                return true;
            }
            break;
        case "remoteViewsAdapter":
            if (v instanceof AbsListView && arg instanceof Intent) {
                ((AbsListView) v).setRemoteViewsAdapter((Intent) arg);
                return true;
            }
            if (v instanceof AdapterViewAnimator && arg instanceof Intent) {
                ((AdapterViewAnimator) v).setRemoteViewsAdapter((Intent) arg);
                return true;
            }
            break;
        case "renderMode":
            if (v instanceof GLSurfaceView && arg instanceof Integer) {
                ((GLSurfaceView) v).setRenderMode((int) arg);
                return true;
            }
            break;
        case "renderer":
            if (v instanceof GLSurfaceView && arg instanceof GLSurfaceView.Renderer) {
                ((GLSurfaceView) v).setRenderer((GLSurfaceView.Renderer) arg);
                return true;
            }
            break;
        case "right":
            if (arg instanceof Integer) {
                v.setRight((int) arg);
                return true;
            }
            break;
        case "rightStripDrawable":
            if (v instanceof TabWidget && arg instanceof Drawable) {
                ((TabWidget) v).setRightStripDrawable((Drawable) arg);
                return true;
            }
            if (v instanceof TabWidget && arg instanceof Integer) {
                ((TabWidget) v).setRightStripDrawable((int) arg);
                return true;
            }
            break;
        case "rotation":
            if (arg instanceof Float) {
                v.setRotation((float) arg);
                return true;
            }
            break;
        case "rotationX":
            if (arg instanceof Float) {
                v.setRotationX((float) arg);
                return true;
            }
            break;
        case "rotationY":
            if (arg instanceof Float) {
                v.setRotationY((float) arg);
                return true;
            }
            break;
        case "routeTypes":
            if (v instanceof MediaRouteButton && arg instanceof Integer) {
                ((MediaRouteButton) v).setRouteTypes((int) arg);
                return true;
            }
            break;
        case "rowCount":
            if (v instanceof GridLayout && arg instanceof Integer) {
                ((GridLayout) v).setRowCount((int) arg);
                return true;
            }
            break;
        case "rowOrderPreserved":
            if (v instanceof GridLayout && arg instanceof Boolean) {
                ((GridLayout) v).setRowOrderPreserved((boolean) arg);
                return true;
            }
            break;
        case "saveEnabled":
            if (arg instanceof Boolean) {
                v.setSaveEnabled((boolean) arg);
                return true;
            }
            break;
        case "saveFromParentEnabled":
            if (arg instanceof Boolean) {
                v.setSaveFromParentEnabled((boolean) arg);
                return true;
            }
            break;
        case "scaleType":
            if (v instanceof ImageView && arg instanceof ImageView.ScaleType) {
                ((ImageView) v).setScaleType((ImageView.ScaleType) arg);
                return true;
            }
            break;
        case "scaleX":
            if (arg instanceof Float) {
                v.setScaleX((float) arg);
                return true;
            }
            break;
        case "scaleY":
            if (arg instanceof Float) {
                v.setScaleY((float) arg);
                return true;
            }
            break;
        case "scrollBarDefaultDelayBeforeFade":
            if (arg instanceof Integer) {
                v.setScrollBarDefaultDelayBeforeFade((int) arg);
                return true;
            }
            break;
        case "scrollBarFadeDuration":
            if (arg instanceof Integer) {
                v.setScrollBarFadeDuration((int) arg);
                return true;
            }
            break;
        case "scrollBarSize":
            if (arg instanceof Integer) {
                v.setScrollBarSize((int) arg);
                return true;
            }
            break;
        case "scrollBarStyle":
            if (arg instanceof Integer) {
                v.setScrollBarStyle((int) arg);
                return true;
            }
            break;
        case "scrollContainer":
            if (arg instanceof Boolean) {
                v.setScrollContainer((boolean) arg);
                return true;
            }
            break;
        case "scrollX":
            if (arg instanceof Integer) {
                v.setScrollX((int) arg);
                return true;
            }
            break;
        case "scrollY":
            if (arg instanceof Integer) {
                v.setScrollY((int) arg);
                return true;
            }
            break;
        case "scrollbarFadingEnabled":
            if (arg instanceof Boolean) {
                v.setScrollbarFadingEnabled((boolean) arg);
                return true;
            }
            break;
        case "scroller":
            if (v instanceof TextView && arg instanceof Scroller) {
                ((TextView) v).setScroller((Scroller) arg);
                return true;
            }
            break;
        case "scrollingCacheEnabled":
            if (v instanceof AbsListView && arg instanceof Boolean) {
                ((AbsListView) v).setScrollingCacheEnabled((boolean) arg);
                return true;
            }
            break;
        case "searchableInfo":
            if (v instanceof SearchView && arg instanceof SearchableInfo) {
                ((SearchView) v).setSearchableInfo((SearchableInfo) arg);
                return true;
            }
            break;
        case "secondaryProgress":
            if (v instanceof ProgressBar && arg instanceof Integer) {
                ((ProgressBar) v).setSecondaryProgress((int) arg);
                return true;
            }
            break;
        case "secure":
            if (v instanceof SurfaceView && arg instanceof Boolean) {
                ((SurfaceView) v).setSecure((boolean) arg);
                return true;
            }
            break;
        case "selectAllOnFocus":
            if (v instanceof TextView && arg instanceof Boolean) {
                ((TextView) v).setSelectAllOnFocus((boolean) arg);
                return true;
            }
            break;
        case "selected":
            if (arg instanceof Boolean) {
                v.setSelected((boolean) arg);
                return true;
            }
            break;
        case "selectedDateVerticalBar":
            if (v instanceof CalendarView && arg instanceof Drawable) {
                ((CalendarView) v).setSelectedDateVerticalBar((Drawable) arg);
                return true;
            }
            if (v instanceof CalendarView && arg instanceof Integer) {
                ((CalendarView) v).setSelectedDateVerticalBar((int) arg);
                return true;
            }
            break;
        case "selectedGroup":
            if (v instanceof ExpandableListView && arg instanceof Integer) {
                ((ExpandableListView) v).setSelectedGroup((int) arg);
                return true;
            }
            break;
        case "selectedWeekBackgroundColor":
            if (v instanceof CalendarView && arg instanceof Integer) {
                ((CalendarView) v).setSelectedWeekBackgroundColor((int) arg);
                return true;
            }
            break;
        case "selection":
            if (v instanceof AdapterView && arg instanceof Integer) {
                ((AdapterView) v).setSelection((int) arg);
                return true;
            }
            if (v instanceof EditText && arg instanceof Integer) {
                ((EditText) v).setSelection((int) arg);
                return true;
            }
            break;
        case "selector":
            if (v instanceof AbsListView && arg instanceof Drawable) {
                ((AbsListView) v).setSelector((Drawable) arg);
                return true;
            }
            if (v instanceof AbsListView && arg instanceof Integer) {
                ((AbsListView) v).setSelector((int) arg);
                return true;
            }
            break;
        case "shifted":
            if (v instanceof KeyboardView && arg instanceof Boolean) {
                ((KeyboardView) v).setShifted((boolean) arg);
                return true;
            }
            break;
        case "showDividers":
            if (v instanceof LinearLayout && arg instanceof Integer) {
                ((LinearLayout) v).setShowDividers((int) arg);
                return true;
            }
            break;
        case "showWeekNumber":
            if (v instanceof CalendarView && arg instanceof Boolean) {
                ((CalendarView) v).setShowWeekNumber((boolean) arg);
                return true;
            }
            break;
        case "shownWeekCount":
            if (v instanceof CalendarView && arg instanceof Integer) {
                ((CalendarView) v).setShownWeekCount((int) arg);
                return true;
            }
            break;
        case "shrinkAllColumns":
            if (v instanceof TableLayout && arg instanceof Boolean) {
                ((TableLayout) v).setShrinkAllColumns((boolean) arg);
                return true;
            }
            break;
        case "singleLine":
            if (v instanceof TextView && arg instanceof Boolean) {
                ((TextView) v).setSingleLine((boolean) arg);
                return true;
            }
            break;
        case "smoothScrollbarEnabled":
            if (v instanceof AbsListView && arg instanceof Boolean) {
                ((AbsListView) v).setSmoothScrollbarEnabled((boolean) arg);
                return true;
            }
            break;
        case "smoothScrollingEnabled":
            if (v instanceof HorizontalScrollView && arg instanceof Boolean) {
                ((HorizontalScrollView) v).setSmoothScrollingEnabled((boolean) arg);
                return true;
            }
            if (v instanceof ScrollView && arg instanceof Boolean) {
                ((ScrollView) v).setSmoothScrollingEnabled((boolean) arg);
                return true;
            }
            break;
        case "soundEffectsEnabled":
            if (arg instanceof Boolean) {
                v.setSoundEffectsEnabled((boolean) arg);
                return true;
            }
            break;
        case "spacing":
            if (v instanceof Gallery && arg instanceof Integer) {
                ((Gallery) v).setSpacing((int) arg);
                return true;
            }
            break;
        case "spannableFactory":
            if (v instanceof TextView && arg instanceof Spannable.Factory) {
                ((TextView) v).setSpannableFactory((Spannable.Factory) arg);
                return true;
            }
            break;
        case "spinnersShown":
            if (v instanceof DatePicker && arg instanceof Boolean) {
                ((DatePicker) v).setSpinnersShown((boolean) arg);
                return true;
            }
            break;
        case "stackFromBottom":
            if (v instanceof AbsListView && arg instanceof Boolean) {
                ((AbsListView) v).setStackFromBottom((boolean) arg);
                return true;
            }
            break;
        case "stepSize":
            if (v instanceof RatingBar && arg instanceof Float) {
                ((RatingBar) v).setStepSize((float) arg);
                return true;
            }
            break;
        case "stretchAllColumns":
            if (v instanceof TableLayout && arg instanceof Boolean) {
                ((TableLayout) v).setStretchAllColumns((boolean) arg);
                return true;
            }
            break;
        case "stretchMode":
            if (v instanceof GridView && arg instanceof Integer) {
                ((GridView) v).setStretchMode((int) arg);
                return true;
            }
            break;
        case "stripEnabled":
            if (v instanceof TabWidget && arg instanceof Boolean) {
                ((TabWidget) v).setStripEnabled((boolean) arg);
                return true;
            }
            break;
        case "submitButtonEnabled":
            if (v instanceof SearchView && arg instanceof Boolean) {
                ((SearchView) v).setSubmitButtonEnabled((boolean) arg);
                return true;
            }
            break;
        case "suggestionsAdapter":
            if (v instanceof SearchView && arg instanceof CursorAdapter) {
                ((SearchView) v).setSuggestionsAdapter((CursorAdapter) arg);
                return true;
            }
            break;
        case "surfaceTexture":
            if (v instanceof TextureView && arg instanceof SurfaceTexture) {
                ((TextureView) v).setSurfaceTexture((SurfaceTexture) arg);
                return true;
            }
            break;
        case "surfaceTextureListener":
            if (v instanceof TextureView && arg instanceof TextureView.SurfaceTextureListener) {
                ((TextureView) v).setSurfaceTextureListener((TextureView.SurfaceTextureListener) arg);
                return true;
            }
            break;
        case "switchMinWidth":
            if (v instanceof Switch && arg instanceof Integer) {
                ((Switch) v).setSwitchMinWidth((int) arg);
                return true;
            }
            break;
        case "switchPadding":
            if (v instanceof Switch && arg instanceof Integer) {
                ((Switch) v).setSwitchPadding((int) arg);
                return true;
            }
            break;
        case "switchTypeface":
            if (v instanceof Switch && arg instanceof Typeface) {
                ((Switch) v).setSwitchTypeface((Typeface) arg);
                return true;
            }
            break;
        case "systemUiVisibility":
            if (arg instanceof Integer) {
                v.setSystemUiVisibility((int) arg);
                return true;
            }
            break;
        case "tag":
            if (arg instanceof Object) {
                v.setTag((Object) arg);
                return true;
            }
            break;
        case "text":
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setText((int) arg);
                return true;
            }
            if (v instanceof TextSwitcher && arg instanceof CharSequence) {
                ((TextSwitcher) v).setText((CharSequence) arg);
                return true;
            }
            break;
        case "textAlignment":
            if (arg instanceof Integer) {
                v.setTextAlignment((int) arg);
                return true;
            }
            break;
        case "textColor":
            if (v instanceof TextView && arg instanceof ColorStateList) {
                ((TextView) v).setTextColor((ColorStateList) arg);
                return true;
            }
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setTextColor((int) arg);
                return true;
            }
            break;
        case "textDirection":
            if (arg instanceof Integer) {
                v.setTextDirection((int) arg);
                return true;
            }
            break;
        case "textFilterEnabled":
            if (v instanceof AbsListView && arg instanceof Boolean) {
                ((AbsListView) v).setTextFilterEnabled((boolean) arg);
                return true;
            }
            break;
        case "textIsSelectable":
            if (v instanceof TextView && arg instanceof Boolean) {
                ((TextView) v).setTextIsSelectable((boolean) arg);
                return true;
            }
            break;
        case "textKeepState":
            if (v instanceof TextView && arg instanceof CharSequence) {
                ((TextView) v).setTextKeepState((CharSequence) arg);
                return true;
            }
            break;
        case "textLocale":
            if (v instanceof TextView && arg instanceof Locale) {
                ((TextView) v).setTextLocale((Locale) arg);
                return true;
            }
            break;
        case "textOff":
            if (v instanceof Switch && arg instanceof CharSequence) {
                ((Switch) v).setTextOff((CharSequence) arg);
                return true;
            }
            if (v instanceof ToggleButton && arg instanceof CharSequence) {
                ((ToggleButton) v).setTextOff((CharSequence) arg);
                return true;
            }
            break;
        case "textOn":
            if (v instanceof Switch && arg instanceof CharSequence) {
                ((Switch) v).setTextOn((CharSequence) arg);
                return true;
            }
            if (v instanceof ToggleButton && arg instanceof CharSequence) {
                ((ToggleButton) v).setTextOn((CharSequence) arg);
                return true;
            }
            break;
        case "textScaleX":
            if (v instanceof TextView && arg instanceof Float) {
                ((TextView) v).setTextScaleX((float) arg);
                return true;
            }
            break;
        case "threshold":
            if (v instanceof AutoCompleteTextView && arg instanceof Integer) {
                ((AutoCompleteTextView) v).setThreshold((int) arg);
                return true;
            }
            break;
        case "thumb":
            if (v instanceof AbsSeekBar && arg instanceof Drawable) {
                ((AbsSeekBar) v).setThumb((Drawable) arg);
                return true;
            }
            break;
        case "thumbDrawable":
            if (v instanceof Switch && arg instanceof Drawable) {
                ((Switch) v).setThumbDrawable((Drawable) arg);
                return true;
            }
            break;
        case "thumbOffset":
            if (v instanceof AbsSeekBar && arg instanceof Integer) {
                ((AbsSeekBar) v).setThumbOffset((int) arg);
                return true;
            }
            break;
        case "thumbResource":
            if (v instanceof Switch && arg instanceof Integer) {
                ((Switch) v).setThumbResource((int) arg);
                return true;
            }
            break;
        case "thumbTextPadding":
            if (v instanceof Switch && arg instanceof Integer) {
                ((Switch) v).setThumbTextPadding((int) arg);
                return true;
            }
            break;
        case "timeZone":
            if (v instanceof TextClock && arg instanceof String) {
                ((TextClock) v).setTimeZone((String) arg);
                return true;
            }
            break;
        case "tokenizer":
            if (v instanceof MultiAutoCompleteTextView && arg instanceof MultiAutoCompleteTextView.Tokenizer) {
                ((MultiAutoCompleteTextView) v).setTokenizer((MultiAutoCompleteTextView.Tokenizer) arg);
                return true;
            }
            break;
        case "top":
            if (arg instanceof Integer) {
                v.setTop((int) arg);
                return true;
            }
            break;
        case "touchDelegate":
            if (arg instanceof TouchDelegate) {
                v.setTouchDelegate((TouchDelegate) arg);
                return true;
            }
            break;
        case "trackDrawable":
            if (v instanceof Switch && arg instanceof Drawable) {
                ((Switch) v).setTrackDrawable((Drawable) arg);
                return true;
            }
            break;
        case "trackResource":
            if (v instanceof Switch && arg instanceof Integer) {
                ((Switch) v).setTrackResource((int) arg);
                return true;
            }
            break;
        case "transcriptMode":
            if (v instanceof AbsListView && arg instanceof Integer) {
                ((AbsListView) v).setTranscriptMode((int) arg);
                return true;
            }
            break;
        case "transform":
            if (v instanceof TextureView && arg instanceof Matrix) {
                ((TextureView) v).setTransform((Matrix) arg);
                return true;
            }
            break;
        case "transformationMethod":
            if (v instanceof TextView && arg instanceof TransformationMethod) {
                ((TextView) v).setTransformationMethod((TransformationMethod) arg);
                return true;
            }
            break;
        case "translationX":
            if (arg instanceof Float) {
                v.setTranslationX((float) arg);
                return true;
            }
            break;
        case "translationY":
            if (arg instanceof Float) {
                v.setTranslationY((float) arg);
                return true;
            }
            break;
        case "typeface":
            if (v instanceof TextView && arg instanceof Typeface) {
                ((TextView) v).setTypeface((Typeface) arg);
                return true;
            }
            break;
        case "uncertainGestureColor":
            if (v instanceof GestureOverlayView && arg instanceof Integer) {
                ((GestureOverlayView) v).setUncertainGestureColor((int) arg);
                return true;
            }
            break;
        case "unfocusedMonthDateColor":
            if (v instanceof CalendarView && arg instanceof Integer) {
                ((CalendarView) v).setUnfocusedMonthDateColor((int) arg);
                return true;
            }
            break;
        case "unselectedAlpha":
            if (v instanceof Gallery && arg instanceof Float) {
                ((Gallery) v).setUnselectedAlpha((float) arg);
                return true;
            }
            break;
        case "up":
            if (v instanceof TabHost && arg instanceof LocalActivityManager) {
                ((TabHost) v).setup((LocalActivityManager) arg);
                return true;
            }
            break;
        case "useDefaultMargins":
            if (v instanceof GridLayout && arg instanceof Boolean) {
                ((GridLayout) v).setUseDefaultMargins((boolean) arg);
                return true;
            }
            break;
        case "validator":
            if (v instanceof AutoCompleteTextView && arg instanceof AutoCompleteTextView.Validator) {
                ((AutoCompleteTextView) v).setValidator((AutoCompleteTextView.Validator) arg);
                return true;
            }
            break;
        case "value":
            if (v instanceof NumberPicker && arg instanceof Integer) {
                ((NumberPicker) v).setValue((int) arg);
                return true;
            }
            break;
        case "velocityScale":
            if (v instanceof AbsListView && arg instanceof Float) {
                ((AbsListView) v).setVelocityScale((float) arg);
                return true;
            }
            break;
        case "verticalCorrection":
            if (v instanceof KeyboardView && arg instanceof Integer) {
                ((KeyboardView) v).setVerticalCorrection((int) arg);
                return true;
            }
            break;
        case "verticalFadingEdgeEnabled":
            if (arg instanceof Boolean) {
                v.setVerticalFadingEdgeEnabled((boolean) arg);
                return true;
            }
            break;
        case "verticalGravity":
            if (v instanceof LinearLayout && arg instanceof Integer) {
                ((LinearLayout) v).setVerticalGravity((int) arg);
                return true;
            }
            if (v instanceof RelativeLayout && arg instanceof Integer) {
                ((RelativeLayout) v).setVerticalGravity((int) arg);
                return true;
            }
            break;
        case "verticalScrollBarEnabled":
            if (arg instanceof Boolean) {
                v.setVerticalScrollBarEnabled((boolean) arg);
                return true;
            }
            break;
        case "verticalScrollbarOverlay":
            if (v instanceof WebView && arg instanceof Boolean) {
                ((WebView) v).setVerticalScrollbarOverlay((boolean) arg);
                return true;
            }
            break;
        case "verticalScrollbarPosition":
            if (arg instanceof Integer) {
                v.setVerticalScrollbarPosition((int) arg);
                return true;
            }
            break;
        case "verticalSpacing":
            if (v instanceof GridView && arg instanceof Integer) {
                ((GridView) v).setVerticalSpacing((int) arg);
                return true;
            }
            break;
        case "videoPath":
            if (v instanceof VideoView && arg instanceof String) {
                ((VideoView) v).setVideoPath((String) arg);
                return true;
            }
            break;
        case "videoURI":
            if (v instanceof VideoView && arg instanceof Uri) {
                ((VideoView) v).setVideoURI((Uri) arg);
                return true;
            }
            break;
        case "visibility":
            if (arg instanceof Integer) {
                v.setVisibility((int) arg);
                return true;
            }
            break;
        case "webChromeClient":
            if (v instanceof WebView && arg instanceof WebChromeClient) {
                ((WebView) v).setWebChromeClient((WebChromeClient) arg);
                return true;
            }
            break;
        case "webContentsDebuggingEnabled":
            if (v instanceof WebView && arg instanceof Boolean) {
                ((WebView) v).setWebContentsDebuggingEnabled((boolean) arg);
                return true;
            }
            break;
        case "webViewClient":
            if (v instanceof WebView && arg instanceof WebViewClient) {
                ((WebView) v).setWebViewClient((WebViewClient) arg);
                return true;
            }
            break;
        case "weekDayTextAppearance":
            if (v instanceof CalendarView && arg instanceof Integer) {
                ((CalendarView) v).setWeekDayTextAppearance((int) arg);
                return true;
            }
            break;
        case "weekNumberColor":
            if (v instanceof CalendarView && arg instanceof Integer) {
                ((CalendarView) v).setWeekNumberColor((int) arg);
                return true;
            }
            break;
        case "weekSeparatorLineColor":
            if (v instanceof CalendarView && arg instanceof Integer) {
                ((CalendarView) v).setWeekSeparatorLineColor((int) arg);
                return true;
            }
            break;
        case "weightSum":
            if (v instanceof LinearLayout && arg instanceof Float) {
                ((LinearLayout) v).setWeightSum((float) arg);
                return true;
            }
            break;
        case "width":
            if (v instanceof TextView && arg instanceof Integer) {
                ((TextView) v).setWidth((int) arg);
                return true;
            }
            break;
        case "willNotCacheDrawing":
            if (arg instanceof Boolean) {
                v.setWillNotCacheDrawing((boolean) arg);
                return true;
            }
            break;
        case "willNotDraw":
            if (arg instanceof Boolean) {
                v.setWillNotDraw((boolean) arg);
                return true;
            }
            break;
        case "wrapSelectorWheel":
            if (v instanceof NumberPicker && arg instanceof Boolean) {
                ((NumberPicker) v).setWrapSelectorWheel((boolean) arg);
                return true;
            }
            break;
        case "x":
            if (arg instanceof Float) {
                v.setX((float) arg);
                return true;
            }
            break;
        case "y":
            if (arg instanceof Float) {
                v.setY((float) arg);
                return true;
            }
            break;
        case "zOrderMediaOverlay":
            if (v instanceof SurfaceView && arg instanceof Boolean) {
                ((SurfaceView) v).setZOrderMediaOverlay((boolean) arg);
                return true;
            }
            break;
        case "zOrderOnTop":
            if (v instanceof SurfaceView && arg instanceof Boolean) {
                ((SurfaceView) v).setZOrderOnTop((boolean) arg);
                return true;
            }
            break;
        case "zoomSpeed":
            if (v instanceof ZoomButton && arg instanceof Long) {
                ((ZoomButton) v).setZoomSpeed((long) arg);
                return true;
            }
            if (v instanceof ZoomControls && arg instanceof Long) {
                ((ZoomControls) v).setZoomSpeed((long) arg);
                return true;
            }
            break;
    }
    return false;
}
Example 6
Project: double-espresso-master  File: AdapterViewProtocols.java View source code
@Override
public void makeDataRenderedWithinAdapterView(AdapterView<? extends Adapter> adapterView, AdaptedData data) {
    checkArgument(data.opaqueToken instanceof Integer, "Not my data: %s", data);
    int position = ((Integer) data.opaqueToken).intValue();
    boolean moved = false;
    // though.
    if (Build.VERSION.SDK_INT > 7) {
        if (adapterView instanceof AbsListView) {
            if (Build.VERSION.SDK_INT > 10) {
                ((AbsListView) adapterView).smoothScrollToPositionFromTop(position, adapterView.getPaddingTop(), 0);
            } else {
                ((AbsListView) adapterView).smoothScrollToPosition(position);
            }
            moved = true;
        }
        if (Build.VERSION.SDK_INT > 10) {
            if (adapterView instanceof AdapterViewAnimator) {
                if (adapterView instanceof AdapterViewFlipper) {
                    ((AdapterViewFlipper) adapterView).stopFlipping();
                }
                ((AdapterViewAnimator) adapterView).setDisplayedChild(position);
                moved = true;
            }
        }
    }
    if (!moved) {
        adapterView.setSelection(position);
    }
}
Example 7
Project: cw-omnibus-master  File: FlipperDemo2.java View source code
@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    setContentView(R.layout.main);
    flipper = (AdapterViewFlipper) findViewById(R.id.details);
    flipper.setAdapter(new ArrayAdapter<String>(this, R.layout.big_button, items));
    flipper.setFlipInterval(2000);
    flipper.startFlipping();
}