Skip to content

Instantly share code, notes, and snippets.

@worstkiller
Last active September 3, 2017 11:22
Show Gist options
  • Save worstkiller/e00d7ddef7d03d5ab9000eab93857cf3 to your computer and use it in GitHub Desktop.
Save worstkiller/e00d7ddef7d03d5ab9000eab93857cf3 to your computer and use it in GitHub Desktop.
Passwordless authentication androidbuffer.com
import android.app.Fragment;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
if (savedInstanceState != null) {
//do nothing here for now
} else {
openFragment(SmsSendFragment.getInstance());
}
}
private void openFragment(Fragment fragment) {
//here open the fragment
getFragmentManager().beginTransaction().replace(R.id.frameLayoutContainer, fragment).commit();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment