正在查看: BodyTech v7.6.4 应用的 ContractTermsConditionsActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: BodyTech v7.6.4 应用的 ContractTermsConditionsActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.fitnessmobileapps.fma.views;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.webkit.WebView;
import android.widget.TextView;
import androidx.appcompat.widget.Toolbar;
import com.fitnessmobileapps.bodytech39559.R;
import com.fitnessmobileapps.fma.feature.common.activity.BmaAppCompatActivity;
import com.fitnessmobileapps.fma.feature.common.navigation.ToolbarKt;
import com.mindbodyonline.android.api.sales.model.pos.catalog.ContractItemMetadataTemplate;
import com.mindbodyonline.android.api.sales.model.pos.packages.CartPackage;
public class ContractTermsConditionsActivity extends BmaAppCompatActivity {
private CartPackage f10558d;
private TextView f10559e;
private WebView f10560k;
public void C(View view) {
finish();
}
public void D(View view) {
E();
}
private void E() {
setResult(-1);
finish();
}
public static Intent G(Context context, CartPackage cartPackage) {
Intent intent = new Intent(context, (Class<?>) ContractTermsConditionsActivity.class);
intent.putExtra("BUNDLE_KEY_CART_CONTRACT", p001if.b.c(cf.d.g(cartPackage)));
return intent;
}
public void F(CartPackage cartPackage) {
this.f10558d = cartPackage;
ContractItemMetadataTemplate contractTemplate = cartPackage.getCatalogPackage().getContractTemplate();
this.f10559e.setText(getString(R.string.contract_tos_header, cartPackage.getCatalogPackage().getName()));
this.f10560k.loadData(contractTemplate.getContractTextHtml(), "text/html", "UTF-8");
}
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.activity_contract_terms_conditions);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
ToolbarKt.j(toolbar, new View.OnClickListener() {
@Override
public final void onClick(View view) {
ContractTermsConditionsActivity.this.C(view);
}
});
this.f10559e = (TextView) findViewById(R.id.activity_contract_terms_header);
this.f10560k = (WebView) findViewById(R.id.activity_contract_terms_contract_text);
findViewById(R.id.activity_contract_terms_button_next).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
ContractTermsConditionsActivity.this.D(view);
}
});
CartPackage cartPackage = bundle != null ? (CartPackage) cf.d.b(p001if.b.a(bundle.getString("BUNDLE_KEY_CART_CONTRACT")), CartPackage.class) : getIntent().hasExtra("BUNDLE_KEY_CART_CONTRACT") ? (CartPackage) cf.d.b(p001if.b.a(getIntent().getStringExtra("BUNDLE_KEY_CART_CONTRACT")), CartPackage.class) : null;
if (cartPackage == null || cartPackage.getCatalogPackage() == null || cartPackage.getCatalogPackage().getContractTemplate() == null) {
finish();
} else {
F(cartPackage);
}
}
@Override
protected void onDestroy() {
this.f10560k.destroy();
super.onDestroy();
}
@Override
public boolean onOptionsItemSelected(MenuItem menuItem) {
if (menuItem.getItemId() != 16908332) {
return super.onOptionsItemSelected(menuItem);
}
onBackPressed();
return true;
}
@Override
protected void onPause() {
this.f10560k.pauseTimers();
this.f10560k.onPause();
super.onPause();
}
@Override
protected void onResume() {
super.onResume();
this.f10560k.onResume();
this.f10560k.resumeTimers();
}
@Override
protected void onSaveInstanceState(Bundle bundle) {
bundle.putString("BUNDLE_KEY_CART_CONTRACT", p001if.b.c(cf.d.g(this.f10558d)));
super.onSaveInstanceState(bundle);
}
}