am 9f058749: am 61aebb0a: Merge "Update suggestions strip divider" into ics-mr0

* commit '9f058749f2e8bf9194034d273535c960fe811161':
  Update suggestions strip divider
main
Tadashi G. Takaoka 2011-10-19 18:13:27 -07:00 committed by Android Git Automerger
commit f08c697313
28 changed files with 9 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1012 B

After

Width:  |  Height:  |  Size: 73 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 951 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 846 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 843 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 671 B

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 480 B

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 795 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1020 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 880 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 673 B

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 619 B

After

Width:  |  Height:  |  Size: 870 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 623 B

After

Width:  |  Height:  |  Size: 940 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 547 B

After

Width:  |  Height:  |  Size: 850 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 B

After

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 589 B

After

Width:  |  Height:  |  Size: 801 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 695 B

After

Width:  |  Height:  |  Size: 843 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 619 B

After

Width:  |  Height:  |  Size: 784 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 909 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 523 B

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -324,6 +324,13 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
return Color.argb(newAlpha, Color.red(color), Color.green(color), Color.blue(color)); return Color.argb(newAlpha, Color.red(color), Color.green(color), Color.blue(color));
} }
private static void addDivider(final ViewGroup stripView, final View divider) {
stripView.addView(divider);
final LinearLayout.LayoutParams params =
(LinearLayout.LayoutParams)divider.getLayoutParams();
params.gravity = Gravity.CENTER;
}
public void layout(SuggestedWords suggestions, ViewGroup stripView, ViewGroup placer, public void layout(SuggestedWords suggestions, ViewGroup stripView, ViewGroup placer,
int stripWidth) { int stripWidth) {
if (suggestions.isPunctuationSuggestions()) { if (suggestions.isPunctuationSuggestions()) {
@ -341,7 +348,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
if (index != 0) { if (index != 0) {
final View divider = mDividers.get(pos); final View divider = mDividers.get(pos);
// Add divider if this isn't the left most suggestion in suggestions strip. // Add divider if this isn't the left most suggestion in suggestions strip.
stripView.addView(divider); addDivider(stripView, divider);
x += divider.getMeasuredWidth(); x += divider.getMeasuredWidth();
} }
@ -421,7 +428,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
for (int index = 0; index < countInStrip; index++) { for (int index = 0; index < countInStrip; index++) {
if (index != 0) { if (index != 0) {
// Add divider if this isn't the left most suggestion in suggestions strip. // Add divider if this isn't the left most suggestion in suggestions strip.
stripView.addView(mDividers.get(index)); addDivider(stripView, mDividers.get(index));
} }
final TextView word = mWords.get(index); final TextView word = mWords.get(index);