1 package com.koushikdutta.superuser;
3 import android.content.Context;
4 import android.os.Bundle;
5 import android.view.ContextThemeWrapper;
6 import android.view.LayoutInflater;
7 import android.view.View;
8 import android.view.ViewGroup;
10 import com.koushikdutta.widgets.NativeFragment;
12 public class PolicyNativeFragment extends NativeFragment<PolicyFragmentInternal> {
13 ContextThemeWrapper mWrapper;
14 public Context getContext(Context ctx) {
17 mWrapper = new ContextThemeWrapper(ctx, R.style.SuperuserDark);
22 public PolicyFragmentInternal createFragmentInterface() {
23 return new PolicyFragmentInternal(this) {
25 public Context getContext() {
26 return PolicyNativeFragment.this.getContext(super.getContext());
30 protected int getListFragmentResource() {
31 return R.layout.policy_list_content;
35 protected void setPadding() {
36 getListView().setPadding(0, 0, 0, 0);
37 getContainer().setPadding(0, 0, 0, 0);
43 public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
44 return super.onCreateView((LayoutInflater)getContext(inflater.getContext()).getSystemService(Context.LAYOUT_INFLATER_SERVICE), container, savedInstanceState);