This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
android:padding="16dp" | |
tools:context="com.ayusch.blogexamples.view.MainActivity"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.widget.Button; | |
import android.widget.EditText; | |
import android.widget.TextView; | |
import com.ayusch.blogexamples.model.AppPrefs; | |
import com.ayusch.blogexamples.R; | |
import com.jakewharton.rxbinding2.widget.RxTextView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.widget.Button; | |
import android.widget.EditText; | |
import android.widget.TextView; | |
import com.ayusch.blogexamples.model.AppPrefs; | |
import com.ayusch.blogexamples.R; | |
import com.jakewharton.rxbinding2.widget.RxTextView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean isValidForm(String name, String password) { | |
boolean validName = !name.isEmpty(); | |
if (!validName) { | |
et_name.setError("Please enter valid name"); | |
} | |
boolean validPass = !password.isEmpty() && password.equals(AppPrefs.getPassword()); | |
if (!validPass) { | |
et_password.setError("Incorrect password"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
observable.subscribe(new DisposableObserver<Boolean>() { | |
@Override | |
public void onNext(Boolean aBoolean) { | |
updateButton(aBoolean); | |
} | |
@Override | |
public void onError(Throwable e) { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.widget.Button; | |
import android.widget.EditText; | |
import android.widget.TextView; | |
import com.ayusch.blogexamples.model.AppPrefs; | |
import com.ayusch.blogexamples.R; | |
import com.jakewharton.rxbinding2.widget.RxTextView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
implementation 'com.google.ar.sceneform.ux:sceneform-ux:1.9.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<uses-permission android:name="android.permission.CAMERA" /> | |
<uses-permission android:name="android.permission.INTERNET"/> | |
<uses-feature android:name="android.hardware.camera.ar" android:required="true"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta-data | |
android:name="com.google.ar.core" | |
android:value="required" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".HelloSceneformActivity"> | |
<fragment android:name="com.google.ar.sceneform.ux.ArFragment" | |
android:id="@+id/ux_fragment" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" /> |
OlderNewer