Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Your library no longer works #79

Closed
ghost opened this issue Sep 7, 2021 · 1 comment
Closed

Your library no longer works #79

ghost opened this issue Sep 7, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 7, 2021

This is the code I am using:

// inside onCreate of MainActivity
TextView options = findViewById(R.id.optionsTextView);
paintView.setOnCreateContextMenuListener(this);

void createFancyPowerMenu(View view) {
        Log.d("PaintView", "huh, why???");
        // create power menu item list
        List<PowerMenuItem> longPressMenuItems = Arrays.asList(
                new PowerMenuItem("PLACE ANCHORS"),
                new PowerMenuItem("NEW ELLIPSOID ID"),
                new PowerMenuItem("ELLIPSOID IDS"),
                new PowerMenuItem("GET SESSIONS"),
                new PowerMenuItem("SESSIONS")
        );
        new PowerMenu.Builder(this)
                .addItemList(longPressMenuItems)
                .setCircularEffect(CircularEffect.INNER)
                .setLifecycleOwner(this)
                .setMenuRadius(10f)
                .setMenuShadow(10f)
                .setTextSize(12)
                .setTextColor(ContextCompat.getColor(this, R.color.white_transparent))
                .setTextGravity(Gravity.CENTER)
                .setTextTypeface(Typeface.create("sans-serif-medium", Typeface.BOLD))
                .setSelectedTextColor(android.graphics.Color.WHITE)
                .setMenuColor(android.graphics.Color.BLACK)
                .setFocusable(true)
                .setSelectedMenuColor(ContextCompat.getColor(this, R.color.aqua))
                .build()
                .showAsDropDown(view);
    }

the text view XML

<TextView
        android:id="@+id/optionsTextView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/optionsTextViewLabel"
        android:textSize="20sp"
        android:padding="10dp"
        android:textColor="#fff"
        android:background="#000" />

I don't see anything when I execute the code

@ghost
Copy link
Author

ghost commented Sep 7, 2021

I fixed the problem by using .showAtLocation(this.getRootView(), 100, 100) instead

@ghost ghost closed this as completed Sep 7, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants