Home | History | Annotate | Download | only in ui
      1 // Copyright 2011 Google Inc.
      2 // All Rights Reserved.
      3 
      4 package com.android.mms.ui;
      5 
      6 import android.widget.ImageView;
      7 
      8 public interface Divot {
      9 
     10     // Distance, in dips, from the corner of the image to the start of the divot.
     11     // Used for non-middle positions.  For middle positions this distance is basically
     12     // to the middle of edge.
     13     static final float CORNER_OFFSET = 12F;
     14     static final float WIDTH = 6F;
     15     static final float HEIGHT = 16F;
     16 
     17     // Where to draw the divot.  LEFT_UPPER, for example, means the upper edge but to the
     18     // left.  TOP_RIGHT means the right edge but to the top.
     19     public static final int LEFT_UPPER = 1;
     20     public static final int LEFT_MIDDLE = 2;
     21     public static final int LEFT_LOWER = 3;
     22 
     23     public static final int RIGHT_UPPER = 4;
     24     public static final int RIGHT_MIDDLE = 5;
     25     public static final int RIGHT_LOWER = 6;
     26 
     27     public static final int TOP_LEFT = 7;
     28     public static final int TOP_MIDDLE = 8;
     29     public static final int TOP_RIGHT = 9;
     30 
     31     public static final int BOTTOM_LEFT = 10;
     32     public static final int BOTTOM_MIDDLE = 11;
     33     public static final int BOTTOM_RIGHT = 12;
     34 
     35     static final String [] sPositionChoices = new String [] {
     36         "",
     37         "left_upper",
     38         "left_middle",
     39         "left_lower",
     40 
     41         "right_upper",
     42         "right_middle",
     43         "right_lower",
     44 
     45         "top_left",
     46         "top_middle",
     47         "top_right",
     48 
     49         "bottom_left",
     50         "bottom_middle",
     51         "bottom_right",
     52     };
     53 
     54     public void setPosition(int position);
     55     public int getPosition();
     56 
     57     public float getCloseOffset();
     58     public float getFarOffset();
     59 
     60     public ImageView asImageView();
     61     public void assignContactFromEmail(String emailAddress);
     62 }
     63