Home | History | Annotate | Download | only in cardstream

Lines Matching refs:Card

36  * A Card contains a description and has a visual state. Optionally a card also contains a title,
39 public class Card {
53 // The card model contains a reference to its desired layout (for extensibility), title,
55 private int mLayoutId = R.layout.card;
58 * Tag that uniquely identifies this card.
83 * Represent actions that can be taken from the card. Stylistically the developer can
86 * @see com.example.android.sensors.batchstepsensor.Card.CardAction
92 * from its "parent" card. To push for simplicity in samples, Cards are designed to have
93 * a maximum of one progress indicator per Card.
97 public Card() {
109 public Card setDescription(String desc) {
117 public Card setTitle(String title) {
139 * @return The card itself, allows for chaining of calls
141 public Card setState(int state) {
178 * The progress type can only be changed if the Card was initially build with a progress
185 * @return The card itself, allows for chaining of calls
187 public Card setProgressType(int progressType) {
209 * Set the progress to the specified value. Only applicable if the card has a
215 public Card setProgress(int progress) {
223 * Set the range of the progress to 0...max. Only applicable if the card has a
227 public Card setMaxProgress(int max){
235 * Set the label text for the progress if the card has a progress type of
241 public Card setProgressLabel(String text) {
249 * Toggle the visibility of the progress section of the card. Only applicable if
250 * the card has a progress type of
256 public Card setProgressVisibility(boolean isVisible) {
258 return this; // Card does not have progress
266 * Adds an action to this card during build time.
281 * Toggles the visibility of a card action.
286 public Card setActionVisibility(int actionId, boolean isVisible) {
297 * Toggles visibility of the action area of this Card through an animation.
301 public Card setActionAreaVisibility(boolean isVisible) {
303 return this; // Card does not have an action area
331 * Creates a shallow clone of the card. Shallow means all values are present, but no views.
335 * @return A shallow clone of the card instance
337 public Card createShallowClone() {
338 Card cloneCard = new Card();
340 // Outer card values
362 * Prepare the card to be stored for configuration change.
374 * Creates a new {@link #Card}.
377 private Card mCard;
382 * @param card
383 * @see Card#createShallowClone()
385 protected Builder(OnCardClickListener listener, Card card) {
386 mCard = card;
391 * Instantiate the builder with the tag of the card.
396 mCard = new Card();
432 * @see R.layout.card
449 * of the card.</li>
483 public Card build(Activity activity) {
485 // Inflating the card.
523 * Initialize data from the given card.
524 * @param card
526 * @see Card#createShallowClone()
528 public Builder cloneFromCard(Card card) {
529 mCard = card.createShallowClone();
548 // Inflate all card actions
553 case Card.ACTION_POSITIVE:
556 case Card.ACTION_NEGATIVE:
559 case Card.ACTION_NEUTRAL:
589 //Setup progress card.
605 * Represents a clickable action, accessible from the bottom of the card.
629 * Describes the progress of a {@link Card}.
631 * <ul><li>{@link Card#PROGRESS_TYPE_NORMAL: Standard progress bar with label text</li>
632 * <li>{@link Card#PROGRESS_TYPE_INDETERMINATE}: Indeterminate progress bar with label txt</li>
633 * <li>{@link Card#PROGRESS_TYPE_LABEL}: Label only, no progresss bar</li>
637 private int progressType = Card.PROGRESS_TYPE_NO_PROGRESS;
697 * <ul><li>{@link Card#PROGRESS_TYPE_NORMAL: Standard progress bar with label text</li>
698 * <li>{@link Card#PROGRESS_TYPE_INDETERMINATE}:
700 * <li>{@link Card#PROGRESS_TYPE_LABEL}: Label only, no progresss bar</li>