-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e2aed79
commit e6e68e6
Showing
38 changed files
with
901 additions
and
22 deletions.
There are no files selected for viewing
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
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
51 changes: 51 additions & 0 deletions
51
Demo/app/src/main/java/com/tencent/liteav/demo/WebViewActivity.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package com.tencent.liteav.demo; | ||
|
||
import android.app.Activity; | ||
import android.graphics.Color; | ||
import android.os.Build; | ||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
import android.text.TextUtils; | ||
import android.view.View; | ||
import android.view.Window; | ||
import android.view.WindowManager; | ||
import android.webkit.WebView; | ||
import android.widget.TextView; | ||
|
||
public class WebViewActivity extends Activity { | ||
|
||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.app_activity_webview); | ||
String url = getIntent().getStringExtra("url"); | ||
String title = getIntent().getStringExtra("title"); | ||
WebView webView = findViewById(R.id.web_view); | ||
TextView tvTitle = findViewById(R.id.tv_title); | ||
if (!TextUtils.isEmpty(url)) { | ||
webView.loadUrl(url); | ||
} | ||
if (!TextUtils.isEmpty(title)) { | ||
tvTitle.setText(title); | ||
} | ||
findViewById(R.id.iv_back).setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
onBackPressed(); | ||
} | ||
}); | ||
} | ||
|
||
private void initStatusBar() { | ||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { | ||
Window window = getWindow(); | ||
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); | ||
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | ||
| View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); | ||
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); | ||
window.setStatusBarColor(Color.TRANSPARENT); | ||
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { | ||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); | ||
} | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
Demo/app/src/main/java/com/tencent/liteav/demo/common/widget/AvatarConstant.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.tencent.liteav.demo.common.widget; | ||
|
||
public interface AvatarConstant { | ||
String USER_AVATAR_ARRAY [] = { | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar1.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar2.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar3.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar4.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar5.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar6.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar7.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar8.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar9.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar10.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar11.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar12.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar13.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar14.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar15.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar16.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar17.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar18.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar19.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar20.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar21.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar22.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar23.png", | ||
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar24.png", | ||
}; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval"> | ||
<stroke android:color="#006EFF" android:width="3dp" /> | ||
</shape> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<solid android:color="@color/app_color_white" /> | ||
<corners android:radius="12dp" /> | ||
</shape> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
<solid android:color="@color/app_color_white" /> | ||
<corners android:topLeftRadius="20dp" android:topRightRadius="20dp"/> | ||
</shape> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
<solid android:color="#F4F5F9" /> | ||
<corners android:radius="26dp" /> | ||
</shape> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<solid android:color="@color/app_color_white" /> | ||
<corners android:topLeftRadius="25dp" android:topRightRadius="25dp" /> | ||
</shape> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
xmlns:toos="http://schemas.android.com/tools" | ||
android:background="@drawable/app_content_bg"> | ||
|
||
<TextView | ||
android:id="@+id/main_title" | ||
android:layout_width="wrap_content" | ||
android:layout_height="42dp" | ||
android:layout_marginTop="28dp" | ||
android:gravity="center" | ||
android:text="@string/app_about" | ||
android:textColor="@color/app_color_white" | ||
android:textSize="18sp" | ||
android:textStyle="bold" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
app:layout_constraintRight_toRightOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<ImageView | ||
android:id="@+id/iv_back" | ||
android:layout_marginLeft="17dp" | ||
android:layout_width="18dp" | ||
android:layout_height="18dp" | ||
android:background="@drawable/app_ic_back_white" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
app:layout_constraintBottom_toBottomOf="@id/main_title" | ||
app:layout_constraintTop_toTopOf="@id/main_title" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_sdk_version_title" | ||
android:layout_width="match_parent" | ||
android:layout_height="55dp" | ||
android:layout_marginTop="20dp" | ||
android:layout_marginLeft="20dp" | ||
android:gravity="center_vertical" | ||
android:text="@string/app_sdk_version" | ||
android:textColor="@color/app_color_input_normal" | ||
android:textSize="16sp" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
app:layout_constraintRight_toRightOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/main_title"/> | ||
|
||
<TextView | ||
android:id="@+id/tv_sdk_version" | ||
android:layout_marginRight="20dp" | ||
android:layout_width="wrap_content" | ||
android:layout_height="56dp" | ||
android:layout_marginTop="20dp" | ||
android:layout_marginLeft="20dp" | ||
android:gravity="center_vertical" | ||
android:textColor="@color/app_color_input_normal" | ||
android:textSize="16sp" | ||
toos:text="Ver 3.0.1.1" | ||
app:layout_constraintRight_toRightOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/main_title"/> | ||
|
||
<View | ||
android:layout_marginLeft="20dp" | ||
android:layout_marginRight="20dp" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/tv_sdk_version_title" | ||
android:background="@color/app_color_tab_normal" | ||
android:layout_width="match_parent" | ||
android:layout_height="1dp" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_app_version_title" | ||
android:layout_width="match_parent" | ||
android:layout_height="55dp" | ||
android:layout_marginTop="20dp" | ||
android:layout_marginLeft="20dp" | ||
android:gravity="center_vertical" | ||
android:text="@string/app_version" | ||
android:textColor="@color/app_color_input_normal" | ||
android:textSize="16sp" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
app:layout_constraintRight_toRightOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/tv_sdk_version"/> | ||
|
||
<TextView | ||
android:id="@+id/tv_app_version" | ||
android:layout_marginRight="20dp" | ||
android:layout_width="wrap_content" | ||
android:layout_height="56dp" | ||
android:layout_marginTop="20dp" | ||
android:layout_marginLeft="20dp" | ||
android:gravity="center_vertical" | ||
android:textColor="@color/app_color_input_normal" | ||
android:textSize="16sp" | ||
toos:text="Ver 3.0.1.1" | ||
app:layout_constraintRight_toRightOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/tv_sdk_version"/> | ||
|
||
<View | ||
android:layout_marginLeft="20dp" | ||
android:layout_marginRight="20dp" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/tv_app_version_title" | ||
android:background="@color/app_color_tab_normal" | ||
android:layout_width="match_parent" | ||
android:layout_height="1dp" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_app_logout" | ||
android:layout_width="match_parent" | ||
android:layout_height="55dp" | ||
android:layout_marginLeft="20dp" | ||
android:layout_marginTop="20dp" | ||
android:gravity="center_vertical" | ||
android:text="@string/app_logoff_account_title" | ||
android:textColor="@color/app_color_input_normal" | ||
android:textSize="16sp" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/tv_app_version" /> | ||
|
||
<ImageView | ||
android:layout_width="16dp" | ||
android:layout_height="16dp" | ||
android:layout_marginRight="20dp" | ||
android:src="@drawable/app_ic_details" | ||
app:layout_constraintBottom_toBottomOf="@id/tv_app_logout" | ||
app:layout_constraintRight_toRightOf="parent" | ||
app:layout_constraintTop_toTopOf="@id/tv_app_logout"/> | ||
|
||
<View | ||
android:layout_marginLeft="20dp" | ||
android:layout_marginRight="20dp" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/tv_app_logout" | ||
android:background="@color/app_color_tab_normal" | ||
android:layout_width="match_parent" | ||
android:layout_height="1dp" /> | ||
|
||
</android.support.constraint.ConstraintLayout> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<android.support.constraint.ConstraintLayout 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:background="@drawable/app_content_bg"> | ||
|
||
<TextView | ||
android:id="@+id/main_title" | ||
android:layout_width="wrap_content" | ||
android:layout_height="42dp" | ||
android:layout_marginTop="28dp" | ||
android:gravity="center" | ||
android:text="@string/app_logoff_account_title" | ||
android:textColor="@color/app_color_white" | ||
android:textSize="18sp" | ||
android:textStyle="bold" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
app:layout_constraintRight_toRightOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<ImageView | ||
android:id="@+id/iv_back" | ||
android:layout_width="18dp" | ||
android:layout_height="18dp" | ||
android:layout_marginLeft="17dp" | ||
android:background="@drawable/app_ic_back_white" | ||
app:layout_constraintBottom_toBottomOf="@id/main_title" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
app:layout_constraintTop_toTopOf="@id/main_title" /> | ||
|
||
<ImageView | ||
android:id="@+id/img_app_logoff" | ||
android:layout_width="150dp" | ||
android:layout_height="120dp" | ||
android:layout_marginTop="100dp" | ||
android:src="@drawable/app_logoff" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintHorizontal_bias="0.5" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/main_title" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_app_logout" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="20dp" | ||
android:paddingLeft="12dp" | ||
android:paddingRight="12dp" | ||
android:gravity="center_horizontal" | ||
android:text="@string/app_logoff_hint" | ||
android:textColor="@color/app_color_input_normal" | ||
android:textSize="16sp" | ||
app:layout_constraintTop_toBottomOf="@id/img_app_logoff" /> | ||
|
||
<TextView | ||
android:id="@+id/tv_account" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="15dp" | ||
android:gravity="center_vertical" | ||
android:text="@string/app_logoff_cur_account" | ||
android:textColor="@color/app_color_tab_normal" | ||
android:textSize="16sp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintHorizontal_bias="0.5" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/tv_app_logout" /> | ||
|
||
<Button | ||
android:id="@+id/btn_logoff" | ||
android:layout_width="325dp" | ||
android:layout_height="50dp" | ||
android:layout_marginTop="20dp" | ||
android:background="@color/app_color_tab_select" | ||
android:gravity="center" | ||
android:text="@string/app_logoff_btn_text" | ||
android:textColor="@color/app_color_white" | ||
android:textSize="20sp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintHorizontal_bias="0.5" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/tv_account" /> | ||
|
||
</android.support.constraint.ConstraintLayout> |
Oops, something went wrong.