0

I'm using the great showcase view library in my app and it's amazing but unfortunately layout is messed up on smaller screens on small screens, i guess it's a problem in my implementation but i couldn't figure out how to fix this.

example

and the code in one of my activities is as follow:

if(showcase_flag == 1){
            mPlusButton.setClickable(false);
            guide.setVisibility(View.INVISIBLE);
            final RelativeLayout.LayoutParams lps = new RelativeLayout.LayoutParams(
                    ViewGroup.LayoutParams.WRAP_CONTENT,
                    ViewGroup.LayoutParams.WRAP_CONTENT);
            lps.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
            lps.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
            lps.setMargins(40,0,0,160);

            mViews1 = new ShowcaseView.Builder(this)
                    .setStyle(R.style.CustomShowcaseTheme3)
                    .setContentTitle("Welcome to listo")
                    .setContentText("The best way to share your to-do lists\nand manage them in just a few clicks!")
                    .setOnClickListener(new View.OnClickListener() {
                        @Override
                        public void onClick(View v) {

                            if(showcase_num == 0){
                                showcase_num++;
                                mViews1.setTarget(new ViewTarget(R.id.fab,MainActivity.this));
                                mViews1.setContentTitle("Manage your lists");
                                mViews1.setContentText("Press on the plus button to add a new list.\nLong press on a list to exit from it, rename, mute or delete it." +
                                        "\n\nAt both sides of the list's name you can see the number of participants and tasks on it.");
                                mViews1.setButtonText("Got it!");

                            }else{
                                mViews1.hide();
                                mViews1.destroyDrawingCache();
                                mPlusButton.setClickable(true);

                                updateList();

                                SharedPreferences.Editor editor = prefs.edit();
                                editor.putInt("showcase_key", 0);
                                editor.commit();
                            }

                        }
                    })
                    .doNotBlockTouches()
                    .build();

            mViews1.setButtonText("I'm ready");
            mViews1.setButtonPosition(lps);
        }else {
            updateList();
        }
kitsuneFox
  • 1,243
  • 3
  • 18
  • 31

1 Answers1

0

Unfortunately that isn't the issue with your implementation, it is an issue with the library. It isn't very clever about trying to squeeze everything in on a small screen. I'll keep this issue in mind as I'm currently rewriting it!

Alex Curran
  • 8,818
  • 6
  • 49
  • 55
  • I'm so glad that you add an answer here...so im guess the only solution right now is to block small screen devices from downloading my app, at least until u will publish the new livrary – kitsuneFox Apr 29 '15 at 15:49
  • I have another major problem..please help me: On some devices i get the error IllegalArgumentException: Layout: -999552 < 0, what is that, and how to fix it? – kitsuneFox May 01 '15 at 14:50