Swichted all Fragments to a fragments-package

This commit is contained in:
Xcreen
2018-10-09 13:26:01 +02:00
parent 1c062649d7
commit 613f29fe26
14 changed files with 31 additions and 13 deletions

View File

@@ -4,6 +4,6 @@ import android.app.Application;
public class AppContext extends Application {
SMSServer smsServer = new SMSServer();
public SMSServer smsServer = new SMSServer();
}

View File

@@ -12,6 +12,10 @@ import androidx.fragment.app.FragmentTransaction;
import android.view.MenuItem;
import net.xcreen.restsms.fragments.AboutFragment;
import net.xcreen.restsms.fragments.HomeFragment;
import net.xcreen.restsms.fragments.SettingsFragment;
import org.slf4j.impl.SimpleLogger;
public class MainActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener {

View File

@@ -1,4 +1,4 @@
package net.xcreen.restsms;
package net.xcreen.restsms.fragments;
import android.Manifest;
import android.content.Context;
@@ -16,6 +16,9 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import net.xcreen.restsms.BuildConfig;
import net.xcreen.restsms.R;
public class AboutAppFragment extends Fragment {
@Override

View File

@@ -1,4 +1,4 @@
package net.xcreen.restsms;
package net.xcreen.restsms.fragments;
import androidx.appcompat.widget.LinearLayoutCompat;
import androidx.fragment.app.Fragment;
@@ -14,6 +14,8 @@ import android.view.ViewGroup;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.tabs.TabLayout;
import net.xcreen.restsms.R;
public class AboutFragment extends Fragment {
private TabLayout tabLayout;

View File

@@ -1,4 +1,4 @@
package net.xcreen.restsms;
package net.xcreen.restsms.fragments;
import android.net.Uri;
import android.os.Bundle;
@@ -11,6 +11,8 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import net.xcreen.restsms.R;
public class AboutMeFragment extends Fragment {

View File

@@ -1,4 +1,4 @@
package net.xcreen.restsms;
package net.xcreen.restsms.fragments;
import android.content.Context;
import android.net.Uri;
@@ -15,6 +15,8 @@ import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
import net.xcreen.restsms.R;
import java.util.ArrayList;
public class AboutThirdPartyLibrarysFragment extends Fragment {

View File

@@ -1,4 +1,4 @@
package net.xcreen.restsms;
package net.xcreen.restsms.fragments;
import androidx.core.app.ActivityCompat;
import androidx.fragment.app.Fragment;
@@ -19,6 +19,9 @@ import android.view.ViewGroup;
import android.widget.Button;
import android.widget.Toast;
import net.xcreen.restsms.AppContext;
import net.xcreen.restsms.R;
import java.net.BindException;
public class HomeFragment extends Fragment {

View File

@@ -1,4 +1,4 @@
package net.xcreen.restsms;
package net.xcreen.restsms.fragments;
import androidx.fragment.app.Fragment;
@@ -13,6 +13,8 @@ import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.Toast;
import net.xcreen.restsms.R;
public class SettingsFragment extends Fragment {
@Override

View File

@@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".AboutFragment">
tools:context=".fragments.AboutFragment">
<androidx.viewpager.widget.ViewPager
android:id="@+id/about_view_pager"

View File

@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".AboutAppFragment">
tools:context=".fragments.AboutAppFragment">
<ScrollView
android:layout_width="match_parent"

View File

@@ -5,7 +5,7 @@
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:padding="@dimen/fragment_padding"
tools:context=".AboutMeFragment">
tools:context=".fragments.AboutMeFragment">
<ScrollView
android:layout_width="match_parent"

View File

@@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".AboutThirdPartyLibrarysFragment">
tools:context=".fragments.AboutThirdPartyLibrarysFragment">
<ListView
android:id="@+id/about_third_party_list_view"

View File

@@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/fragment_padding"
tools:context=".HomeFragment">
tools:context=".fragments.HomeFragment">
<ScrollView
android:layout_width="match_parent"

View File

@@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/fragment_padding"
tools:context=".SettingsFragment">
tools:context=".fragments.SettingsFragment">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"