Giter Site home page Giter Site logo

0359xiaodong / tibubbleviewforandroid Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tdtsh/tibubbleviewforandroid

0.0 1.0 0.0 1.31 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.92% Java 65.08%

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
  • bubbleBeakVertical / TiBubble.bubbleBeakLower or TiBubble.bubbleBeakUpper

Credits

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

License

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

tibubbleviewforandroid's People

Contributors

tdtsh avatar

Watchers

尚晓东 avatar

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.