android.support.v4.app.Fragmentandroid.app.Fragment



Project wordpress-mobile/WordPress-Android in file ...dpress.android.ui.themes.ThemePreviewFragment.java (2014-06-09)
@@ -1,7 +1,7 @@
 package org.wordpress.android.ui.themes;
 
 import android.app.Activity;
-import android.support.v4.app.Fragment;
+import android.app.Fragment;
 import android.os.Bundle;
 import android.view.LayoutInflater;
 import android.view.Menu;
@@ -126,7 +126,7 @@ public class ThemePreviewFragment extends Fragment {
         String previewURL = getPreviewURL();
 
         if (previewURL == null || mBlog == null)
-            getActivity().getSupportFragmentManager().beginTransaction().remove(this).commit();
+            getActivity().getFragmentManager().beginTransaction().remove(this).commit();
 
         View view = inflater.inflate(R.layout.webview, container, false);
 
Project k9mail/k-9 in file ...8dcc8/src.com.fsck.k9.view.MessageOpenPgpView.java (2014-06-21)
@@ -6,18 +6,12 @@ import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
 import java.io.UnsupportedEncodingException;
 
-import org.openintents.openpgp.OpenPgpError;
-import org.openintents.openpgp.OpenPgpSignatureResult;
-import org.openintents.openpgp.util.OpenPgpApi;
-import org.openintents.openpgp.util.OpenPgpServiceConnection;
-
 import android.app.Activity;
+import android.app.Fragment;
 import android.app.PendingIntent;
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentSender.SendIntentException;
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentActivity;
 import android.util.AttributeSet;
 import android.util.Log;
 import android.view.View;
@@ -42,6 +36,11 @@ import com.fsck.k9.mail.MessagingException;
 import com.fsck.k9.mail.Part;
 import com.fsck.k9.mail.internet.MimeUtility;
 
+import org.openintents.openpgp.OpenPgpError;
+import org.openintents.openpgp.OpenPgpSignatureResult;
+import org.openintents.openpgp.util.OpenPgpApi;
+import org.openintents.openpgp.util.OpenPgpServiceConnection;
+
 public class MessageOpenPgpView extends LinearLayout {
 
     private Context mContext;
@@ -109,7 +108,7 @@ public class MessageOpenPgpView extends LinearLayout {
             return;
         }
 
-        FragmentActivity activity = mFragment.getActivity();
+        Activity activity = mFragment.getActivity();
         if (activity == null) {
             return;
         }
Project chrisbanes/philm in file ....java.app.philm.in.fragments.SideMenuFragment.java (2014-10-19)
@@ -19,14 +19,13 @@ package app.philm.in.fragments;
 import com.squareup.picasso.Picasso;
 import com.squareup.picasso.Target;
 
+import android.app.Fragment;
 import android.content.res.ColorStateList;
 import android.graphics.Bitmap;
 import android.graphics.Color;
 import android.graphics.LightingColorFilter;
-import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
 import android.os.Bundle;
-import android.support.v4.app.Fragment;
 import android.support.v4.util.ArrayMap;
 import android.view.LayoutInflater;
 import android.view.View;
@@ -218,6 +217,8 @@ public class SideMenuFragment extends Fragment implements MainController.SideMen
 
     private class SideMenuItemAdapter extends BaseAdapter {
 
+        private final LayoutInflater mInflater = LayoutInflater.from(getActivity());
+
         @Override
         public int getCount() {
             return mSideMenuItems != null ? mSideMenuItems.length : 0;
@@ -236,7 +237,7 @@ public class SideMenuFragment extends Fragment implements MainController.SideMen
         @Override
         public View getView(int position, View view, ViewGroup viewGroup) {
             if (view == null) {
-                view = getLayoutInflater(null).inflate(R.layout.item_drawer, viewGroup, false);
+                view = mInflater.inflate(R.layout.item_drawer, viewGroup, false);
             }
 
             final SideMenuItem item = getItem(position);
Project nvanbenschoten/motion in file ...schoten.motion.motion_sample.ParallaxActivity.java (2014-07-05)
@@ -1,10 +1,10 @@
 package com.nvanbenschoten.motion.motion_sample;
 
+import android.app.Activity;
+import android.app.Fragment;
 import android.content.pm.ActivityInfo;
 import android.graphics.BitmapFactory;
 import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.support.v7.app.ActionBarActivity;
 import android.util.TypedValue;
 import android.view.LayoutInflater;
 import android.view.Menu;
@@ -19,14 +19,15 @@ import android.widget.Switch;
 import com.nvanbenschoten.motion.ParallaxImageView;
 
 
-public class ParallaxActivity extends ActionBarActivity {
+public class ParallaxActivity extends Activity {
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_parallax);
+
         if (savedInstanceState == null) {
-            getSupportFragmentManager().beginTransaction()
+            getFragmentManager().beginTransaction()
                     .add(R.id.container, new ParallaxFragment())
                     .commit();
         }
@@ -175,5 +176,7 @@ public class ParallaxActivity extends ActionBarActivity {
                 mBackground.setImageBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.background_rocket_small));
             }
         }
+
     }
+
 }
Project qii/weiciyuan in file ...i.weiciyuan.ui.adapter.AbstractAppListAdapter.java (2012-10-03)
@@ -1,9 +1,9 @@
 package org.qii.weiciyuan.ui.adapter;
 
+import android.app.Activity;
+import android.app.Fragment;
 import android.content.Intent;
 import android.content.res.TypedArray;
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentActivity;
 import android.text.TextPaint;
 import android.text.TextUtils;
 import android.view.LayoutInflater;
@@ -61,7 +61,7 @@ public abstract class AbstractAppListAdapter<T extends ItemBean> extends BaseAda
         checkedBG = ta.getColor(0, 430);
     }
 
-    protected FragmentActivity getActivity() {
+    protected Activity getActivity() {
         return fragment.getActivity();
     }
 
@@ -252,7 +252,7 @@ public abstract class AbstractAppListAdapter<T extends ItemBean> extends BaseAda
             @Override
             public void onClick(View v) {
                 PictureDialogFragment progressFragment = new PictureDialogFragment(msg.getBmiddle_pic(), msg.getOriginal_pic());
-                progressFragment.show(getActivity().getSupportFragmentManager(), "");
+                progressFragment.show(getActivity().getFragmentManager(), "");
             }
         });
     }