Skip to content

Commit

Permalink
native fragment stuff working
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Feb 28, 2013
1 parent b9946dc commit 03393b0
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 14 deletions.
8 changes: 8 additions & 0 deletions Superuser/res/layout-large-land/policy_list_content.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

<include layout="@layout/list_content_large" />

</FrameLayout>
9 changes: 9 additions & 0 deletions Superuser/res/layout-large/policy_list_content.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/list_content_container"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

<include layout="@layout/list_content_small" />

</LinearLayout>
9 changes: 9 additions & 0 deletions Superuser/res/layout/policy_list_content.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/list_content_container"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

<include layout="@layout/list_content_small" />

</LinearLayout>
14 changes: 0 additions & 14 deletions Superuser/src/com/koushikdutta/superuser/PolicyNativeFragment.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.koushikdutta.superuser;

import android.annotation.SuppressLint;
import android.app.Fragment;
import android.content.Context;
import android.os.Bundle;
import android.view.ContextThemeWrapper;
Expand All @@ -20,18 +18,6 @@ public Context getContext(Context ctx) {
return mWrapper;
}

@SuppressLint("NewApi")
@Override
public void onDetach() {
super.onDetach();
System.out.println("ondetach");
Fragment c = getFragmentManager().findFragmentByTag("content");
if (c != null)
getFragmentManager().beginTransaction().remove(c).commit();
else
System.out.println("nothing");
}

@Override
public PolicyFragmentInternal createFragmentInterface() {
return new PolicyFragmentInternal(this) {
Expand Down

0 comments on commit 03393b0

Please sign in to comment.