Giter Site home page Giter Site logo

tdtsh / tibubbleviewforandroid Goto Github PK

View Code? Open in Web Editor NEW
24.0 2.0 6.0 1.89 MB

This is a Titanium Mobile Mobile module (for Android) project that TiBubbleView https://github.com/k0sukey/TiBubbleView ported to Android.

License: MIT License

JavaScript 34.85% Java 65.15%

tibubbleviewforandroid's Introduction

TiBubbleView for Android

This is a Titanium Mobile Mobile module (for Android) project that TiBubbleView https://github.com/k0sukey/TiBubbleView ported to Android.

screenshot.png

Install

Compiled module download

Register your module with your application by editing tiapp.xml and adding your module. Example:

<modules>
	<module platform="android">com.tdtsh.tibubbleandroid</module>
</modules>

When you run your project, the compiler will combine your module along with its dependencies and assets into the application.

Usage

You can see screenshot's example at example/app.js.

var label = Ti.UI.createLabel({
	top: 10,
	right: 10, // or 14 (consider the bubble beak)
	bottom: 10,
	left: 14, // or 10 (consider the bubble beak)
	width: Ti.UI.SIZE,
	height: Ti.UI.SIZE,
	color: '#fff',
	textAlign: Ti.UI.TEXT_ALIGNMENT_LEFT,
	verticalAlign: Ti.UI.TEXT_VERTICAL_ALIGNMENT_TOP,
	text: 'hello, world'
});

var TiBubble = require('com.tdtsh.tibubbleandroid');
var bubble = TiBubble.createView({
	top: 0,
	left: 10,
	width: Ti.UI.SIZE, // just fit from contained label
	height: Ti.UI.SIZE, // just fit from contained label
	bubbleColor: '#dfdee5', // default: #fff
	bubbleRadius: 20, // default: 20
	bubbleBeak: TiBubble.bubbleBeakLeft // default BUBBLE_BEAK_LEFT
	bubbleBeakVertical: TiBubble.bubbleBeakUpper // default BUBBLE_BEAK_LOWER
});
bubble.add(label);

Properties

Caution! There is a little difference from iOS version

  • bubbleColor
  • bubbleRadius
  • bubbleBeak / TiBubble.bubbleBeakLeft or TiBubble.bubbleBeakRight or TiBubble.bubbleBeakNone
  • bubbleBeakVertical / TiBubble.bubbleBeakLower or TiBubble.bubbleBeakUpper

Credits

Original TiBubbleView https://github.com/k0sukey/TiBubbleView by Kosuke Isobe

License

The MIT License (MIT) Copyright (c) 2016 Tadatoshi Hanazaki

tibubbleviewforandroid's People

Contributors

m1ga avatar tdtsh 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

Watchers

 avatar  avatar

tibubbleviewforandroid's Issues

No arrow

It would be good to have the option to add a box without an arrow like this

Alloy View

Hi how can i done this by using alloy view?

Different arrow

Would it be possible to add a different arrow style:

(left/right arrow)

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.