Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Syntax Error: Insert "}" to complete block [closed]

Tags:

java

android

I'm keep getting an error with my code. I'm producing an app to produce quotes. Can anyone help me with this? No matter what I try I get "Syntax Error: Insert "}" to complete block." When I insert "}" it gives me an error saying that my code is "unreachable" and when I add a bracket to make it reachable it takes me back to the first error and it just loops. It's driving me crazy! Can anyone help? Thanks! Here is my code:

   {

    vbjokes = (Button) findViewById(R.id.bjokes);
    vbabout = (Button) findViewById(R.id.babout);
    vtvdisplay = (TextView) findViewById(R.id.tvdisplay);
    vbjokes.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View arg0) {
            // TODO Auto-generated method stub


        }
    });
    vbabout.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View arg0) {
            // TODO Auto-generated method stub
            vtvdisplay.setText("                                                                 Thank you for downloading Punny Jokes! 
            vtvdisplay.setTextColor(Color.BLACK);
            vtvdisplay.setTextSize((float) 20d);
            vtvdisplay.setBackgroundColor(Color.GRAY);

        }
    });


    final View controlsView = findViewById(R.id.fullscreen_content_controls);
    final View contentView = findViewById(R.id.tvdisplay);


    mSystemUiHider = SystemUiHider.getInstance(this, contentView,
            HIDER_FLAGS);
    mSystemUiHider.setup();
    mSystemUiHider
            .setOnVisibilityChangeListener(new SystemUiHider.OnVisibilityChangeListener() {
                int mControlsHeight;
                int mShortAnimTime;

                @Override
                @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)
                public void onVisibilityChange(boolean visible) {
                    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {

                        if (mControlsHeight == 0) {
                            mControlsHeight = controlsView.getHeight();
                        }
                        if (mShortAnimTime == 0) {
                            mShortAnimTime = getResources().getInteger(
                                    android.R.integer.config_shortAnimTime);
                        }
                        controlsView
                                .animate()
                                .translationY(visible ? 0 : mControlsHeight)
                                .setDuration(mShortAnimTime);
                    } else {

                        controlsView.setVisibility(visible ? View.VISIBLE
                                : View.GONE);
                    }

                    if (visible && AUTO_HIDE) {
                        delayedHide(AUTO_HIDE_DELAY_MILLIS);
                    }
                }
            });

    contentView.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            if (TOGGLE_ON_CLICK) {
                mSystemUiHider.toggle();
            } else {
                mSystemUiHider.show();
            }
        }
    });


    findViewById(R.id.babout).setOnTouchListener(
            mDelayHideTouchListener);

        }
like image 512
tash Avatar asked Nov 29 '22 12:11

tash


1 Answers

vtvdisplay.setText(" Thank you for downloading Punny Jokes!

It looks like you're missing a "); at the end or you copied and pasted it wrong.

like image 69
Jonathan Doran Avatar answered Dec 05 '22 17:12

Jonathan Doran