柬埔寨通 v6.1.5版本的 MD5 值为:9b68581ac30883219d6a25858a099d6b
以下内容为反编译后的 LongContentAddLinkActivity.java 源代码,内容仅作参考
package net.duohuo.magappx.circle.show;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;
import butterknife.BindView;
import butterknife.OnClick;
import com.jianpuzhaitong.forum.R;
import net.duohuo.core.fresco.FrescoController;
import net.duohuo.magappx.common.base.MagBaseActivity;
import net.duohuo.magappx.common.util.IntentUtils;
public class LongContentAddLinkActivity extends MagBaseActivity {
@BindView(R.id.content)
EditText contentV;
boolean isEdit;
@BindView(R.id.link)
EditText linkV;
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.activity_longcontent_addlink);
setTitle("添加链接");
this.isEdit = ForwardActivity.EDIT.equals(getIntent().getStringExtra("type"));
getNavigator().setActionText("完成", new View.OnClickListener() {
@Override
public void onClick(View view) {
if (TextUtils.isEmpty(LongContentAddLinkActivity.this.contentV.getText().toString())) {
LongContentAddLinkActivity.this.showToast("链接描述不可为空");
return;
}
if (TextUtils.isEmpty(LongContentAddLinkActivity.this.linkV.getText().toString())) {
LongContentAddLinkActivity.this.showToast("链接地址不可为空");
return;
}
Intent intent = new Intent();
intent.putExtra("content", LongContentAddLinkActivity.this.contentV.getText().toString().replace("#", "").replace("@", ""));
intent.putExtra("link", LongContentAddLinkActivity.this.linkV.getText().toString());
intent.putExtra("result", "<a href=\"" + LongContentAddLinkActivity.this.linkV.getText().toString() + "\">" + LongContentAddLinkActivity.this.contentV.getText().toString() + "</a>");
if (LongContentAddLinkActivity.this.isEdit) {
intent.putExtra("start", LongContentAddLinkActivity.this.getIntent().getIntExtra("start", 0));
intent.putExtra("end", LongContentAddLinkActivity.this.getIntent().getIntExtra("end", 0));
}
LongContentAddLinkActivity.this.setResult(-1, intent);
LongContentAddLinkActivity.this.finish();
}
});
if (this.isEdit) {
this.linkV.setText(getIntent().getStringExtra("link"));
this.contentV.setText(getIntent().getStringExtra("content"));
}
}
@Override
public void onActivityResult(int i, int i2, Intent intent) {
super.onActivityResult(i, i2, intent);
if (i2 != -1) {
return;
}
String stringExtra = intent.getStringExtra("title");
if (!TextUtils.isEmpty(stringExtra)) {
this.contentV.setText(stringExtra);
}
String stringExtra2 = intent.getStringExtra("link");
if (TextUtils.isEmpty(stringExtra2)) {
return;
}
if (!stringExtra2.startsWith(FrescoController.HTTP_PERFIX) || !stringExtra2.startsWith(FrescoController.HTTPS_PERFIX)) {
stringExtra2 = "https://app.jpztong.com/" + stringExtra2;
}
this.linkV.setText(stringExtra2);
}
@OnClick({R.id.thread_layout})
public void toAddThreadLink() {
startActivityForResult(new Intent(getActivity(), (Class<?>) SelectThreadActivity.class), IntentUtils.code_link_select_thread);
}
}