81 lines
2.7 KiB
Java
81 lines
2.7 KiB
Java
package com.ubt.jimu.user.view;
|
|
|
|
import android.content.Intent;
|
|
import android.os.Bundle;
|
|
import android.view.View;
|
|
import android.widget.FrameLayout;
|
|
import androidx.cardview.widget.CardView;
|
|
import butterknife.ButterKnife;
|
|
import com.ubt.jimu.BaseActivity;
|
|
import com.ubt.jimu.JimuApplication;
|
|
import com.ubt.jimu.R;
|
|
import com.ubt.jimu.user.presenter.PraisePresenter;
|
|
import com.ubt.jimu.user.view.fragment.PraiseFragment;
|
|
import com.ubtech.utils.ActivityUtils;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class PraiseActivity extends BaseActivity {
|
|
private long a;
|
|
CardView centerCardView;
|
|
|
|
private void D0() {
|
|
Bundle bundleExtra = getIntent().getBundleExtra("extra");
|
|
if (bundleExtra != null) {
|
|
this.a = bundleExtra.getLong("view_user_id");
|
|
}
|
|
}
|
|
|
|
private void E0() {
|
|
if (((PraiseFragment) ActivityUtils.a(getSupportFragmentManager(), "tag_fragment_praise")) == null) {
|
|
PraiseFragment a = PraiseFragment.a(this.a);
|
|
ActivityUtils.a(getSupportFragmentManager(), a, R.id.contentFrame, "tag_fragment_praise");
|
|
new PraisePresenter(this, a);
|
|
}
|
|
}
|
|
|
|
public static void a(UserCenterActivity userCenterActivity, Bundle bundle) {
|
|
Intent intent = new Intent(userCenterActivity, (Class<?>) PraiseActivity.class);
|
|
intent.putExtra("extra", bundle);
|
|
userCenterActivity.startActivity(intent);
|
|
}
|
|
|
|
public void onCenterCardView(View view) {
|
|
}
|
|
|
|
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
|
protected void onCreate(Bundle bundle) {
|
|
super.onCreate(bundle);
|
|
setContentView(R.layout.activity_praise);
|
|
ButterKnife.a(this);
|
|
D0();
|
|
relayout();
|
|
E0();
|
|
}
|
|
|
|
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
|
protected void onDestroy() {
|
|
super.onDestroy();
|
|
}
|
|
|
|
public void onDismiss(View view) {
|
|
finish();
|
|
}
|
|
|
|
@Override // com.ubt.jimu.BaseActivity
|
|
public void relayout() {
|
|
float f;
|
|
float f2;
|
|
if (JimuApplication.l().i()) {
|
|
f = 0.549f;
|
|
f2 = 0.54f;
|
|
} else {
|
|
f = 0.562f;
|
|
f2 = 0.712f;
|
|
}
|
|
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) this.centerCardView.getLayoutParams();
|
|
layoutParams.width = (int) (getScreenWidth() * f);
|
|
layoutParams.height = (int) (getScreenHeight() * f2);
|
|
this.centerCardView.setLayoutParams(layoutParams);
|
|
}
|
|
}
|