If you want your widget to be able to focus on individual views inside it you need those views be clickable and focusable AND have background/or images to support state. Nice example of such drawable in Jeff's Sky widget.
<?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2009 Jeff Sharkey, http://jsharkey.org/ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_window_focused="false" android:drawable="@drawable/widget_bg_normal" /> <item android:state_pressed="true" android:drawable="@drawable/widget_bg_pressed" /> <item android:state_focused="true" android:drawable="@drawable/widget_bg_selected" /> <item android:drawable="@drawable/widget_bg_normal" /> </selector>
Good design is innovative.
Good design makes a product useful.
Good design is aesthetic.
Good design makes a product understandable.
Good design is unobtrusive.
Good design is honest.
Good design is long-lasting.
Good design is thorough down to the last detail.
Good design is environmentally friendly.
Good design is as little design as possible.
Copyright Dieter Rams, amended March 2003 and October 2009
Hey i got iPhone ! Step away from that "unfollow" button twitter friends. Here is the story.
I needed to scroll the list ( ExpandableListView to be exact ) to position.I found this thread where Romain Guy said it got fixed in Froyo. And it is. There is a smoothscrollToPosition in SDK8 and up. As i needed to go lower than 8 here is mine workaround. If anybody knows better way let me know
class ScrollList extends Thread {
final int position = mListView.getFlatListPosition(ExpandableListView
.getPackedPositionForGroup(mListAdapter.getTestGroupPosition()));
View itemView = mListView.getChildAt(position);
int yPos = itemView.getTop();
public void run() {
while (yPos >= 20) {
try {
yPos -= 5;
sleep(20);
mListView.post(new Runnable() {
public void run() {
mListView.setSelectionFromTop(position, yPos);
}
});
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
};
It seems to me, to work in the startup and make it successful you need dedicate all the time you have to this goal. It's fun then you're single, no house ( mobile ) and have tons of free time. Now if you add little bit of age and couple of kids to the mix i wonder if it's too late. As much as like code, i probably prefer spend sometime with kids. Which by itself is a job, very rewarding, but hard job. So finding time is a challenge. Plus if i do have an hour or so - i'd rather go for a ride. And then other stuff like : last week i wanted to look at the project that seems to be interesting and i can feel my evenings helping out. Result :
Last night, my kids and I were sitting in the living room and I said to them, 'I never want to live in a vegetative state, dependent on some machine and fluids from a bottle. If that ever happens, just pull the plug.'
They got up, unplugged the mac, and threw out my beer.
On May 11th i wrote small blog entry about changes i've noticed around android UI in the apps created by google. Apparently it was a good timing. Because on May 12th , android team posted in their blog "Twitter for android : closer look at android's evolving UI patterns" which was followed by google io session Android UI design patterns . Key word here is evolving. If you put it through bs translator it means - hey guys we screwed up but willing to improve.
For a record, i like twitter app look and google I/O app look. I've met with some UI folks at IO and i think that they are excellent. And the fact that they fixing things is great. However ( this is that big fancy BUT usually follows by "it sucks" ) it shows clearly where google is different from apple. It clear now that Google is company of engineers that building exciting things from technical stand point and Apple is all about design and building beautiful things. If Apple UX team would come to Jobs after pretty much year and a half and said "Um.. you know how we told you we have a good design for iPhone ? Well, we don't and need to change that. A lot." i'm pretty sure that different people will be changing that. In fact it could be happening at google as well, as Google hired Palm lead UI person .
Now things are not just inferior to iPhone, they confusing. For app designers, who want's to follow platform best practices, for developers who implement those things and for end users, who end up with bunch of apps that not using same patterns though platform. Some apps look like iPhone, some like old android, some like new , and some look just like crap . Even after using new twitter for a month, i still press menu in search for refresh. I still expect that if i do long-press something is gonna happen. Basically current state of UI - is a mess. I really hope that Matias going to fix it and soon. With something that will be able to last longer than a year. To be fair the crappy apps part is applied to iPhone as well. It's not UI problem. You want good UI - first two people on the team should be Product Designer and Artist.
if you want great people, you need to be run by ideas, not by hierarchy, otherwise good people won't stay.
Lately i've notice that android apps created by google use different UI patterns from the "standard" look that we know since 1.0.
25px boring grey title, listviews with black backgrounds, shadows here and there, gradients. Here are, two very simple app to illustrate the look.


From 2.0 i started notice change in direction - first was change of icons from angled shadow look to a flat beauty. Now i think it's a part of bigger picture. Let's take a look at three apps created by google. Google IO, Twitter and Facebook. I took two screen shots of each app.
What they have in common:1) Each app have a launcher page from which you select your further action.
2) Standard title is gone and replaced by large title with some actions on it. No or very little gradient and very flat look. I want to say almost the look that MS showed on WP7 demo, but i like this one little bit better.
3) Software search button migrated it's way to the title bar. Which make me think that we should expect devices with no hardware search button and we need to start prepare for it.
4) In two apps refresh made it's way to the title bar as well. "Put most important functions to the title bar" ?
5) Not on the screen shots, but tabs lost gradients as well and now flat.
6) Widget is basically the same.
Overall i really like the new look - small concern that custom title makes standard android title in the shape it's now completely useless.