-1

i'll Follow below links but didn't help for me :

Whenever i add below code :

// get our folding cell
        final FoldingCell fc = (FoldingCell) findViewById(R.id.folding_cell);
​
        // attach click listener to folding cell
        fc.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                fc.toggle(false);
            }
        });

This Error Comes : Illegal character U+200B

Error is not show on Logcat or massage it's show in MainActivity.class at the below findviewById

activity_main.xml

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.foldingcell.MainActivity">

    <com.ramotion.foldingcell.FoldingCell
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/folding_cell"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:clipChildren="false"
        android:clipToPadding="false"
        >
        ​
    </com.ramotion.foldingcell.FoldingCell>

</LinearLayout>

I copy code from hear: https://android-arsenal.com/details/1/3426

Ali
  • 3,346
  • 4
  • 21
  • 56
  • can u share your whole logcat error / layout and activity code – AskNilesh Jul 04 '18 at 09:27
  • in `Logcat` can't show me any error – Ali Jul 04 '18 at 09:29
  • 2
    *i'll Follow below links but didn't help for me* - I copied your code, got the same error, deleted the blank line and then it worked. I can't imagine it would not work for you. Tell me why I should not close the question as duplicate, why did it not work for you? – Tim Jul 04 '18 at 09:31
  • i already tried that really it's can't work for me @TimCastelijns – Ali Jul 04 '18 at 09:32
  • 1
    what did you do? Did you cut the line and then paste it back or something? If you just delete the line it is impossible that the error is still there – Tim Jul 04 '18 at 09:33
  • I don't know what you mean by that, but paste it if you like – Tim Jul 04 '18 at 09:36
  • `\u200B` is a zero-width space. Deleting, rewriting from fresh - as said - is the best option. – Joop Eggen Jul 04 '18 at 09:37

1 Answers1

4

There is an invisible character on the third line. Delete the line manually and add it again using the keyboard.

Try replacing your code with this one:

// get our folding cell
    final FoldingCell fc = (FoldingCell) findViewById(R.id.folding_cell);

    // attach click listener to folding cell
    fc.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            fc.toggle(false);
        }
    });
dj_frunza
  • 1,553
  • 3
  • 17
  • 28