I have a solution, I don't know if it's the best one, but it's something to offer.
I've built xml file with a single button in it, inflate it and add it to the TabWidget, this seems to work.
settings_button.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<Button
android:id="@+id/settingsButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/settings" >
</Button>
</LinearLayout>
MyActivity.java
TabWidget tabWidget = (TabWidget)findViewById(android.R.id.tabs);
View layout = LayoutInflater.from(this).inflate(R.layout.settings_button, null);
Button button = (Button)layout.findViewById(R.id.settingsButton);
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
LogWrapper.d(TAG, "*****************************************************");
startActivity(new Intent(MyActivity.this, SettingsActivity.class));
}
});
layout.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
tabWidget.addView(layout);
Anyway, this is my solution offer. After checking it, it doesn't look good a button in the TabWidget. I'll think what to do with it.