From 88e4636e88d46a0282985db864ee74054083f92b Mon Sep 17 00:00:00 2001 From: vanitasvitae Date: Sun, 2 Oct 2016 13:36:57 +0200 Subject: [PATCH] Removed test Fragments and old SplashActivity related stuff --- .../activity/MainActivity.java | 26 +------------ .../fragment/TestFragment.java | 39 ------------------- app/src/main/res/layout/splash__activity.xml | 37 ------------------ app/src/main/res/layout/test__fragment.xml | 11 ------ app/src/main/res/menu/main__menu_bottom.xml | 7 ---- 5 files changed, 2 insertions(+), 118 deletions(-) delete mode 100644 app/src/main/java/com/github/dfa/diaspora_android/fragment/TestFragment.java delete mode 100644 app/src/main/res/layout/splash__activity.xml delete mode 100644 app/src/main/res/layout/test__fragment.xml diff --git a/app/src/main/java/com/github/dfa/diaspora_android/activity/MainActivity.java b/app/src/main/java/com/github/dfa/diaspora_android/activity/MainActivity.java index b5d040c8..80ae786f 100644 --- a/app/src/main/java/com/github/dfa/diaspora_android/activity/MainActivity.java +++ b/app/src/main/java/com/github/dfa/diaspora_android/activity/MainActivity.java @@ -25,7 +25,6 @@ import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.PackageManager; -import android.content.res.Configuration; import android.graphics.drawable.LayerDrawable; import android.net.Uri; import android.os.Bundle; @@ -67,7 +66,6 @@ import com.github.dfa.diaspora_android.fragment.CustomFragment; import com.github.dfa.diaspora_android.fragment.DiasporaStreamFragment; import com.github.dfa.diaspora_android.fragment.HashtagListFragment; import com.github.dfa.diaspora_android.fragment.PodSelectionFragment; -import com.github.dfa.diaspora_android.fragment.TestFragment; import com.github.dfa.diaspora_android.listener.WebUserProfileChangedListener; import com.github.dfa.diaspora_android.receiver.OpenExternalLinkReceiver; import com.github.dfa.diaspora_android.receiver.UpdateTitleReceiver; @@ -75,7 +73,6 @@ import com.github.dfa.diaspora_android.ui.BadgeDrawable; import com.github.dfa.diaspora_android.util.AppLog; import com.github.dfa.diaspora_android.util.CustomTabHelpers.CustomTabActivityHelper; import com.github.dfa.diaspora_android.util.DiasporaUrlHelper; -import com.github.dfa.diaspora_android.util.Helpers; import com.github.dfa.diaspora_android.util.WebHelper; import butterknife.BindView; @@ -273,13 +270,10 @@ public class MainActivity extends AppCompatActivity PodSelectionFragment psf = new PodSelectionFragment(); fm.beginTransaction().add(psf, fragmentTag).commit(); return psf; - case TestFragment.TAG: default: AppLog.e(this,"Invalid Fragment Tag: "+fragmentTag +"\nAdd Fragments Tag to getFragment()'s switch case."); - TestFragment tf = new TestFragment(); - fm.beginTransaction().add(tf, fragmentTag).commit(); - return tf; + return getTopFragment(); } } } @@ -592,11 +586,6 @@ public class MainActivity extends AppCompatActivity return true; } - case R.id.action_debug_button: { - showFragment(getFragment(TestFragment.TAG)); - return true; - } - case R.id.action_compose: { if (WebHelper.isOnline(MainActivity.this)) { openDiasporaUrl(urls.getNewPostUrl()); @@ -736,13 +725,12 @@ public class MainActivity extends AppCompatActivity } } - //TODO: Implement? + //TODO: Implement some day private void handleSendImage(Intent intent) { AppLog.i(this, "handleSendImage()"); final Uri imageUri = intent.getParcelableExtra(Intent.EXTRA_STREAM); if (imageUri != null) { AppLog.v(this, "imageUri is not null. Handle shared image"); - // TODO: Update UI to reflect text being shared } else { AppLog.w(this, "imageUri is null. Cannot precede."); } @@ -800,17 +788,7 @@ public class MainActivity extends AppCompatActivity } break; - //TODO: Replace with fragment case R.id.nav_followed_tags: { - /*DiasporaStreamFragment stream = (DiasporaStreamFragment) getFragment(DiasporaStreamFragment.TAG); - if (WebHelper.isOnline(MainActivity.this)) { - openDiasporaUrl(urls.getBlankUrl()); - WebHelper.showFollowedTagsList(stream.getWebView(), app); - setTitle(R.string.nav_followed_tags); - } else { - snackbarNoInternet.show(); - } - */ showFragment(getFragment(HashtagListFragment.TAG)); } break; diff --git a/app/src/main/java/com/github/dfa/diaspora_android/fragment/TestFragment.java b/app/src/main/java/com/github/dfa/diaspora_android/fragment/TestFragment.java deleted file mode 100644 index c8d5a861..00000000 --- a/app/src/main/java/com/github/dfa/diaspora_android/fragment/TestFragment.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.github.dfa.diaspora_android.fragment; - -import android.os.Bundle; -import android.view.LayoutInflater; -import android.view.Menu; -import android.view.MenuInflater; -import android.view.View; -import android.view.ViewGroup; - -import com.github.dfa.diaspora_android.R; -import com.github.dfa.diaspora_android.util.AppLog; - -/** - * Created by vanitas on 23.09.16. - */ - -public class TestFragment extends CustomFragment { - - public static final String TAG = "com.github.dfa.diaspora_android.TestFragment"; - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - AppLog.d(this, "onCreateView()"); - return inflater.inflate(R.layout.test__fragment, container, false); - } - - @Override - public String getFragmentTag() { - return TAG; - } - - @Override - public void onCreateBottomOptionsMenu(Menu menu, MenuInflater inflater) { - } - - @Override - public boolean onBackPressed() { - return false; - } -} diff --git a/app/src/main/res/layout/splash__activity.xml b/app/src/main/res/layout/splash__activity.xml deleted file mode 100644 index 5b6d5df3..00000000 --- a/app/src/main/res/layout/splash__activity.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - diff --git a/app/src/main/res/layout/test__fragment.xml b/app/src/main/res/layout/test__fragment.xml deleted file mode 100644 index 7ce8d12a..00000000 --- a/app/src/main/res/layout/test__fragment.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/menu/main__menu_bottom.xml b/app/src/main/res/menu/main__menu_bottom.xml index 063957cf..0c973856 100644 --- a/app/src/main/res/menu/main__menu_bottom.xml +++ b/app/src/main/res/menu/main__menu_bottom.xml @@ -35,11 +35,4 @@ android:title="@string/action_exit_app" /> - -