Loading tests/ActivityViewTest/AndroidManifest.xml +5 −0 Original line number Diff line number Diff line Loading @@ -57,5 +57,10 @@ android:exported="true" android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|colorMode|density"> </activity> <activity android:name=".ActivityViewVisibilityActivity" android:label="AV Visibility" android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|colorMode|density"> </activity> </application> </manifest> tests/ActivityViewTest/res/layout/activity_view_main_activity.xml +6 −0 Original line number Diff line number Diff line Loading @@ -41,4 +41,10 @@ android:text="Test Resize ActivityView" android:textAllCaps="false"/> <Button android:id="@+id/visibility_activity_view_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Test ActivityView Visibility" android:textAllCaps="false"/> </LinearLayout> tests/ActivityViewTest/res/layout/activity_view_visibility_activity.xml 0 → 100644 +46 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2019 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#cfd8dc"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <Button android:id="@+id/activity_launch_button" android:layout_width="200dp" android:layout_height="wrap_content" android:text="Launch test activity" /> <Spinner android:id="@+id/visibility_spinner" android:layout_width="200dp" android:layout_height="match_parent"/> </LinearLayout> <ActivityView android:id="@+id/activity_view" android:layout_width="match_parent" android:layout_height="match_parent" /> </LinearLayout> tests/ActivityViewTest/src/com/google/android/test/activityview/ActivityViewMainActivity.java +3 −0 Original line number Diff line number Diff line Loading @@ -35,5 +35,8 @@ public class ActivityViewMainActivity extends Activity { findViewById(R.id.resize_activity_view_button).setOnClickListener( v -> startActivity(new Intent(this, ActivityViewResizeActivity.class))); findViewById(R.id.visibility_activity_view_button).setOnClickListener( v -> startActivity(new Intent(this, ActivityViewVisibilityActivity.class))); } } tests/ActivityViewTest/src/com/google/android/test/activityview/ActivityViewTestActivity.java +3 −0 Original line number Diff line number Diff line Loading @@ -24,12 +24,14 @@ import static android.view.MotionEvent.ACTION_UP; import android.app.Activity; import android.content.res.Configuration; import android.os.Bundle; import android.util.Log; import android.view.MotionEvent; import android.view.View; import android.view.ViewTreeObserver; import android.widget.TextView; public class ActivityViewTestActivity extends Activity { private static final String TAG = "ActivityViewTestActivity"; private View mRoot; private TextView mTextView; Loading Loading @@ -84,6 +86,7 @@ public class ActivityViewTestActivity extends Activity { } private void updateStateText(String state) { Log.d(TAG, state); mTextView.setText(state); } Loading Loading
tests/ActivityViewTest/AndroidManifest.xml +5 −0 Original line number Diff line number Diff line Loading @@ -57,5 +57,10 @@ android:exported="true" android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|colorMode|density"> </activity> <activity android:name=".ActivityViewVisibilityActivity" android:label="AV Visibility" android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|colorMode|density"> </activity> </application> </manifest>
tests/ActivityViewTest/res/layout/activity_view_main_activity.xml +6 −0 Original line number Diff line number Diff line Loading @@ -41,4 +41,10 @@ android:text="Test Resize ActivityView" android:textAllCaps="false"/> <Button android:id="@+id/visibility_activity_view_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Test ActivityView Visibility" android:textAllCaps="false"/> </LinearLayout>
tests/ActivityViewTest/res/layout/activity_view_visibility_activity.xml 0 → 100644 +46 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2019 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#cfd8dc"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <Button android:id="@+id/activity_launch_button" android:layout_width="200dp" android:layout_height="wrap_content" android:text="Launch test activity" /> <Spinner android:id="@+id/visibility_spinner" android:layout_width="200dp" android:layout_height="match_parent"/> </LinearLayout> <ActivityView android:id="@+id/activity_view" android:layout_width="match_parent" android:layout_height="match_parent" /> </LinearLayout>
tests/ActivityViewTest/src/com/google/android/test/activityview/ActivityViewMainActivity.java +3 −0 Original line number Diff line number Diff line Loading @@ -35,5 +35,8 @@ public class ActivityViewMainActivity extends Activity { findViewById(R.id.resize_activity_view_button).setOnClickListener( v -> startActivity(new Intent(this, ActivityViewResizeActivity.class))); findViewById(R.id.visibility_activity_view_button).setOnClickListener( v -> startActivity(new Intent(this, ActivityViewVisibilityActivity.class))); } }
tests/ActivityViewTest/src/com/google/android/test/activityview/ActivityViewTestActivity.java +3 −0 Original line number Diff line number Diff line Loading @@ -24,12 +24,14 @@ import static android.view.MotionEvent.ACTION_UP; import android.app.Activity; import android.content.res.Configuration; import android.os.Bundle; import android.util.Log; import android.view.MotionEvent; import android.view.View; import android.view.ViewTreeObserver; import android.widget.TextView; public class ActivityViewTestActivity extends Activity { private static final String TAG = "ActivityViewTestActivity"; private View mRoot; private TextView mTextView; Loading Loading @@ -84,6 +86,7 @@ public class ActivityViewTestActivity extends Activity { } private void updateStateText(String state) { Log.d(TAG, state); mTextView.setText(state); } Loading