Permalink
Browse files

Add new star drawable.

  • Loading branch information...
1 parent 9bd9040 commit ccee5eda73df9419d5ca99e90f4457c2cef41ec4 @johannilsson committed Jul 22, 2012
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
+<!-- Copyright (C) 2011 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,38 +15,35 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
-
- <!-- Enabled states -->
-
- <item android:state_checked="true" android:state_window_focused="false"
- android:state_enabled="true"
- android:drawable="@android:drawable/star_big_on" />
- <item android:state_checked="false" android:state_window_focused="false"
- android:state_enabled="true"
- android:drawable="@android:drawable/star_big_off" />
-
- <!-- Pressed -->
+ <item android:state_checked="false" android:state_window_focused="false"
+ android:drawable="@drawable/btn_star_off_normal_holo_dark" />
+ <item android:state_checked="true" android:state_window_focused="false"
+ android:drawable="@drawable/btn_star_on_normal_holo_dark" />
+ <item android:state_checked="true" android:state_window_focused="false"
+ android:state_enabled="false" android:drawable="@drawable/btn_star_on_disabled_holo_dark" />
+ <item android:state_checked="false" android:state_window_focused="false"
+ android:state_enabled="false" android:drawable="@drawable/btn_star_off_disabled_holo_dark" />
+
<item android:state_checked="true" android:state_pressed="true"
- android:state_enabled="true"
- android:drawable="@android:drawable/star_big_on" />
+ android:drawable="@drawable/btn_star_on_pressed_holo_dark" />
<item android:state_checked="false" android:state_pressed="true"
- android:state_enabled="true"
- android:drawable="@android:drawable/star_big_off" />
+ android:drawable="@drawable/btn_star_off_pressed_holo_dark" />
- <!-- Selected -->
<item android:state_checked="true" android:state_focused="true"
- android:state_enabled="true"
- android:drawable="@android:drawable/star_big_on" />
+ android:drawable="@drawable/btn_star_on_focused_holo_dark" />
<item android:state_checked="false" android:state_focused="true"
- android:state_enabled="true"
- android:drawable="@android:drawable/star_big_off" />
-
- <item android:state_checked="false"
- android:state_enabled="true"
- android:drawable="@android:drawable/star_big_off" />
- <item android:state_checked="true"
- android:state_enabled="true"
- android:drawable="@android:drawable/star_big_on" />
-
-
+ android:drawable="@drawable/btn_star_off_focused_holo_dark" />
+
+ <item android:state_checked="true" android:state_focused="true" android:state_enabled="false"
+ android:drawable="@drawable/btn_star_on_disabled_focused_holo_dark" />
+ <item android:state_checked="true" android:state_focused="false" android:state_enabled="false"
+ android:drawable="@drawable/btn_star_on_disabled_holo_dark" />
+
+ <item android:state_checked="false" android:state_focused="true" android:state_enabled="false"
+ android:drawable="@drawable/btn_star_off_disabled_focused_holo_dark" />
+ <item android:state_checked="false" android:state_focused="false" android:state_enabled="false"
+ android:drawable="@drawable/btn_star_off_disabled_holo_dark" />
+
+ <item android:state_checked="false" android:drawable="@drawable/btn_star_off_normal_holo_dark" />
+ <item android:state_checked="true" android:drawable="@drawable/btn_star_on_normal_holo_dark" />
</selector>
@@ -126,7 +126,7 @@
</TableLayout>
<ImageButton
android:id="@+id/route_favorite"
- android:src="@android:drawable/star_big_off"
+ android:src="@drawable/btn_star_off_normal_holo_dark"
android:background="@android:color/transparent"
android:layout_gravity="right|center_vertical"
android:layout_width="wrap_content"
@@ -181,7 +181,7 @@ protected void onCreate(Bundle savedInstanceState) {
mFavoriteButton = (ImageButton) findViewById(R.id.route_favorite);
if (isStarredJourney(mJourneyQuery)) {
- mFavoriteButton.setImageResource(android.R.drawable.star_big_on);
+ mFavoriteButton.setImageResource(R.drawable.btn_star_on_normal_holo_dark);
}
mFavoriteButton.setOnClickListener(new OnStarredJourneyButtonClickListener());
@@ -650,7 +650,7 @@ public void onClick(View v) {
getContentResolver().update(
uri, values, where, selectionArgs);
mFavoriteButton.setImageResource(
- android.R.drawable.star_big_off);
+ R.drawable.btn_star_off_normal_holo_dark);
} else {
values.put(Journeys.STARRED, "1");
int affectedRows = getContentResolver().update(
@@ -661,7 +661,7 @@ public void onClick(View v) {
Journeys.CONTENT_URI, values);
}
mFavoriteButton.setImageResource(
- android.R.drawable.star_big_on);
+ R.drawable.btn_star_on_normal_holo_dark);
}
}
}
@@ -730,9 +730,9 @@ public void onSearchRoutesResult(Planner.Response response) {
}
if (isStarredJourney(mJourneyQuery)) {
- mFavoriteButton.setImageResource(android.R.drawable.star_big_on);
+ mFavoriteButton.setImageResource(R.drawable.btn_star_on_normal_holo_dark);
} else {
- mFavoriteButton.setImageResource(android.R.drawable.star_big_off);
+ mFavoriteButton.setImageResource(R.drawable.btn_star_off_normal_holo_dark);
}
}
@@ -1580,7 +1580,7 @@ public void onClick(View v) {
getContentResolver().update(
uri, values, where, selectionArgs);
mFavoriteButton.setImageResource(
- android.R.drawable.star_big_off);
+ R.drawable.btn_star_off_normal_holo_dark);
} else {
values.put(Journeys.STARRED, "1");
int affectedRows = getContentResolver().update(
@@ -1590,7 +1590,7 @@ public void onClick(View v) {
Journeys.CONTENT_URI, values);
}
mFavoriteButton.setImageResource(
- android.R.drawable.star_big_on);
+ R.drawable.btn_star_on_normal_holo_dark);
}
}
}

0 comments on commit ccee5ed

Please sign in to comment.