Skip to content

Instantly share code, notes, and snippets.

@marinat
Created October 20, 2017 11:18
Show Gist options
  • Save marinat/5b277310ea20c750c420ccab69f7b524 to your computer and use it in GitHub Desktop.
Save marinat/5b277310ea20c750c420ccab69f7b524 to your computer and use it in GitHub Desktop.
public class FirstRunWizardFragment extends NoklFragment {
public static final String TAG = "com.nokl.androidclient.firstrunwizard";
public static FirstRunWizardFragment newInstance() {
return new FirstRunWizardFragment();
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.first_run_wizard, container, false);
}
@OnClick(R.id.login)
public void loginClicked(View view) {
((CredentialsActivity) getActivity()).openLoginFragment();
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/logo_container"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="center"
android:layout_weight="1"
android:background="@color/primary"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/img_conn_logo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:contentDescription="@string/image"
android:src="@drawable/nokl" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="@color/accent">
<Button
android:id="@+id/login"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/cred_acc_btn"
android:text="@string/sign_in_up_case"
android:textColor="@color/white" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="@color/primary">
<Button
android:id="@+id/register"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/cred_empty_btn"
android:text="@string/sign_up_up_case"
android:textColor="@color/white" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment