opt share
This commit is contained in:
@@ -5,11 +5,10 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.mogo.module.share.R;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
@@ -21,7 +20,10 @@ import com.mogo.utils.logger.Logger;
|
||||
*/
|
||||
public class LaucherShareDialog extends Dialog implements View.OnClickListener {
|
||||
private TextView txtOk;
|
||||
private ImageView mBackImage;
|
||||
private RelativeLayout mBlockLayout;
|
||||
private RelativeLayout mOilPriceLayout;
|
||||
private RelativeLayout mTrafficCheckLayout;
|
||||
private RelativeLayout mRoadClosureLayout;
|
||||
private Context mContext;
|
||||
|
||||
|
||||
@@ -44,22 +46,38 @@ public class LaucherShareDialog extends Dialog implements View.OnClickListener {
|
||||
private void initView() {
|
||||
setContentView(R.layout.launcher_dialog_share);
|
||||
txtOk = findViewById(R.id.btn_share_title);
|
||||
mBackImage = findViewById(R.id.btn_back);
|
||||
mBlockLayout = findViewById(R.id.btn_block_layout);
|
||||
mOilPriceLayout = findViewById(R.id.oil_price_layout);
|
||||
mTrafficCheckLayout = findViewById(R.id.traffic_check_layout);
|
||||
mRoadClosureLayout = findViewById(R.id.road_closure_layout);
|
||||
}
|
||||
|
||||
private void initListener() {
|
||||
mBackImage.setOnClickListener(this);
|
||||
|
||||
private void initListener() {
|
||||
mBlockLayout.setOnClickListener(this);
|
||||
mOilPriceLayout.setOnClickListener(this);
|
||||
mTrafficCheckLayout.setOnClickListener(this);
|
||||
mRoadClosureLayout.setOnClickListener(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
int id = view.getId();
|
||||
if (id == R.id.btn_back) {
|
||||
if (id == R.id.btn_block_layout) {
|
||||
sendShareReceiver();
|
||||
dismiss();
|
||||
} else if (id == R.id.oil_price_layout) {
|
||||
//TODO
|
||||
|
||||
} else if (id == R.id.traffic_check_layout) {
|
||||
//TODO
|
||||
|
||||
} else if (id == R.id.road_closure_layout) {
|
||||
//TODO
|
||||
|
||||
}
|
||||
|
||||
dismiss();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,6 +88,7 @@ public class LaucherShareDialog extends Dialog implements View.OnClickListener {
|
||||
Intent intent = new Intent();
|
||||
intent.setAction("com.zhidao.roadcondition.share");
|
||||
intent.putExtra("type", "1");
|
||||
intent.putExtra("keyWords", "xx");
|
||||
mContext.sendBroadcast(intent);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user