add holo triangle back

This commit is contained in:
Andrew Dolgov 2013-05-18 13:19:16 +04:00
parent 148e67b200
commit c1b41d9de8
9 changed files with 59 additions and 8 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

View File

@ -120,6 +120,15 @@
android:clickable="true" android:clickable="true"
android:src="@drawable/ic_rss_bw" /> android:src="@drawable/ic_rss_bw" />
<ImageButton
android:id="@+id/article_menu_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:background="@null"
android:paddingLeft="6dp"
android:paddingTop="6dp"
android:src="@drawable/ic_mailbox_collapsed_holo_light" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@ -120,6 +120,16 @@
android:layout_weight="0" android:layout_weight="0"
android:clickable="true" android:clickable="true"
android:src="@drawable/ic_rss_bw" /> android:src="@drawable/ic_rss_bw" />
<ImageButton
android:id="@+id/article_menu_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:background="@null"
android:paddingLeft="6dp"
android:paddingTop="6dp"
android:src="@drawable/ic_mailbox_collapsed_holo_light" />
</LinearLayout> </LinearLayout>

View File

@ -121,6 +121,15 @@
android:clickable="true" android:clickable="true"
android:src="@drawable/ic_rss_bw" /> android:src="@drawable/ic_rss_bw" />
<ImageButton
android:id="@+id/article_menu_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:background="@null"
android:paddingLeft="6dp"
android:paddingTop="6dp"
android:src="@drawable/ic_mailbox_collapsed_holo_light" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@ -119,9 +119,19 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0" android:layout_weight="0"
android:clickable="true" android:clickable="true"
android:src="@drawable/ic_rss_bw" /> android:src="@drawable/ic_rss_bw" />
<ImageButton
android:id="@+id/article_menu_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:background="@null"
android:paddingLeft="6dp"
android:paddingTop="6dp"
android:src="@drawable/ic_mailbox_collapsed_holo_light" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@ -166,6 +166,13 @@ public class CommonActivity extends SherlockFragmentActivity {
toast.show(); toast.show();
} }
public boolean isDarkTheme() {
String defaultTheme = "THEME_DARK";
return (m_prefs.getString("theme", defaultTheme).equals("THEME_DARK")) ||
m_prefs.getString("theme", defaultTheme).equals("THEME_DARK_GRAY");
}
protected void setAppTheme(SharedPreferences prefs) { protected void setAppTheme(SharedPreferences prefs) {
String defaultTheme = "THEME_DARK"; String defaultTheme = "THEME_DARK";

View File

@ -41,6 +41,7 @@ import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.AdapterView.OnItemClickListener; import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.CheckBox; import android.widget.CheckBox;
import android.widget.ImageButton;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.ListView; import android.widget.ListView;
import android.widget.TextView; import android.widget.TextView;
@ -721,17 +722,19 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
}); });
} }
/* ImageButton ib = (ImageButton) v.findViewById(R.id.article_menu_button); ImageButton ib = (ImageButton) v.findViewById(R.id.article_menu_button);
if (ib != null) { if (ib != null) {
ib.setVisibility(android.os.Build.VERSION.SDK_INT >= 10 ? View.VISIBLE : View.GONE); if (m_activity.isDarkTheme())
ib.setImageResource(R.drawable.ic_mailbox_collapsed_holo_dark);
ib.setOnClickListener(new OnClickListener() { ib.setOnClickListener(new OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
getActivity().openContextMenu(v); getActivity().openContextMenu(v);
} }
}); });
} */ }
return v; return v;
} }

View File

@ -38,6 +38,7 @@ import android.widget.AdapterView;
import android.widget.AdapterView.AdapterContextMenuInfo; import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.AdapterView.OnItemClickListener; import android.widget.AdapterView.OnItemClickListener;
import android.widget.CheckBox; import android.widget.CheckBox;
import android.widget.ImageButton;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.ListView; import android.widget.ListView;
import android.widget.TextView; import android.widget.TextView;
@ -576,18 +577,20 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis
}); });
} }
/* ImageButton ib = (ImageButton) v.findViewById(R.id.article_menu_button); ImageButton ib = (ImageButton) v.findViewById(R.id.article_menu_button);
if (ib != null) { if (ib != null) {
ib.setVisibility(android.os.Build.VERSION.SDK_INT >= 10 ? View.VISIBLE : View.GONE); if (m_activity.isDarkTheme())
ib.setImageResource(R.drawable.ic_mailbox_collapsed_holo_dark);
ib.setOnClickListener(new OnClickListener() { ib.setOnClickListener(new OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
getActivity().openContextMenu(v); getActivity().openContextMenu(v);
} }
}); });
} */ }
return v; return v;
} }