t/oxr_android: Rename activity and add version field

This commit is contained in:
Ryan Pavlik 2020-11-02 09:24:06 -06:00
parent 1c98297aa0
commit ed519b1601
3 changed files with 17 additions and 6 deletions

View file

@ -35,7 +35,7 @@
android:supportsRtl="true"
android:theme="@style/AppTheme">
<!-- Main "about" activity -->
<activity android:name=".MainActivity">
<activity android:name=".AboutActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />

View file

@ -19,12 +19,12 @@ import androidx.fragment.app.FragmentTransaction;
import com.mikepenz.aboutlibraries.LibsBuilder;
public class MainActivity extends AppCompatActivity {
public class AboutActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
setContentView(R.layout.activity_about);
// Make our Monado link clickable
((TextView) findViewById(R.id.textPowered)).setMovementMethod(LinkMovementMethod.getInstance());

View file

@ -8,7 +8,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
tools:context=".AboutActivity">
<ImageView
android:id="@+id/imageView"
@ -44,14 +44,14 @@
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView" />
app:layout_constraintTop_toBottomOf="@+id/textView2" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="imageView,textView,textPowered"
app:constraint_referenced_ids="imageView,textPowered,textView"
tools:layout_editor_absoluteY="252dp" />
<FrameLayout
@ -87,4 +87,15 @@
android:visibility="gone" />
</FrameLayout>
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/monado_lib_version"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView" />
</androidx.constraintlayout.widget.ConstraintLayout>