Home | History | Annotate | Download | only in cardstream

Lines Matching refs:Card

39  * A Card contains a description and has a visual state. Optionally a card also contains a title,
42 public class Card {
56 // The card model contains a reference to its desired layout (for extensibility), title,
58 private int mLayoutId = R.layout.card;
61 * Tag that uniquely identifies this card.
86 * Represent actions that can be taken from the card. Stylistically the developer can
89 * @see com.example.android.sensors.batchstepsensor.Card.CardAction
95 * from its "parent" card. To push for simplicity in samples, Cards are designed to have
96 * a maximum of one progress indicator per Card.
100 public Card() {
112 public Card setDescription(String desc) {
120 public Card setTitle(String title) {
142 * @return The card itself, allows for chaining of calls
144 public Card setState(int state) {
181 * The progress type can only be changed if the Card was initially build with a progress
188 * @return The card itself, allows for chaining of calls
190 public Card setProgressType(int progressType) {
212 * Set the progress to the specified value. Only applicable if the card has a
218 public Card setProgress(int progress) {
226 * Set the range of the progress to 0...max. Only applicable if the card has a
230 public Card setMaxProgress(int max){
238 * Set the label text for the progress if the card has a progress type of
244 public Card setProgressLabel(String text) {
252 * Toggle the visibility of the progress section of the card. Only applicable if
253 * the card has a progress type of
259 public Card setProgressVisibility(boolean isVisible) {
261 return this; // Card does not have progress
269 * Adds an action to this card during build time.
284 * Toggles the visibility of a card action.
289 public Card setActionVisibility(int actionId, boolean isVisible) {
300 * Toggles visibility of the action area of this Card through an animation.
304 public Card setActionAreaVisibility(boolean isVisible) {
306 return this; // Card does not have an action area
334 * Creates a shallow clone of the card. Shallow means all values are present, but no views.
338 * @return A shallow clone of the card instance
340 public Card createShallowClone() {
341 Card cloneCard = new Card();
343 // Outer card values
365 * Prepare the card to be stored for configuration change.
377 * Creates a new {@link #Card}.
380 private Card mCard;
385 * @param card
386 * @see Card#createShallowClone()
388 protected Builder(OnCardClickListener listener, Card card) {
389 mCard = card;
394 * Instantiate the builder with the tag of the card.
399 mCard = new Card();
435 * @see R.layout.card
452 * of the card.</li>
486 public Card build(Activity activity) {
488 // Inflating the card.
526 * Initialize data from the given card.
527 * @param card
529 * @see Card#createShallowClone()
531 public Builder cloneFromCard(Card card) {
532 mCard = card.createShallowClone();
551 // Inflate all card actions
556 case Card.ACTION_POSITIVE:
559 case Card.ACTION_NEGATIVE:
562 case Card.ACTION_NEUTRAL:
592 //Setup progress card.
608 * Represents a clickable action, accessible from the bottom of the card.
632 * Describes the progress of a {@link Card}.
634 * <ul><li>{@link Card#PROGRESS_TYPE_NORMAL: Standard progress bar with label text</li>
635 * <li>{@link Card#PROGRESS_TYPE_INDETERMINATE}: Indeterminate progress bar with label txt</li>
636 * <li>{@link Card#PROGRESS_TYPE_LABEL}: Label only, no progresss bar</li>
640 private int progressType = Card.PROGRESS_TYPE_NO_PROGRESS;
700 * <ul><li>{@link Card#PROGRESS_TYPE_NORMAL: Standard progress bar with label text</li>
701 * <li>{@link Card#PROGRESS_TYPE_INDETERMINATE}:
703 * <li>{@link Card#PROGRESS_TYPE_LABEL}: Label only, no progresss bar</li>