Search in sources :

Example 1 with HomeFragment

use of com.netbyte.vtunnel.fragment.HomeFragment in project vTunnel by net-byte.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
    StrictMode.setThreadPolicy(policy);
    setContentView(R.layout.activity_main);
    NavigationBarView navigationView = findViewById(R.id.navigation_menu);
    navigationView.setOnItemSelectedListener(selectedListener);
    HomeFragment fragment = new HomeFragment();
    FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
    fragmentTransaction.replace(R.id.content, fragment, "");
    fragmentTransaction.commit();
}
Also used : StrictMode(android.os.StrictMode) NavigationBarView(com.google.android.material.navigation.NavigationBarView) FragmentTransaction(androidx.fragment.app.FragmentTransaction) HomeFragment(com.netbyte.vtunnel.fragment.HomeFragment)

Aggregations

StrictMode (android.os.StrictMode)1 FragmentTransaction (androidx.fragment.app.FragmentTransaction)1 NavigationBarView (com.google.android.material.navigation.NavigationBarView)1 HomeFragment (com.netbyte.vtunnel.fragment.HomeFragment)1