1 /* 2 * Copyright (C) 2011 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.mms.ui; 18 19 import android.widget.ImageView; 20 21 public interface Divot { 22 23 // Distance, in dips, from the corner of the image to the start of the divot. 24 // Used for non-middle positions. For middle positions this distance is basically 25 // to the middle of edge. 26 static final float CORNER_OFFSET = 12F; 27 static final float WIDTH = 6F; 28 static final float HEIGHT = 16F; 29 30 // Where to draw the divot. LEFT_UPPER, for example, means the upper edge but to the 31 // left. TOP_RIGHT means the right edge but to the top. 32 public static final int LEFT_UPPER = 1; 33 public static final int LEFT_MIDDLE = 2; 34 public static final int LEFT_LOWER = 3; 35 36 public static final int RIGHT_UPPER = 4; 37 public static final int RIGHT_MIDDLE = 5; 38 public static final int RIGHT_LOWER = 6; 39 40 public static final int TOP_LEFT = 7; 41 public static final int TOP_MIDDLE = 8; 42 public static final int TOP_RIGHT = 9; 43 44 public static final int BOTTOM_LEFT = 10; 45 public static final int BOTTOM_MIDDLE = 11; 46 public static final int BOTTOM_RIGHT = 12; 47 48 static final String [] sPositionChoices = new String [] { 49 "", 50 "left_upper", 51 "left_middle", 52 "left_lower", 53 54 "right_upper", 55 "right_middle", 56 "right_lower", 57 58 "top_left", 59 "top_middle", 60 "top_right", 61 62 "bottom_left", 63 "bottom_middle", 64 "bottom_right", 65 }; 66 setPosition(int position)67 public void setPosition(int position); getPosition()68 public int getPosition(); 69 getCloseOffset()70 public float getCloseOffset(); getFarOffset()71 public float getFarOffset(); 72 asImageView()73 public ImageView asImageView(); assignContactFromEmail(String emailAddress)74 public void assignContactFromEmail(String emailAddress); 75 } 76