Java Code Examples for org.appcelerator.kroll.annotations.Kroll#getProperty()

The following examples show how to use org.appcelerator.kroll.annotations.Kroll#getProperty() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ActionbarextrasModule.java    From actionbarextras with MIT License 5 votes vote down vote up
/**
 * returns the height of the Actionbar as absolute pixels
 * @return int	actionbar height
 */
@Kroll.getProperty @Kroll.method
public int getActionbarHeight() {
	TiApplication appContext = TiApplication.getInstance();
	final TypedArray styledAttributes = appContext.getTheme().obtainStyledAttributes(
               new int[] { android.R.attr.actionBarSize }
       );
	int mActionBarSize = (int) styledAttributes.getDimension(0, 0);
	styledAttributes.recycle();
	return mActionBarSize;
}
 
Example 2
Source File: GCMModule.java    From gcmpush with Apache License 2.0 5 votes vote down vote up
@Kroll.method
@Kroll.getProperty
@SuppressWarnings("unchecked")
public KrollDict getLastData() {
    Map map = new Gson().fromJson(TiApplication.getInstance().getAppProperties().getString(LAST_DATA, null), Map.class);
    return map != null ? new KrollDict(map) : null;
}
 
Example 3
Source File: ActionbarextrasModule.java    From actionbarextras with MIT License 5 votes vote down vote up
@Kroll.getProperty @Kroll.method
public String getTitle()
{
	ActionBar actionBar = getActionBar();
	if (actionBar == null) {
		return "";
	}
	return actionBar.getTitle().toString();
}
 
Example 4
Source File: CollectionViewProxy.java    From TiCollectionView with MIT License 5 votes vote down vote up
@Kroll.method @Kroll.getProperty
public boolean isRefreshing() {
	TiUIView listView = peekView();
	
	if (listView != null) {
		return ((CollectionView) listView).isRefreshing();
	}
	
	return false;
}
 
Example 5
Source File: CollectionViewProxy.java    From TiCollectionView with MIT License 5 votes vote down vote up
@Kroll.method @Kroll.getProperty
public int getSectionCount() {
	if (TiApplication.isUIThread()) {
		return handleSectionCount();
	} else {
		return (Integer) TiMessenger.sendBlockingMainMessage(getMainHandler().obtainMessage(MSG_SECTION_COUNT));
	}
}
 
Example 6
Source File: CollectionViewProxy.java    From TiCollectionView with MIT License 5 votes vote down vote up
@Kroll.method @Kroll.getProperty
public CollectionSectionProxy[] getSections()
{
	if (TiApplication.isUIThread()) {
		return handleSections();
	} else {
		return (CollectionSectionProxy[]) TiMessenger.sendBlockingMainMessage(getMainHandler().obtainMessage(MSG_GET_SECTIONS));
	}
}
 
Example 7
Source File: TiBubbleAndroidModule.java    From TiBubbleViewForAndroid with MIT License 4 votes vote down vote up
@Kroll.getProperty
public int getBubbleBeakLower() {
	return BUBBLE_BEAK_LOWER;
}
 
Example 8
Source File: TiGooshModule.java    From ti.goosh with MIT License 4 votes vote down vote up
@Kroll.method
@Kroll.getProperty
public Boolean isRemoteNotificationsEnabled() {
	return (getRemoteDeviceUUID() != null);
}
 
Example 9
Source File: CollectionSectionProxy.java    From TiCollectionView with MIT License 4 votes vote down vote up
@Kroll.method @Kroll.getProperty
public String getFooterTitle() {
	return footerTitle;
}
 
Example 10
Source File: CollectionSectionProxy.java    From TiCollectionView with MIT License 4 votes vote down vote up
@Kroll.method @Kroll.getProperty
public String getHeaderTitle() {
	return headerTitle;
}
 
Example 11
Source File: TiBubbleAndroidModule.java    From TiBubbleViewForAndroid with MIT License 4 votes vote down vote up
@Kroll.getProperty
public int getBubbleBeakUpper() {
	return BUBBLE_BEAK_UPPER;
}
 
Example 12
Source File: CollectionSectionProxy.java    From TiCollectionView with MIT License 4 votes vote down vote up
@Kroll.method @Kroll.getProperty
public TiViewProxy getHeaderView() {
	return headerView;
}
 
Example 13
Source File: ExampleProxy.java    From TiCollectionView with MIT License 4 votes vote down vote up
@Kroll.getProperty @Kroll.method
public String getMessage()
{
       return "Hello World from my module";
}
 
Example 14
Source File: TiBubbleAndroidModule.java    From TiBubbleViewForAndroid with MIT License 4 votes vote down vote up
@Kroll.getProperty
public int getBubbleBeakNone() {
	return BUBBLE_BEAK_NONE;
}
 
Example 15
Source File: AutofocusModule.java    From TiAndroidAutofocus with MIT License 4 votes vote down vote up
@Kroll.getProperty
public String getExampleProp()
{
	Log.d(TAG, "get example property");
	return "hello world";
}
 
Example 16
Source File: RealswitchModule.java    From RealSwitch with MIT License 4 votes vote down vote up
@Kroll.getProperty
public String getExampleProp()
{
	Log.d(TAG, "get example property");
	return "hello world";
}
 
Example 17
Source File: TiBubbleAndroidModule.java    From TiBubbleViewForAndroid with MIT License 4 votes vote down vote up
@Kroll.getProperty
public int getBubbleBeakRight() {
	return BUBBLE_BEAK_RIGHT;
}
 
Example 18
Source File: CaffeinaGCMModule.java    From gcm with MIT License 4 votes vote down vote up
@Kroll.method
@Kroll.getProperty
public String getRegistrationId() {
	return GCMRegistrar.getRegistrationId(TiApplication.getInstance());
}
 
Example 19
Source File: CaffeinaGCMModule.java    From gcm with MIT License 4 votes vote down vote up
@Kroll.method
@Kroll.getProperty
public String getRemoteDeviceUUID() {
	return this.getRegistrationId();
}
 
Example 20
Source File: CaffeinaGCMModule.java    From gcm with MIT License 4 votes vote down vote up
@Kroll.method
@Kroll.getProperty
public Boolean isRemoteNotificationsEnabled() {
	String registrationId = this.getRegistrationId();
	return (registrationId != null && registrationId.length() > 0);
}