Removed some stuff that took up extra space, made the icon thing work well.

pull/14/head
Tim Su 14 years ago
parent 4f61c9b5a4
commit 8bb4e95530

@ -78,7 +78,6 @@
</activity>
<!-- Activity that creates or edits tasks -->
<activity android:name="com.todoroo.astrid.activity.TaskEditActivity"
android:icon="@drawable/icon_add"
android:label="@string/taskEdit_label">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

@ -38,22 +38,22 @@ import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.View.OnCreateContextMenuListener;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.AdapterView.OnItemClickListener;
import com.flurry.android.FlurryAgent;
import com.timsu.astrid.R;
@ -405,7 +405,7 @@ public class TagListSubActivity extends SubActivity {
createShortcutIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, label);
createShortcutIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON,
((BitmapDrawable)r.getDrawable(R.drawable.icon_tag)).getBitmap());
((BitmapDrawable)r.getDrawable(R.drawable.icon_blank)).getBitmap());
createShortcutIntent.setAction("com.android.launcher.action.INSTALL_SHORTCUT"); //$NON-NLS-1$
getParent().sendBroadcast(createShortcutIntent);

@ -24,6 +24,7 @@ import android.view.View;
import android.widget.EditText;
import android.widget.ExpandableListView;
import android.widget.ExpandableListView.ExpandableListContextMenuInfo;
import android.widget.FrameLayout;
import android.widget.Toast;
import com.flurry.android.FlurryAgent;
@ -299,21 +300,19 @@ public class FilterListActivity extends ExpandableListActivity {
* @param label
*/
private void createShortcut(Filter filter, Intent shortcutIntent, String label) {
Bitmap bitmap;
if(filter.listingIcon == null)
bitmap = ((BitmapDrawable) getResources().getDrawable(
R.drawable.icon_tag)).getBitmap();
else {
// create icon by superimposing astrid w/ icon
bitmap = ((BitmapDrawable) getResources().getDrawable(
R.drawable.icon)).getBitmap();
bitmap = bitmap.copy(bitmap.getConfig(), true);
Canvas canvas = new Canvas(bitmap);
/*canvas.drawBitmap(filter.listingIcon, bitmap.getWidth() -
filter.listingIcon.getWidth(), bitmap.getHeight() -
filter.listingIcon.getHeight(), null);*/
canvas.save();
}
Bitmap emblem = filter.listingIcon;
if(emblem == null)
emblem = ((BitmapDrawable) getResources().getDrawable(
R.drawable.filter_tags1)).getBitmap();
// create icon by superimposing astrid w/ icon
Bitmap bitmap = ((BitmapDrawable) getResources().getDrawable(
R.drawable.icon_blank)).getBitmap();
bitmap = bitmap.copy(bitmap.getConfig(), true);
Canvas canvas = new Canvas(bitmap);
canvas.drawBitmap(emblem, Math.max(0, bitmap.getWidth() -
emblem.getWidth()), Math.max(0, bitmap.getHeight() -
emblem.getHeight()), null);
Intent createShortcutIntent = new Intent();
createShortcutIntent.putExtra(
Intent.EXTRA_SHORTCUT_INTENT,
@ -353,13 +352,18 @@ public class FilterListActivity extends ExpandableListActivity {
final Intent shortcutIntent = item.getIntent();
final Filter filter = (Filter)info.targetView.getTag();
FrameLayout frameLayout = new FrameLayout(this);
frameLayout.setPadding(10, 0, 10, 0);
final EditText editText = new EditText(this);
editText.setText(filter.listingTitle);
frameLayout.addView(editText, new FrameLayout.LayoutParams(
FrameLayout.LayoutParams.FILL_PARENT,
FrameLayout.LayoutParams.WRAP_CONTENT));
new AlertDialog.Builder(this)
.setTitle(R.string.FLA_shortcut_dialog_title)
.setMessage(R.string.FLA_shortcut_dialog)
.setView(editText)
.setView(frameLayout)
.setIcon(android.R.drawable.ic_dialog_info)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {

Loading…
Cancel
Save