Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c7788c18
authored
Feb 12, 2019
by
olly
Committed by
Andrew Lewis
Feb 18, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix / cleanup some layout in the Cast demo
PiperOrigin-RevId: 233587404
parent
5782bbc6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
16 deletions
demos/cast/src/main/java/com/google/android/exoplayer2/castdemo/MainActivity.java
demos/cast/src/main/res/layout/cast_context_error_message_layout.xml → demos/cast/src/main/res/layout/cast_context_error.xml
demos/cast/src/main/res/layout/main_activity.xml
demos/cast/src/main/res/layout/sample_list.xml
demos/cast/src/main/java/com/google/android/exoplayer2/castdemo/MainActivity.java
View file @
c7788c18
...
@@ -76,7 +76,7 @@ public class MainActivity extends AppCompatActivity
...
@@ -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
();
...
...
demos/cast/src/main/res/layout/cast_context_error
_message_layout
.xml
→
demos/cast/src/main/res/layout/cast_context_error.xml
View file @
c7788c18
...
@@ -13,17 +13,10 @@
...
@@ -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>
demos/cast/src/main/res/layout/main_activity.xml
View file @
c7788c18
...
@@ -19,20 +19,25 @@
...
@@ -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 @@
...
@@ -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>
demos/cast/src/main/res/layout/sample_list.xml
View file @
c7788c18
...
@@ -14,7 +14,7 @@
...
@@ -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_cont
ent"
android:layout_width=
"
match_par
ent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
>
<ListView
android:id=
"@+id/sample_list"
<ListView
android:id=
"@+id/sample_list"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment