opt net request
This commit is contained in:
@@ -9,6 +9,7 @@ import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.mogo.module.share.R;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
@@ -30,6 +31,7 @@ public class LaucherShareDialog extends Dialog implements View.OnClickListener {
|
||||
public LaucherShareDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
this.mContext = context;
|
||||
getWindow().setBackgroundDrawableResource(android.R.color.transparent);
|
||||
}
|
||||
|
||||
public LaucherShareDialog(@NonNull Context context, int themeResId) {
|
||||
@@ -65,16 +67,14 @@ public class LaucherShareDialog extends Dialog implements View.OnClickListener {
|
||||
public void onClick(View view) {
|
||||
int id = view.getId();
|
||||
if (id == R.id.btn_block_layout) {
|
||||
sendShareReceiver();
|
||||
sendShareReceiver("1");
|
||||
} else if (id == R.id.oil_price_layout) {
|
||||
//TODO
|
||||
|
||||
} else if (id == R.id.traffic_check_layout) {
|
||||
//TODO
|
||||
|
||||
sendShareReceiver("2");
|
||||
} else if (id == R.id.road_closure_layout) {
|
||||
//TODO
|
||||
|
||||
sendShareReceiver("2");
|
||||
}
|
||||
|
||||
dismiss();
|
||||
@@ -83,12 +83,11 @@ public class LaucherShareDialog extends Dialog implements View.OnClickListener {
|
||||
/**
|
||||
* 发送广播
|
||||
*/
|
||||
private void sendShareReceiver() {
|
||||
private void sendShareReceiver(String type) {
|
||||
Logger.d("liyz", "LaucherShareDialog sendShareReceiver ---->");
|
||||
Intent intent = new Intent();
|
||||
intent.setAction("com.zhidao.roadcondition.share");
|
||||
intent.putExtra("type", "1");
|
||||
intent.putExtra("keyWords", "xx");
|
||||
intent.putExtra("type", type);
|
||||
mContext.sendBroadcast(intent);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user