mirror of
https://github.com/androidx/media.git
synced 2025-05-03 21:57:46 +08:00
Fix / cleanup some layout in the Cast demo
PiperOrigin-RevId: 233587404
This commit is contained in:
parent
5782bbc6e5
commit
c7788c18db
@ -76,7 +76,7 @@ public class MainActivity extends AppCompatActivity
|
|||||||
Throwable cause = e.getCause();
|
Throwable cause = e.getCause();
|
||||||
while (cause != null) {
|
while (cause != null) {
|
||||||
if (cause instanceof DynamiteModule.LoadingException) {
|
if (cause instanceof DynamiteModule.LoadingException) {
|
||||||
setContentView(R.layout.cast_context_error_message_layout);
|
setContentView(R.layout.cast_context_error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cause = cause.getCause();
|
cause = cause.getCause();
|
||||||
|
@ -13,17 +13,10 @@
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView"
|
android:id="@+id/textView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:textSize="20sp"
|
||||||
android:text="@string/cast_context_error"/>
|
android:text="@string/cast_context_error"/>
|
||||||
</LinearLayout>
|
|
@ -19,20 +19,25 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:keepScreenOn="true">
|
android:keepScreenOn="true">
|
||||||
|
|
||||||
<com.google.android.exoplayer2.ui.PlayerView android:id="@+id/local_player_view"
|
<com.google.android.exoplayer2.ui.PlayerView android:id="@+id/local_player_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="12"
|
android:layout_weight="1"
|
||||||
|
android:background="@android:color/black"
|
||||||
app:repeat_toggle_modes="all|one"/>
|
app:repeat_toggle_modes="all|one"/>
|
||||||
|
|
||||||
<RelativeLayout android:layout_width="match_parent"
|
<RelativeLayout android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="12">
|
android:layout_weight="1">
|
||||||
|
|
||||||
<android.support.v7.widget.RecyclerView android:id="@+id/sample_list"
|
<android.support.v7.widget.RecyclerView android:id="@+id/sample_list"
|
||||||
android:choiceMode="singleChoice"
|
android:choiceMode="singleChoice"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scrollbars="vertical"
|
android:scrollbars="vertical"
|
||||||
android:fadeScrollbars="false"/>
|
android:fadeScrollbars="false"/>
|
||||||
|
|
||||||
<ImageButton android:id="@+id/add_sample_button"
|
<ImageButton android:id="@+id/add_sample_button"
|
||||||
android:background="@drawable/ic_add_circle_white_24dp"
|
android:background="@drawable/ic_add_circle_white_24dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -42,12 +47,14 @@
|
|||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:padding="30dp"
|
android:padding="30dp"
|
||||||
android:contentDescription="@string/add_samples"/>
|
android:contentDescription="@string/add_samples"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<com.google.android.exoplayer2.ui.PlayerControlView android:id="@+id/cast_control_view"
|
<com.google.android.exoplayer2.ui.PlayerControlView android:id="@+id/cast_control_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="2"
|
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:repeat_toggle_modes="all|one"
|
app:repeat_toggle_modes="all|one"
|
||||||
app:show_timeout="-1"/>
|
app:show_timeout="-1"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<ListView android:id="@+id/sample_list"
|
<ListView android:id="@+id/sample_list"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user