diff options
author | Parménides GV <parmegv@sdf.org> | 2014-03-10 20:01:47 +0100 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2014-03-10 20:01:47 +0100 |
commit | c9918258ffd14ea3c3b9a936ba8a01add946920c (patch) | |
tree | 57700955ae54a19fcad8342bb67397712dce69c7 /src | |
parent | b600226787227883b62ef0fecb2a56d82ba58e0b (diff) |
A bit more clean and concise.
I've added "from providerlistfragment" just in case there is any other "top padding" string suitable in other class in the future.
I've removed the auxiliar variable in the block of code from ProviderListFragment, there is no need of if now we have a constant in that class.
Diffstat (limited to 'src')
-rw-r--r-- | src/se/leap/bitmaskclient/ProviderListFragment.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/se/leap/bitmaskclient/ProviderListFragment.java b/src/se/leap/bitmaskclient/ProviderListFragment.java index df39b86d..f35cf739 100644 --- a/src/se/leap/bitmaskclient/ProviderListFragment.java +++ b/src/se/leap/bitmaskclient/ProviderListFragment.java @@ -39,7 +39,7 @@ public class ProviderListFragment extends ListFragment { public static String TAG = "provider_list_fragment";
public static String SHOW_ALL_PROVIDERS = "show_all_providers";
- public static String TOP_PADDING = "top padding";
+ public static String TOP_PADDING = "top padding from providerlistfragment";
private ProviderListAdapter<ProviderItem> content_adapter;
/**
@@ -120,9 +120,8 @@ public class ProviderListFragment extends ListFragment { && savedInstanceState.containsKey(STATE_ACTIVATED_POSITION)) {
setActivatedPosition(savedInstanceState.getInt(STATE_ACTIVATED_POSITION));
}
- String top_padding_key = TOP_PADDING;
- if(getArguments() != null && getArguments().containsKey(top_padding_key)) {
- int topPadding = getArguments().getInt(top_padding_key);
+ if(getArguments() != null && getArguments().containsKey(TOP_PADDING)) {
+ int topPadding = getArguments().getInt(TOP_PADDING);
View current_view = getView();
getView().setPadding(current_view.getPaddingLeft(), topPadding, current_view.getPaddingRight(), current_view.getPaddingBottom());
}
|