登录界面修改完成

This commit is contained in:
ningwenqiang 2024-11-01 16:09:59 +08:00
parent aca96cf800
commit e2c4a0e2ae
15 changed files with 169 additions and 108 deletions

View File

@ -132,6 +132,7 @@
android:name="com.shayu.phonelive.activity.LauncherActivity"
android:exported="true"
android:screenOrientation="portrait"
android:theme="@style/AppLunTheme.Theme"
tools:ignore="LockedOrientationActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

View File

@ -131,7 +131,7 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
mBtnSkipVideo = findViewById(R.id.btn_skip_video);
mBtnSkipImage.setOnClickListener(this);
mBtnSkipVideo.setOnClickListener(this);
ImgLoader.display(mContext, R.mipmap.screen, mCover);
// ImgLoader.display(mContext, R.mipmap.screen, mCover);
mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {

View File

@ -9,7 +9,7 @@
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000" />
/>
<FrameLayout
android:id="@+id/btn_skip_img"
@ -53,12 +53,32 @@
android:textColor="@color/white"
android:textSize="11sp"
android:visibility="invisible" />
<ImageView
android:id="@+id/cover"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:scaleType="centerCrop" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_yola_splash_log">
<ImageView
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:src="@drawable/ic_yola_splash_log"
app:layout_constraintWidth_percent="0.34" />
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

View File

@ -1078,9 +1078,9 @@
<string name="confirm_pick_up">確認領取</string>
<string name="customer_service2">無法登陸?點此聯繫客服</string>
<string name="next_step_is_consent">進入下一步即代表同意</string>
<string name="user_protocol2">用戶協議</string>
<string name="user_protocol2">用戶協議</string>
<string name="and"></string>
<string name="privacy_terms">隱私條款</string>
<string name="privacy_terms">隱私條款</string>
<string name="terms_and_policies">條款和政策</string>
<string name="treat_and_protect">歡迎來到PandoraLive對於您的個人信息及隱私我們將採用最高標準對待和保護。</string>
<string name="install_the_application">詳情請您閱讀以下安裝應用程序的消息:</string>

View File

@ -11,6 +11,18 @@
<item name="android:statusBarColor">@color/colorPrimary</item>
</style>
<style name="AppLunTheme.Theme" parent="Base.Theme.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@drawable/bg_yola_splash_log</item>
<item name="android:windowAnimationStyle">@style/AnimationActivity</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">@color/colorPrimary</item>
</style>
<style name="dialog" parent="AppTheme">
<item name="android:windowFrame">@null</item>
<item name="android:windowNoTitle">true</item>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<corners android:radius="28dp" />
<solid android:color="#080221" />
</shape>
</item>
</selector>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<corners android:radius="28dp" />
<solid android:color="#F2F2F2" />
</shape>
</item>
</selector>

View File

@ -40,6 +40,7 @@ import android.widget.VideoView;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.Group;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.fastjson.JSON;
@ -117,11 +118,12 @@ import java.util.TimerTask;
@Route(path = RouteUtil.PATH_ENTRY)
public class EntryActivity extends AppCompatActivity {
private VideoView video_view;
private ImageView btn_phone, btn_line, btn_twitter;
// private VideoView video_view;
private View btn_phone, btn_line;
private TextView btn_tip, btn_tip1, tv_customer;
private TwitterLoginButton tt_login_button;
private LinearLayout btn_google, googleLayout;
// private TwitterLoginButton tt_login_button;
private View btn_google;
private Group googleLayout,webViewLayout;
public static Activity activity;
private static String mLoginType = Constants.MOB_PHONE;//登录方式
public String mPromoCode = "", UserID = "";//推广码
@ -130,8 +132,8 @@ public class EntryActivity extends AppCompatActivity {
private static boolean mFirstLogin;//是否是第一次登录
private static boolean mShowInvite;//显示邀请码弹窗
private static Context Contexts;
private ImageView img_view;
private LinearLayout lt_btn_twitter, lt_btn_facebook, lt_customer;
// private ImageView img_view;
private View lt_btn_facebook;
private String kefuUrl = "";
private boolean mBtnClick = false;
private Dialog loginLoadingDialog;
@ -140,7 +142,6 @@ public class EntryActivity extends AppCompatActivity {
private WebView webview;
private WebSettings webSettings;
private View webViewLayout;
private View webBack;
@ -201,7 +202,7 @@ public class EntryActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_entry);
setContentView(R.layout.activity_entry2);
if (getIntent().getBooleanExtra("forwardEntry", false)) {
IMLoginManager.get(this).logout(this);
ToastUtil.show(R.string.login_invalid);
@ -221,20 +222,20 @@ public class EntryActivity extends AppCompatActivity {
}
lt_btn_facebook = findViewById(R.id.lt_btn_facebook);
lt_btn_twitter = findViewById(R.id.lt_btn_twitter);
// lt_btn_twitter = findViewById(R.id.lt_btn_twitter);
btn_tip = findViewById(R.id.btn_tip);
btn_tip1 = findViewById(R.id.btn_tip1);
img_view = findViewById(R.id.img_view);
// img_view = findViewById(R.id.img_view);
btn_google = findViewById(R.id.btn_google);
btn_twitter = findViewById(R.id.btn_twitter);
tt_login_button = findViewById(R.id.tt_login_button);
// btn_twitter = findViewById(R.id.btn_twitter);
// tt_login_button = findViewById(R.id.tt_login_button);
tv_customer = findViewById(R.id.tv_customer);
btn_phone = findViewById(R.id.btn_phone);
btn_line = findViewById(R.id.btn_line);
lt_customer = findViewById(R.id.lt_customer);
// btn_line = findViewById(R.id.btn_line);
btn_tip.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG);
btn_tip.getPaint().setAntiAlias(true);
@ -274,26 +275,26 @@ public class EntryActivity extends AppCompatActivity {
getPromoCode();
getUuidDevice();
video_view = findViewById(R.id.video_view);
video_view.setVideoPath(Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.login_video) + "");
video_view.start();
video_view.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mp) {
video_view.setVideoPath(Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.login_video) + "");
video_view.start();
}
});
video_view.setOnErrorListener(new MediaPlayer.OnErrorListener() {
@Override
public boolean onError(MediaPlayer mp, int what, int extra) {
video_view.stopPlayback(); //播放异常则停止播放防止弹窗使界面阻塞
img_view.setVisibility(View.VISIBLE);
video_view.setVisibility(View.GONE);
return false;
}
});
// video_view = findViewById(R.id.video_view);
// video_view.setVideoPath(Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.login_video) + "");
// video_view.start();
// video_view.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
//
// @Override
// public void onCompletion(MediaPlayer mp) {
// video_view.setVideoPath(Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.login_video) + "");
// video_view.start();
// }
// });
// video_view.setOnErrorListener(new MediaPlayer.OnErrorListener() {
// @Override
// public boolean onError(MediaPlayer mp, int what, int extra) {
// video_view.stopPlayback(); //播放异常则停止播放防止弹窗使界面阻塞
// img_view.setVisibility(View.VISIBLE);
// video_view.setVisibility(View.GONE);
// return false;
// }
// });
lt_btn_facebook.setOnClickListener(new View.OnClickListener() {
@Override
@ -334,59 +335,58 @@ public class EntryActivity extends AppCompatActivity {
}
});
lt_btn_twitter.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (isBtnClick()) {
return;
}
verfiy(3);
}
});
// lt_btn_twitter.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// if (isBtnClick()) {
// return;
// }
// verfiy(3);
// }
// });
tt_login_button.setCallback(new Callback<TwitterSession>() {
@Override
public void success(Result<TwitterSession> result) {
// Do something with result, which provides a TwitterSession for making API calls
//result里面包含了用户的信息我们可以从中取出tokentokenSecret
//(如果我们有自己的后台服务器发送这两个到我们自己的后台后台再去验证
TwitterAuthToken authToken = result.data.getAuthToken();
String token = authToken.token;
String appId = "24315541";
String tokenSecret = authToken.secret;
final String userName = result.data.getUserName();
LoginData data = new LoginData();
data.setAvatar("");
data.setNickName(userName);
data.setOpenID(token);
data.setType("twitter");
loginBuyThird(data);
}
@Override
public void failure(TwitterException exception) {
Log.i("Log", "TwitterException = " + exception);
ToastUtil.show(getResources().getString(R.string.user_login_outtime));
}
});
findViewById(R.id.btn_line).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (isBtnClick()) {
return;
}
verfiy(4);
}
});
// tt_login_button.setCallback(new Callback<TwitterSession>() {
// @Override
// public void success(Result<TwitterSession> result) {
// // Do something with result, which provides a TwitterSession for making API calls
// //result里面包含了用户的信息我们可以从中取出tokentokenSecret
// //(如果我们有自己的后台服务器发送这两个到我们自己的后台后台再去验证
// TwitterAuthToken authToken = result.data.getAuthToken();
// String token = authToken.token;
// String appId = "24315541";
// String tokenSecret = authToken.secret;
//
// final String userName = result.data.getUserName();
//
// LoginData data = new LoginData();
// data.setAvatar("");
// data.setNickName(userName);
// data.setOpenID(token);
// data.setType("twitter");
//
// loginBuyThird(data);
//
// }
//
// @Override
// public void failure(TwitterException exception) {
// Log.i("Log", "TwitterException = " + exception);
// ToastUtil.show(getResources().getString(R.string.user_login_outtime));
// }
// });
// findViewById(R.id.btn_line).setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// if (isBtnClick()) {
// return;
// }
// verfiy(4);
// }
// });
getUrl();
lt_customer.setOnClickListener(new View.OnClickListener() {
tv_customer.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (!"".equals(kefuUrl)) {
@ -437,18 +437,18 @@ public class EntryActivity extends AppCompatActivity {
} else if (loginType == 2) {
startActivityForResult(googleUtils.getIntent(), 1002);
} else if (loginType == 3) {
tt_login_button.performClick();
// tt_login_button.performClick();
} else if (loginType == 4) {
try {
// App-to-app login
Intent loginIntent = LineLoginApi.getLoginIntent(findViewById(R.id.btn_line).getContext(), "2006124380", new LineAuthenticationParams.Builder().scopes(Arrays.asList(Scope.PROFILE))
// .nonce("<a randomly-generated string>") // nonce can be used to improve security
.build());
startActivityForResult(loginIntent, 1001);
} catch (Exception e) {
Log.e("ERROR", e.toString());
ToastUtil.show(getResources().getString(R.string.user_login_outtime));
}
// try {
// // App-to-app login
// Intent loginIntent = LineLoginApi.getLoginIntent(findViewById(R.id.btn_line).getContext(), "2006124380", new LineAuthenticationParams.Builder().scopes(Arrays.asList(Scope.PROFILE))
// // .nonce("<a randomly-generated string>") // nonce can be used to improve security
// .build());
// startActivityForResult(loginIntent, 1001);
// } catch (Exception e) {
// Log.e("ERROR", e.toString());
// ToastUtil.show(getResources().getString(R.string.user_login_outtime));
// }
}
}
@ -564,7 +564,7 @@ public class EntryActivity extends AppCompatActivity {
} else if (requestCode == 1002) {//google登录
handleSignInResult(data);
} else {
tt_login_button.onActivityResult(requestCode, resultCode, data);//twitter登录回调
// tt_login_button.onActivityResult(requestCode, resultCode, data);//twitter登录回调
callbackManager.onActivityResult(requestCode, resultCode, data);//facebook登录回调
}
super.onActivityResult(requestCode, resultCode, data);
@ -656,7 +656,7 @@ public class EntryActivity extends AppCompatActivity {
@Override
protected void onResume() {
super.onResume();
video_view.start();
// video_view.start();
}

View File

@ -66,6 +66,7 @@ import com.yunbao.common.interfaces.CommonCallback;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
import com.yunbao.common.utils.AppManager;
import com.yunbao.common.utils.DateFormatUtil;
import com.yunbao.common.utils.DebugUtils;
import com.yunbao.common.utils.DeviceUtils;
import com.yunbao.common.utils.DpUtil;
@ -109,8 +110,13 @@ import org.greenrobot.eventbus.ThreadMode;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import io.rong.imlib.RongIMClient;
import io.rong.imlib.model.Conversation;
import io.rong.imlib.model.Message;
/**
* 消息中心
@ -588,10 +594,10 @@ public class MainMessageViewHolder2 extends AbsMainHomeChildViewHolder {
if (TextUtils.isEmpty(userBean.getNum()) || TextUtils.equals("0", userBean.getNum())) {
textNewsNotice.setVisibility(View.GONE);
} else {
Log.i("官方通知", "请求消息:" + SudJsonUtils.toJson(userBean));
textNewsNotice.setVisibility(View.VISIBLE);
officialDate.setText(userBean.getLastDate());
officialContent.setText(userBean.getContent());
setChatApt(userBean.getType(),officialDate,officialContent);
// officialDate.setText(userBean.getLastDate());
// officialContent.setText(userBean.getContent());
// int numberInt = Integer.parseInt(userBean.getNum());
// if (numberInt > 99) {
// textNewsNotice.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9);
@ -683,6 +689,12 @@ public class MainMessageViewHolder2 extends AbsMainHomeChildViewHolder {
});
}
//不是IM消息
private void setChatApt(String type,TextView timeTV,TextView contentTv) {
}
/**
* 系統消息獲取
*/
@ -777,11 +789,9 @@ public class MainMessageViewHolder2 extends AbsMainHomeChildViewHolder {
textNewsNotice.setText("");
} else {
// String number = textNewsNotice.getText().toString().trim();
Log.i("官方通知", "官方通知:" + model.toString());
textNewsNotice.setVisibility(View.VISIBLE);
officialDate.setText(model.getAddtime());
officialContent.setText(model.getContent());
textNewsNotice.setVisibility(View.VISIBLE);
setChatApt(model.getType(),officialDate,officialContent);
// int numberInt = Integer.parseInt(number) + 1;
// if (numberInt > 99) {
// textNewsNotice.setTextSize(TypedValue.COMPLEX_UNIT_SP, 9);

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB