Commit 68129c7fca2c1f9c7a80d71a4d71f5f357f1600c
1 parent
2ea0d227
分享
Showing
10 changed files
with
85 additions
and
356 deletions
config.gradle
library_baidumap/build.gradle
| ... | ... | @@ -48,9 +48,6 @@ dependencies { |
| 48 | 48 | api files('libs/BaiduLBS_Android.jar') |
| 49 | 49 | api files('libs/BaiduTraceSDK_v3_1_0.jar') |
| 50 | 50 | api files('libs/bos-android-sdk-1.0.3.jar') |
| 51 | -// api files('libs/okhttp-3.8.1.jar') | |
| 52 | -// api files('libs/okio-1.13.0.jar') | |
| 53 | - | |
| 54 | 51 | } |
| 55 | 52 | |
| 56 | 53 | ... | ... |
moudle_pedometer/build.gradle
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/activity/ShareRecordActivity.java
| 1 | 1 | package com.cnlive.moudle.pedometer.ui.activity; |
| 2 | 2 | |
| 3 | +import android.Manifest; | |
| 3 | 4 | import android.app.Activity; |
| 4 | 5 | import android.content.Intent; |
| 5 | 6 | import android.graphics.Bitmap; |
| 6 | 7 | import android.support.v7.app.AppCompatActivity; |
| 7 | 8 | import android.os.Bundle; |
| 9 | +import android.text.Editable; | |
| 10 | +import android.text.TextWatcher; | |
| 11 | +import android.widget.EditText; | |
| 8 | 12 | import android.widget.ImageView; |
| 9 | 13 | import android.widget.RelativeLayout; |
| 10 | 14 | import android.widget.TextView; |
| 11 | 15 | |
| 16 | +import com.alibaba.android.arouter.launcher.ARouter; | |
| 12 | 17 | import com.cnlive.libs.base.util.StatusBarUtil; |
| 13 | 18 | import com.cnlive.libs.base.util.StatusBarUtil2; |
| 14 | -import com.cnlive.moudle.pedometer.utils.share.MyShareDialog; | |
| 19 | +import com.cnlive.moudle.pedometer.utils.lib_permisshelper.PermissionsListener; | |
| 20 | +import com.cnlive.moudle.pedometer.utils.lib_permisshelper.PermissionsUtils; | |
| 15 | 21 | import com.example.moudle_pedometer.R; |
| 16 | 22 | import com.qmuiteam.qmui.util.QMUIDrawableHelper; |
| 17 | 23 | |
| 24 | +import java.io.ByteArrayOutputStream; | |
| 25 | + | |
| 18 | 26 | /** |
| 19 | 27 | * |
| 20 | 28 | * Created by hanyayun 019/05/30. |
| ... | ... | @@ -24,6 +32,9 @@ public class ShareRecordActivity extends AppCompatActivity { |
| 24 | 32 | private ImageView share_back; |
| 25 | 33 | private TextView share,cord_name; |
| 26 | 34 | private RelativeLayout ry_cen; |
| 35 | + private EditText editText; | |
| 36 | + private PermissionsUtils mPermissionsUtils = new PermissionsUtils(); | |
| 37 | + | |
| 27 | 38 | public static void newInstance(Activity context,String title,String kilo,String step,String time,String speed){ |
| 28 | 39 | Intent intent = new Intent(context,ShareRecordActivity.class); |
| 29 | 40 | intent.putExtra("raceTitle",title); |
| ... | ... | @@ -42,7 +53,7 @@ public class ShareRecordActivity extends AppCompatActivity { |
| 42 | 53 | setContentView(R.layout.activity_share_record); |
| 43 | 54 | |
| 44 | 55 | cord_name = findViewById(R.id.cord_name); |
| 45 | - cord_name.setText("我在"+getIntent().getStringExtra("raceTitle")+"中的最佳成绩"); | |
| 56 | + cord_name.setText("我在" + getIntent().getStringExtra("raceTitle") + "中的最佳成绩"); | |
| 46 | 57 | ((TextView) findViewById(R.id.kilo_share)).setText(getIntent().getStringExtra("kilo")); |
| 47 | 58 | ((TextView) findViewById(R.id.step_share)).setText(getIntent().getStringExtra("step")); |
| 48 | 59 | ((TextView) findViewById(R.id.time_share)).setText(getIntent().getStringExtra("time")); |
| ... | ... | @@ -51,13 +62,76 @@ public class ShareRecordActivity extends AppCompatActivity { |
| 51 | 62 | share = findViewById(R.id.share); |
| 52 | 63 | ry_cen = findViewById(R.id.ry_cen); |
| 53 | 64 | share_back.setOnClickListener(v -> finish()); |
| 54 | - share.setOnClickListener(v -> share()); | |
| 65 | + share.setOnClickListener(v -> getPermissionsWithTip()); | |
| 66 | + | |
| 67 | + editText = findViewById(R.id.edit); | |
| 68 | + editText.addTextChangedListener(new TextWatcher() { | |
| 69 | + @Override | |
| 70 | + public void beforeTextChanged(CharSequence s, int start, int count, int after) { | |
| 71 | + | |
| 72 | + } | |
| 73 | + | |
| 74 | + @Override | |
| 75 | + public void onTextChanged(CharSequence s, int start, int before, int count) { | |
| 76 | + | |
| 77 | + } | |
| 78 | + | |
| 79 | + @Override | |
| 80 | + public void afterTextChanged(Editable s) { | |
| 81 | + int lines = editText.getLineCount(); | |
| 82 | + // 限制最大输入行数 | |
| 83 | + if (lines > 2) { | |
| 84 | + String str = s.toString(); | |
| 85 | + int cursorStart = editText.getSelectionStart(); | |
| 86 | + int cursorEnd = editText.getSelectionEnd(); | |
| 87 | + if (cursorStart == cursorEnd && cursorStart < str.length() && cursorStart >= 1) { | |
| 88 | + str = str.substring(0, cursorStart-1) + str.substring(cursorStart); | |
| 89 | + } else { | |
| 90 | + str = str.substring(0, s.length()-1); | |
| 91 | + } | |
| 92 | + // setText会触发afterTextChanged的递归 | |
| 93 | + editText.setText(str); | |
| 94 | + // setSelection用的索引不能使用str.length()否则会越界 | |
| 95 | + editText.setSelection(editText.getText().length()); | |
| 96 | + } | |
| 97 | + } | |
| 98 | + }); | |
| 99 | + | |
| 100 | +// QrService service= (QrService) ARouter.getInstance().build("/app/base/qrservice").navigation(this); | |
| 101 | +// Bitmap bitmap= service.createQRNoIconBitmap("321212312312312",240); | |
| 102 | +// ((ImageView) findViewById(R.id.down_img)).setImageBitmap(bitmap); | |
| 55 | 103 | } |
| 56 | 104 | |
| 57 | 105 | private void share(){ |
| 58 | -// Bitmap qrbm = QMUIDrawableHelper.createBitmapFromView(ry_cen); | |
| 59 | -// MyShareDialog dialog = new MyShareDialog(this,qrbm); | |
| 60 | -// dialog.show(); | |
| 106 | + Bitmap qrbm = QMUIDrawableHelper.createBitmapFromView(ry_cen); | |
| 107 | + ByteArrayOutputStream baos=new ByteArrayOutputStream(); | |
| 108 | + qrbm.compress(Bitmap.CompressFormat.PNG, 100, baos); | |
| 109 | + byte [] bitmapByte =baos.toByteArray(); | |
| 110 | + ARouter.getInstance().build("/share/ShareImgActivity") | |
| 111 | + .withByteArray("bitmap", bitmapByte) | |
| 112 | + .navigation(this); | |
| 61 | 113 | } |
| 62 | 114 | |
| 115 | + | |
| 116 | + private void getPermissionsWithTip() { | |
| 117 | + mPermissionsUtils | |
| 118 | + .setPermissionsListener(new PermissionsListener() { | |
| 119 | + @Override | |
| 120 | + public void onDenied(String[] deniedPermissions) { | |
| 121 | + getPermissionsWithTip(); | |
| 122 | + } | |
| 123 | + | |
| 124 | + @Override | |
| 125 | + public void onGranted() { | |
| 126 | + //判断GPS是否开启 | |
| 127 | + share(); | |
| 128 | + } | |
| 129 | + }) | |
| 130 | + .withActivity(this) | |
| 131 | + .getPermissions(this | |
| 132 | + , 100 | |
| 133 | + , Manifest.permission.WRITE_EXTERNAL_STORAGE | |
| 134 | + , Manifest.permission.READ_EXTERNAL_STORAGE | |
| 135 | + ); | |
| 136 | + } | |
| 63 | 137 | } | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/utils/share/MyShareDialog.java deleted
100644 → 0
| 1 | -package com.cnlive.moudle.pedometer.utils.share; | |
| 2 | - | |
| 3 | -import android.Manifest; | |
| 4 | -import android.app.Activity; | |
| 5 | -import android.app.Dialog; | |
| 6 | -import android.content.Intent; | |
| 7 | -import android.graphics.Bitmap; | |
| 8 | -import android.net.Uri; | |
| 9 | -import android.os.Bundle; | |
| 10 | -import android.os.Environment; | |
| 11 | -import android.support.annotation.NonNull; | |
| 12 | -import android.support.v7.widget.LinearLayoutManager; | |
| 13 | -import android.support.v7.widget.RecyclerView; | |
| 14 | -import android.util.DisplayMetrics; | |
| 15 | -import android.view.View; | |
| 16 | -import android.view.ViewGroup; | |
| 17 | -import android.view.Window; | |
| 18 | -import android.view.WindowManager; | |
| 19 | -import android.widget.LinearLayout; | |
| 20 | - | |
| 21 | -import com.cnlive.libs.base.application.AppConfig; | |
| 22 | -import com.cnlive.libs.base.util.ShareReleaseInfoUtil; | |
| 23 | -import com.cnlive.moudle.pedometer.utils.lib_permisshelper.PermissionsListener; | |
| 24 | -import com.cnlive.moudle.pedometer.utils.lib_permisshelper.PermissionsUtils; | |
| 25 | -import com.example.moudle_pedometer.R; | |
| 26 | - | |
| 27 | - | |
| 28 | -import java.io.File; | |
| 29 | -import java.io.FileNotFoundException; | |
| 30 | -import java.io.FileOutputStream; | |
| 31 | -import java.io.IOException; | |
| 32 | -import java.text.SimpleDateFormat; | |
| 33 | -import java.util.ArrayList; | |
| 34 | -import java.util.Date; | |
| 35 | -import java.util.List; | |
| 36 | - | |
| 37 | -/** | |
| 38 | - * 创建:wukuiqing | |
| 39 | - * <p> | |
| 40 | - * 时间:2017/10/11A | |
| 41 | - * <p> | |
| 42 | - * 描述:分享的dialog | |
| 43 | - */ | |
| 44 | - | |
| 45 | -public class MyShareDialog { | |
| 46 | -// extends | |
| 47 | -//} Dialog implements View.OnClickListener, ShareDialogListAdapter.ItemClick { | |
| 48 | -// | |
| 49 | -// private Activity mContext; | |
| 50 | -// private LinearLayout ll_cancle; | |
| 51 | -// private ShareInfo info; | |
| 52 | -// private RecyclerView shareRv; | |
| 53 | -// private RecyclerView shareOther; | |
| 54 | -// | |
| 55 | -// private ShareDialogListAdapter adapter; | |
| 56 | -// private boolean showOther; | |
| 57 | -// private boolean showWjj; | |
| 58 | -// private Bitmap bitmap; | |
| 59 | -// | |
| 60 | -// private ShareReleaseInfoUtil.ShareConfig config; | |
| 61 | -// private PermissionsUtils mPermissionsUtils = new PermissionsUtils();//权限申请 | |
| 62 | -// | |
| 63 | -// public static final String SHARE_TITLE = "快来加入中国网家家,优享美好生活!"; | |
| 64 | -// public static final String SHARE_CONTENT = "中国网家家 让生活更美好!"; | |
| 65 | -// private List<IconInfo> list = new ArrayList<>(); | |
| 66 | -// | |
| 67 | -// | |
| 68 | -// public MyShareDialog(@NonNull Activity context, Bitmap bitmap) { | |
| 69 | -// this(context, true, true,bitmap); | |
| 70 | -// } | |
| 71 | -// | |
| 72 | -// public MyShareDialog(@NonNull Activity context, boolean showOther, boolean showWjj, Bitmap bitmap) { | |
| 73 | -// super(context, R.style.ShareDialogStyle); | |
| 74 | -// mContext = context; | |
| 75 | -// info = new ShareInfo(); | |
| 76 | -// info.setUrl(AppConfig.getShareDownload()); | |
| 77 | -// info.setTitle(SHARE_TITLE); | |
| 78 | -// info.setContent(SHARE_CONTENT); | |
| 79 | -// info.setImgurl(AppConfig.getShareIcon()); | |
| 80 | -// | |
| 81 | -// this.showOther = showOther; | |
| 82 | -// this.showWjj = showWjj; | |
| 83 | -// this.bitmap = bitmap; | |
| 84 | -// | |
| 85 | -// config = ShareReleaseInfoUtil.ShareConfig.newInstance(); | |
| 86 | -// } | |
| 87 | -// | |
| 88 | -// | |
| 89 | -// @Override | |
| 90 | -// protected void onCreate(Bundle savedInstanceState) { | |
| 91 | -// super.onCreate(savedInstanceState); | |
| 92 | -// setContentView(R.layout.layout_share_dialog); | |
| 93 | -// Window window = getWindow(); | |
| 94 | -// window.setWindowAnimations(R.style.Animation_Bottom_Rising); | |
| 95 | -// | |
| 96 | -// shareRv = findViewById(R.id.share_rv); | |
| 97 | -// shareOther = findViewById(R.id.share_other); | |
| 98 | -// | |
| 99 | -// ll_cancle = findViewById(R.id.ll_cancle); | |
| 100 | -// ll_cancle.setOnClickListener(this); | |
| 101 | -// setViewLocation(); | |
| 102 | -// setCanceledOnTouchOutside(true);//外部点击取消 | |
| 103 | -// init(); | |
| 104 | -// | |
| 105 | -// } | |
| 106 | -// | |
| 107 | -// private List<IconInfo> initList() { | |
| 108 | -// List<IconInfo> lists = new ArrayList<>(); | |
| 109 | -// lists.add(new IconInfo(IconInfo.WECHAT_FRIEND, "微信好友", R.drawable.wechat)); | |
| 110 | -// lists.add(new IconInfo(IconInfo.WECHAT_CIRCLE, "微信朋友圈", R.drawable.pengyouquan)); | |
| 111 | -// lists.add(new IconInfo("DOWNLOAD_ALBUM", "保存到相册", R.drawable.download_album)); | |
| 112 | -// return lists; | |
| 113 | -// } | |
| 114 | -// | |
| 115 | -// private List<IconInfo> initListOther() { | |
| 116 | -// List<IconInfo> list = new ArrayList<>(); | |
| 117 | -// list.add(new IconInfo(IconInfo.WJJ_FRIEND, "网家家好友", R.drawable.wjjhaoyou)); | |
| 118 | -// list.add(new IconInfo(IconInfo.WJJ_CIRCLE, "生活圈", R.drawable.shenghuoquan)); | |
| 119 | -// list.add(new IconInfo(IconInfo.WECHAT_FRIEND, "微信好友", R.drawable.wechat)); | |
| 120 | -// list.add(new IconInfo(IconInfo.WECHAT_CIRCLE, "微信朋友圈", R.drawable.pengyouquan)); | |
| 121 | -// list.add(new IconInfo(IconInfo.QQ, "QQ好友", R.drawable.qq)); | |
| 122 | -// return list; | |
| 123 | -// } | |
| 124 | -// | |
| 125 | -// private void init() { | |
| 126 | -//// ((RadioButton) findViewById(R.id.rb_img)).setChecked(true); | |
| 127 | -// list.addAll(initList()); | |
| 128 | -// adapter = new ShareDialogListAdapter(mContext, list); | |
| 129 | -// adapter.setItemClick(this); | |
| 130 | -// LinearLayoutManager layoutManager1 = new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false); | |
| 131 | -// | |
| 132 | -// shareRv.setLayoutManager(layoutManager1); | |
| 133 | -// shareRv.setAdapter(adapter); | |
| 134 | -// | |
| 135 | -//// ((RadioGroup) findViewById(R.id.rd_group)).setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { | |
| 136 | -//// @Override | |
| 137 | -//// public void onCheckedChanged(RadioGroup group, int checkedId) { | |
| 138 | -//// if (checkedId == R.id.rb_img) { | |
| 139 | -//// list.clear(); | |
| 140 | -//// list.addAll(initList()); | |
| 141 | -//// adapter.notifyDataSetChanged(); | |
| 142 | -//// } else { | |
| 143 | -//// list.clear(); | |
| 144 | -//// list.addAll(initListOther()); | |
| 145 | -//// adapter.notifyDataSetChanged(); | |
| 146 | -//// } | |
| 147 | -//// } | |
| 148 | -//// }); | |
| 149 | -// } | |
| 150 | -// | |
| 151 | -// | |
| 152 | -// @Override | |
| 153 | -// public void onClick(View v) { | |
| 154 | -// int i = v.getId(); | |
| 155 | -// if (i == R.id.ll_cancle) { | |
| 156 | -// cancel(); | |
| 157 | -// } | |
| 158 | -// } | |
| 159 | -// | |
| 160 | -// /** | |
| 161 | -// * 设置dialog位于屏幕底部 | |
| 162 | -// */ | |
| 163 | -// private void setViewLocation() { | |
| 164 | -// DisplayMetrics dm = new DisplayMetrics(); | |
| 165 | -// mContext.getWindowManager().getDefaultDisplay().getMetrics(dm); | |
| 166 | -// int height = dm.heightPixels; | |
| 167 | -// Window window = this.getWindow(); | |
| 168 | -// WindowManager.LayoutParams lp = window.getAttributes(); | |
| 169 | -// lp.x = 0; | |
| 170 | -// lp.y = height; | |
| 171 | -// lp.width = ViewGroup.LayoutParams.MATCH_PARENT; | |
| 172 | -// lp.height = ViewGroup.LayoutParams.WRAP_CONTENT; | |
| 173 | -// // 设置显示位置 | |
| 174 | -// onWindowAttributesChanged(lp); | |
| 175 | -// } | |
| 176 | -// | |
| 177 | -// @Override | |
| 178 | -// public void onItemClick(int position, String type) { | |
| 179 | -// switch (type) { | |
| 180 | -// case IconInfo.WECHAT_FRIEND: | |
| 181 | -// ShareUtils.shareWechatPic(mContext,bitmap,true); | |
| 182 | -// dismiss(); | |
| 183 | -// break; | |
| 184 | -// case IconInfo.WECHAT_CIRCLE: | |
| 185 | -// ShareUtils.shareWechatPic(mContext,bitmap,false); | |
| 186 | -// dismiss(); | |
| 187 | -// break; | |
| 188 | -// case "DOWNLOAD_ALBUM": | |
| 189 | -// getPermissionsWithTip(); | |
| 190 | -// dismiss(); | |
| 191 | -// } | |
| 192 | -// } | |
| 193 | -// | |
| 194 | -// public int saveImageToGallery(Bitmap bmp) { | |
| 195 | -// //生成路径 | |
| 196 | -// String root = Environment.getExternalStorageDirectory().getAbsolutePath(); | |
| 197 | -// String dirName = "erweima16"; | |
| 198 | -// File appDir = new File(root , dirName); | |
| 199 | -// if (!appDir.exists()) { | |
| 200 | -// appDir.mkdirs(); | |
| 201 | -// } | |
| 202 | -// | |
| 203 | -// //文件名为时间 | |
| 204 | -// long timeStamp = System.currentTimeMillis(); | |
| 205 | -// SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |
| 206 | -// String sd = sdf.format(new Date(timeStamp)); | |
| 207 | -// String fileName = sd + ".jpg"; | |
| 208 | -// | |
| 209 | -// //获取文件 | |
| 210 | -// File file = new File(appDir, fileName); | |
| 211 | -// FileOutputStream fos = null; | |
| 212 | -// try { | |
| 213 | -// fos = new FileOutputStream(file); | |
| 214 | -// bmp.compress(Bitmap.CompressFormat.JPEG, 100, fos); | |
| 215 | -// fos.flush(); | |
| 216 | -// //通知系统相册刷新 | |
| 217 | -// mContext.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, | |
| 218 | -// Uri.fromFile(new File(file.getPath())))); | |
| 219 | -// return 2; | |
| 220 | -// } catch (FileNotFoundException e) { | |
| 221 | -// e.printStackTrace(); | |
| 222 | -// } catch (IOException e) { | |
| 223 | -// e.printStackTrace(); | |
| 224 | -// } finally { | |
| 225 | -// try { | |
| 226 | -// if (fos != null) { | |
| 227 | -// fos.close(); | |
| 228 | -// } | |
| 229 | -// } catch (IOException e) { | |
| 230 | -// e.printStackTrace(); | |
| 231 | -// } | |
| 232 | -// } | |
| 233 | -// return -1; | |
| 234 | -// } | |
| 235 | -// | |
| 236 | -// | |
| 237 | -// public void getPermissionsWithTip() { | |
| 238 | -// mPermissionsUtils | |
| 239 | -// .setPermissionsListener(new PermissionsListener() { | |
| 240 | -// @Override | |
| 241 | -// public void onDenied(String[] deniedPermissions) { | |
| 242 | -// getPermissionsWithTip(); | |
| 243 | -// } | |
| 244 | -// | |
| 245 | -// @Override | |
| 246 | -// public void onGranted() { | |
| 247 | -// //判断GPS是否开启 | |
| 248 | -// saveImageToGallery(bitmap); | |
| 249 | -// } | |
| 250 | -// }) | |
| 251 | -// .withActivity(mContext) | |
| 252 | -// .getPermissions(mContext | |
| 253 | -// , 100 | |
| 254 | -// , Manifest.permission.WRITE_EXTERNAL_STORAGE | |
| 255 | -// , Manifest.permission.READ_EXTERNAL_STORAGE | |
| 256 | -// ); | |
| 257 | -// } | |
| 258 | -} | |
| 259 | 0 | \ No newline at end of file |
moudle_pedometer/src/main/res/drawable-hdpi/download_album.png deleted
100644 → 0
2.76 KB
moudle_pedometer/src/main/res/drawable-xhdpi/download_album.png deleted
100644 → 0
3.09 KB
moudle_pedometer/src/main/res/drawable-xxhdpi/download_album.png deleted
100644 → 0
5.87 KB
moudle_pedometer/src/main/res/layout/activity_share_record.xml
| ... | ... | @@ -219,7 +219,7 @@ |
| 219 | 219 | android:layout_height="wrap_content" |
| 220 | 220 | android:gravity="left" |
| 221 | 221 | android:textColor="#333333" |
| 222 | - android:lines="2" | |
| 222 | + android:maxLines="2" | |
| 223 | 223 | android:textSize="12sp" /> |
| 224 | 224 | |
| 225 | 225 | <LinearLayout |
| ... | ... | @@ -240,6 +240,7 @@ |
| 240 | 240 | android:textSize="10sp" /> |
| 241 | 241 | |
| 242 | 242 | <EditText |
| 243 | + android:id="@+id/edit" | |
| 243 | 244 | android:layout_width="match_parent" |
| 244 | 245 | android:layout_height="wrap_content" |
| 245 | 246 | android:layout_below="@id/tv_tv" |
| ... | ... | @@ -247,13 +248,14 @@ |
| 247 | 248 | android:hint="点击这里写下你的心情标签心情标签心情标签最多两行" |
| 248 | 249 | android:textColor="#999999" |
| 249 | 250 | android:background="@null" |
| 250 | - android:lines="2" | |
| 251 | + android:maxLines="2" | |
| 251 | 252 | android:textSize="10sp" /> |
| 252 | 253 | </LinearLayout> |
| 253 | 254 | </RelativeLayout> |
| 254 | 255 | |
| 255 | 256 | |
| 256 | 257 | <ImageView |
| 258 | + android:id="@+id/down_img" | |
| 257 | 259 | android:layout_width="0dp" |
| 258 | 260 | android:layout_height="wrap_content" |
| 259 | 261 | android:layout_weight="1" | ... | ... |
moudle_pedometer/src/main/res/layout/layout_share_dialog.xml deleted
100644 → 0
| 1 | -<?xml version="1.0" encoding="utf-8"?> | |
| 2 | -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | - xmlns:zhy="http://schemas.android.com/apk/res-auto" | |
| 4 | - android:layout_width="match_parent" | |
| 5 | - android:layout_height="match_parent" | |
| 6 | - android:background="@color/white" | |
| 7 | - android:orientation="vertical"> | |
| 8 | - | |
| 9 | - <RadioGroup | |
| 10 | - android:id="@+id/rd_group" | |
| 11 | - android:layout_width="match_parent" | |
| 12 | - android:layout_height="wrap_content" | |
| 13 | - android:layout_marginTop="20dp" | |
| 14 | - android:orientation="horizontal" | |
| 15 | - android:visibility="gone" | |
| 16 | - android:weightSum="2"> | |
| 17 | - | |
| 18 | - <RadioButton | |
| 19 | - android:id="@+id/rb_img" | |
| 20 | - android:layout_width="wrap_content" | |
| 21 | - android:layout_height="wrap_content" | |
| 22 | - android:layout_weight="1" | |
| 23 | - android:padding="10dp" | |
| 24 | - android:text="分享图片" | |
| 25 | - android:layout_marginLeft="50dp" | |
| 26 | - style="@style/button_tag_style"/> | |
| 27 | - | |
| 28 | - <RadioButton | |
| 29 | - android:id="@+id/rb_address" | |
| 30 | - android:layout_width="wrap_content" | |
| 31 | - android:layout_height="wrap_content" | |
| 32 | - android:layout_weight="1" | |
| 33 | - android:padding="10dp" | |
| 34 | - style="@style/button_tag_style" | |
| 35 | - android:text="分享链接"/> | |
| 36 | - | |
| 37 | - </RadioGroup> | |
| 38 | - | |
| 39 | - <android.support.v7.widget.RecyclerView | |
| 40 | - android:id="@+id/share_rv" | |
| 41 | - android:layout_width="match_parent" | |
| 42 | - android:layout_height="wrap_content" | |
| 43 | - android:layout_marginTop="10dp"/> | |
| 44 | - | |
| 45 | - <View | |
| 46 | - android:layout_width="match_parent" | |
| 47 | - android:layout_height="0.5dp" | |
| 48 | - android:background="#EAEAEA" /> | |
| 49 | - | |
| 50 | - <android.support.v7.widget.RecyclerView | |
| 51 | - android:id="@+id/share_other" | |
| 52 | - android:layout_width="match_parent" | |
| 53 | - android:layout_height="wrap_content" | |
| 54 | - android:visibility="gone" /> | |
| 55 | - | |
| 56 | - <View | |
| 57 | - android:id="@+id/line" | |
| 58 | - android:layout_width="match_parent" | |
| 59 | - android:layout_height="0.5dp" | |
| 60 | - android:background="#EAEAEA" | |
| 61 | - android:visibility="gone" /> | |
| 62 | - | |
| 63 | - <LinearLayout | |
| 64 | - android:id="@+id/ll_cancle" | |
| 65 | - android:layout_width="match_parent" | |
| 66 | - android:layout_height="wrap_content" | |
| 67 | - android:layout_gravity="center_horizontal" | |
| 68 | - android:gravity="center" | |
| 69 | - android:padding="16dp"> | |
| 70 | - | |
| 71 | - <TextView | |
| 72 | - android:layout_width="wrap_content" | |
| 73 | - android:layout_height="wrap_content" | |
| 74 | - android:text="取消" | |
| 75 | - android:textColor="#ff2c2c2d" | |
| 76 | - android:textSize="16sp" /> | |
| 77 | - | |
| 78 | - </LinearLayout> | |
| 79 | - | |
| 80 | -</LinearLayout> | |
| 81 | 0 | \ No newline at end of file |