diff --git a/app/src/main/java/net/xcreen/restsms/MainActivity.kt b/app/src/main/java/net/xcreen/restsms/MainActivity.kt index ac8be6c..97b81a6 100644 --- a/app/src/main/java/net/xcreen/restsms/MainActivity.kt +++ b/app/src/main/java/net/xcreen/restsms/MainActivity.kt @@ -54,7 +54,7 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte //Set Home Fragment val fragmentTransaction = supportFragmentManager.beginTransaction() try { - val homeFragment: Fragment = HomeFragment::class.java.newInstance() + val homeFragment: Fragment = HomeFragment::class.java.getDeclaredConstructor().newInstance() fragmentTransaction.replace(R.id.main_framelayout, homeFragment).commit() } catch (ex: Exception) { ex.printStackTrace() diff --git a/app/src/main/java/net/xcreen/restsms/fragments/SettingsFragment.kt b/app/src/main/java/net/xcreen/restsms/fragments/SettingsFragment.kt index d7e9f0e..c7e26b1 100644 --- a/app/src/main/java/net/xcreen/restsms/fragments/SettingsFragment.kt +++ b/app/src/main/java/net/xcreen/restsms/fragments/SettingsFragment.kt @@ -24,6 +24,7 @@ class SettingsFragment : Fragment() { val openBrowserCheckBox = rootView.findViewById(R.id.settings_open_browser_checkbox) val disableLoggingCheckBox = rootView.findViewById(R.id.settings_disable_logging_checkbox) val enableAuth = rootView.findViewById(R.id.settings_enable_auth) + val enableNSD = rootView.findViewById(R.id.settings_enable_nsd) val saveBtn = rootView.findViewById