This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this sets the background color of the master UIView (when there are no windows/tab groups on it) | |
Titanium.UI.setBackgroundColor('#000'); | |
// create tab group | |
var tabGroup = Titanium.UI.createTabGroup({ | |
backgroundImage:'/images/tabbar.png' | |
}); | |
// Component Creation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.support.v7.widget.Toolbar; | |
import android.text.TextUtils; | |
import android.util.AttributeSet; | |
import android.widget.TextView; | |
import java.lang.reflect.Field; | |
public class MarqueeToolbar extends Toolbar { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ScrollingTextView extends TextView { | |
public ScrollingTextView(Context context, AttributeSet attrs, | |
int defStyle) { | |
super(context, attrs, defStyle); | |
} | |
public ScrollingTextView(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2014 Chris Banes | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CircularProgressDrawable extends Drawable | |
implements Animatable { | |
private static final Interpolator ANGLE_INTERPOLATOR = new LinearInterpolator(); | |
private static final Interpolator SWEEP_INTERPOLATOR = new DecelerateInterpolator(); | |
private static final int ANGLE_ANIMATOR_DURATION = 2000; | |
private static final int SWEEP_ANIMATOR_DURATION = 600; | |
private static final int MIN_SWEEP_ANGLE = 30; | |
private final RectF fBounds = new RectF(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Canvas; | |
import android.graphics.Rect; | |
import android.graphics.drawable.Drawable; | |
import android.support.v7.widget.LinearLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.AttributeSet; | |
import android.view.View; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<color name="red_50">#fde0dc</color> | |
<color name="red_100">#f9bdbb</color> | |
<color name="red_200">#f69988</color> | |
<color name="red_300">#f36c60</color> | |
<color name="red_400">#e84e40</color> | |
<color name="red_500">#e51c23</color> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ParallaxPageTransformer implements ViewPager.PageTransformer { | |
public void transformPage(View view, float position) { | |
int pageWidth = view.getWidth(); | |
if (position < -1) { // [-Infinity,-1) | |
// This page is way off-screen to the left. | |
view.setAlpha(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void transformPage(View view, float position) { | |
int pageWidth = view.getWidth(); | |
if (position < -1) { // [-Infinity,-1) | |
// This page is way off-screen to the left. | |
view.setAlpha(0); | |
} else if (position <= 1) { // [-1,1] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.iiinews.widget; | |
import java.lang.reflect.Method; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import android.annotation.SuppressLint; | |
import android.content.Context; | |
import android.content.res.Resources; |
OlderNewer