[Android] Add some padding around the home button
Ludovic Fauvet
git at videolan.org
Fri Aug 17 18:53:02 CEST 2012
vlc-ports/android | branch: master | Ludovic Fauvet <etix at videolan.org> | Fri Aug 17 16:11:19 2012 +0200| [f68f0494afd4a35e73d731d045f658522ee3ed09] | committer: Ludovic Fauvet
Add some padding around the home button
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=f68f0494afd4a35e73d731d045f658522ee3ed09
---
vlc-android/src/org/videolan/vlc/gui/MainActivity.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index d35b5c4..f224b8b 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -64,6 +64,7 @@ import android.widget.AdapterView.OnItemClickListener;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
+import android.widget.ImageView;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView;
@@ -162,6 +163,12 @@ public class MainActivity extends SherlockFragmentActivity {
mActionBar.setDisplayOptions(0, ActionBar.DISPLAY_SHOW_TITLE);
mActionBar.setDisplayHomeAsUpEnabled(true);
+ /* Add padding between the home button and the arrow */
+ ImageView home = (ImageView)findViewById(Util.isHoneycombOrLater()
+ ? android.R.id.home : R.id.abs__home);
+ if (home != null)
+ home.setPadding(20, 0, 0, 0);
+
/* Set up the sidebar click listener */
listView.setOnItemClickListener(new OnItemClickListener() {
More information about the Android
mailing list