Giter Club home page Giter Club logo

android-tooltips's People

Contributors

rharter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

android-tooltips's Issues

Remove allowBackup="true"

allowBackup="true" causes merger error in projects which has this attribute set to false. tools:replace"allowBackup" doesn't seem to work and is an open issue with google as mentioned here.

E/PropertyValuesHolder: Couldn't find setter/getter

Hello there and thank you for this really helpful library. I tried to implement it to my project and I get the following error:

E/PropertyValuesHolder﹕ Couldn't find setter/getter for property translationX with value type int
E/PropertyValuesHolder﹕ Couldn't find setter/getter for property translationY with value type int

Sorry if I am doing something wrong, but I am trying this for hours. I want to show the tooltip on an ImageView without having to click it.

My implementation code for MyActivity is as follows:

public class MyActivity extends Activity {

private static final int POINTER_SIZE = 15;
private ToolTipLayout tipContainer;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.myActivity);

    // Get the tooltip layout
    tipContainer = (ToolTipLayout) findViewById(R.id.tooltip_container);

..... blah blah blah .....

 // Create a ToolTip using the Builder class
    View contentView = createToolTipView("Tooltip right of the button",
            Color.WHITE, getResources().getColor(Color.RED));
    contentView.setLayoutParams(new ViewGroup.LayoutParams(
            ViewGroup.LayoutParams.WRAP_CONTENT,
            ViewGroup.LayoutParams.WRAP_CONTENT
    ));

    ToolTip t = new ToolTip.Builder(MyActivity.this)
            .anchor(findViewById(R.id.bigPhoto))
            .color(getResources().getColor(Color.RED))
            .gravity(Gravity.BOTTOM)
            .pointerSize(POINTER_SIZE)
            .contentView(contentView)
            .build();

  // Add the ToolTip to the view, using the default animations
        tipContainer.addTooltip(t);
}

   public View createToolTipView(String text, int textColor, int bgColor) {
    float density = getResources().getDisplayMetrics().density;
    int padding = (int) (8 * density);

    TextView contentView = new TextView(MyActivity.this);
    contentView.setPadding(padding, padding, padding, padding);
    contentView.setText(text);
    contentView.setTextColor(textColor);
    contentView.setBackgroundColor(bgColor);
    return contentView;
}

 }

Could not place tooltip atop of target view with WRAP_CONTENT prop for width.

Is there any way to align a tooltip with Gravity.TOP set with a WRAP_CONTENT width just above target view?

E.g.
tablet

Code involved:

View contentView = createToolTipView("Tooltip above the button",
        Color.BLACK, getResources().getColor(android.R.color.holo_green_light));

contentView.setLayoutParams(new ViewGroup.LayoutParams(
        ViewGroup.LayoutParams.WRAP_CONTENT,
        ViewGroup.LayoutParams.WRAP_CONTENT
));

ToolTip t = new Builder(callingActivity)
        .anchor(targetView)
        .color(getResources().getColor(android.R.color.holo_green_light))
        .gravity(Gravity.TOP)
        .pointerSize(15)
        .contentView(contentView)
        .build();

tipContainer.addTooltip(t);

Tool tip inside listview

How can i set tool tip inside listview for a particular item. On scroll the tool tip also scroll with item or dissmiss and when again that item position cam tool tip again show at same position

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.