登录
首页 » Java » 微信小程序:电商源码

微信小程序:电商源码

于 2021-12-08 发布
0 160
下载积分: 1 下载次数: 1

代码说明:

微信小程序:电商源码

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • android中ExpandableListView用法的一个简单实例 附效果图
    喜欢显示好友QQ那样的列表,可以展开,可以收起,在android中,以往用的比较多的是listview,虽然可以实现列表的展示,但在某些情况下,我们还是希望用到可以分组并实现收缩的列表,那就要用到android的ExpandableListView,今天研究了一下这个的用法,也参考了很多资料动手写了一个小demo,实现了基本的功能,但界面优化方面做得还不够好,有待改进,素材采用了Q版三国杀武将的图片,很有爱哈哈,下面直接上效果图以及源代码~!
    2013-03-07下载
    积分:1
  • umeng统计代码 实例源码源码下载
    各种android app操作的统计,支持fragment 
    2015-04-11下载
    积分:1
  • 远程视频监控
    【核心代码】 public interface CameraSource {  static final String LOG_TAG = "camera";  /**  * Open the camera source for subsequent use via calls to capture().  *   * @return true if the camera source was successfully opened.  */  boolean open();  /**  * Close the camera source. Calling close on a closed CameraSource is  * permitted but has no effect. The camera source may be reopened after  * being closed.  */  void close();  /**  * The width of the captured image.  *   * @return the width of the capture in pixels  */  int getWidth();  /**  * The height of the captured image.  *   * @return the height of the capture in pixels  */  int getHeight();  /**  * Attempts to render the current camera view onto the supplied canvas.  * The capture will be rendered into the rectangle (0,0,width,height).  * Outstanding transformations on the canvas may alter this.  *   * @param canvas the canvas to which the captured pixel data will be written  * @return true iff a frame was successfully written to the canvas  */  boolean capture(Canvas canvas);  boolean saveImage(String savePath, String fileName); }
    2013-12-04下载
    积分:1
  • android 数字滚动 wheel示例源码下载
    android 数字滚动 wheel示例源码下载
    2014-07-24下载
    积分:1
  • 仿微信图片放大
    图片无限放大,不模糊,图片移动,仿微信图片放大
    2014-04-10下载
    积分:1
  • android 上传文件实例 附完整源码
    简单的上传实例,适合初学者,一看就懂
    2013-02-26下载
    积分:1
  • Android 签到系统源码
    Android 签到系统源码
    2016-02-29下载
    积分:1
  • android 仿微信浏览相册图片例子源码下载
    [实例简介] 仿微信浏览相册图片, 相册浏览 [实例截图] [核心代码]import java.io.File;import java.io.FilenameFilter;import java.util.ArrayList;import java.util.Arrays;import java.util.HashSet;import java.util.List;import android.app.Activity;import android.app.ProgressDialog;import android.content.ContentResolver;import android.database.Cursor;import android.net.Uri;import android.os.Bundle;import android.os.Environment;import android.os.Handler;import android.provider.MediaStore;import android.util.DisplayMetrics;import android.util.Log;import android.view.LayoutInflater;import android.view.View;import android.view.View.OnClickListener;import android.view.ViewGroup.LayoutParams;import android.view.WindowManager;import android.widget.GridView;import android.widget.PopupWindow.OnDismissListener;import android.widget.RelativeLayout;import android.widget.TextView;import android.widget.Toast;import com.zhy.bean.ImageFloder;import com.zhy.imageloader.ListImageDirPopupWindow.OnImageDirSelected;public class MainActivity extends Activity implements OnImageDirSelected{ private ProgressDialog mProgressDialog; /** * 存储文件夹中的图片数量 */ private int mPicsSize; /** * 图片数量最多的文件夹 */ private File mImgDir; /** * 所有的图片 */ private List mImgs; private GridView mGirdView; private MyAdapter mAdapter; /** * 临时的辅助类,用于防止同一个文件夹的多次扫描 */ private HashSet mDirPaths = new HashSet(); /** * 扫描拿到所有的图片文件夹 */ private List mImageFloders = new ArrayList(); private RelativeLayout mBottomLy; private TextView mChooseDir; private TextView mImageCount; int totalCount = 0; private int mScreenHeight; private ListImageDirPopupWindow mListImageDirPopupWindow; private Handler mHandler = new Handler() { public void handleMessage(android.os.Message msg) { mProgressDialog.dismiss(); // 为View绑定数据 data2View(); // 初始化展示文件夹的popupWindw initListDirPopupWindw(); } }; /** * 为View绑定数据 */ private void data2View() { if (mImgDir == null) { Toast.makeText(getApplicationContext(), "擦,一张图片没扫描到", Toast.LENGTH_SHORT).show(); return; } mImgs = Arrays.asList(mImgDir.list()); /** * 可以看到文件夹的路径和图片的路径分开保存,极大的减少了内存的消耗; */ mAdapter = new MyAdapter(getApplicationContext(), mImgs, R.layout.grid_item, mImgDir.getAbsolutePath()); mGirdView.setAdapter(mAdapter); mImageCount.setText(totalCount "张"); }; /** * 初始化展示文件夹的popupWindw */ private void initListDirPopupWindw() { mListImageDirPopupWindow = new ListImageDirPopupWindow( LayoutParams.MATCH_PARENT, (int) (mScreenHeight * 0.7), mImageFloders, LayoutInflater.from(getApplicationContext()) .inflate(R.layout.list_dir, null)); mListImageDirPopupWindow.setOnDismissListener(new OnDismissListener() { @Override public void onDismiss() { // 设置背景颜色变暗 WindowManager.LayoutParams lp = getWindow().getAttributes(); lp.alpha = 1.0f; getWindow().setAttributes(lp); } }); // 设置选择文件夹的回调 mListImageDirPopupWindow.setOnImageDirSelected(this); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); DisplayMetrics outMetrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(outMetrics); mScreenHeight = outMetrics.heightPixels; initView(); getImages(); initEvent(); } /** * 利用ContentProvider扫描手机中的图片,此方法在运行在子线程中 完成图片的扫描,最终获得jpg最多的那个文件夹 */ private void getImages() { if (!Environment.getExternalStorageState().equals( Environment.MEDIA_MOUNTED)) { Toast.makeText(this, "暂无外部存储", Toast.LENGTH_SHORT).show(); return; } // 显示进度条 mProgressDialog = ProgressDialog.show(this, null, "正在加载..."); new Thread(new Runnable() { @Override public void run() { String firstImage = null; Uri mImageUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI; ContentResolver mContentResolver = MainActivity.this .getContentResolver(); // 只查询jpeg和png的图片 Cursor mCursor = mContentResolver.query(mImageUri, null, MediaStore.Images.Media.MIME_TYPE "=? or " MediaStore.Images.Media.MIME_TYPE "=?", new String[] { "image/jpeg", "image/png" }, MediaStore.Images.Media.DATE_MODIFIED); Log.e("TAG", mCursor.getCount() ""); while (mCursor.moveToNext()) { // 获取图片的路径 String path = mCursor.getString(mCursor .getColumnIndex(MediaStore.Images.Media.DATA)); Log.e("TAG", path); // 拿到第一张图片的路径 if (firstImage == null) firstImage = path; // 获取该图片的父路径名 File parentFile = new File(path).getParentFile(); if (parentFile == null) continue; String dirPath = parentFile.getAbsolutePath(); ImageFloder imageFloder = null; // 利用一个HashSet防止多次扫描同一个文件夹(不加这个判断,图片多起来还是相当恐怖的~~) if (mDirPaths.contains(dirPath)) { continue; } else { mDirPaths.add(dirPath); // 初始化imageFloder imageFloder = new ImageFloder(); imageFloder.setDir(dirPath); imageFloder.setFirstImagePath(path); } int picSize = parentFile.list(new FilenameFilter() { @Override public boolean accept(File dir, String filename) { if (filename.endsWith(".jpg") || filename.endsWith(".png") || filename.endsWith(".jpeg")) return true; return false; } }).length; totalCount = picSize; imageFloder.setCount(picSize); mImageFloders.add(imageFloder); if (picSize > mPicsSize) { mPicsSize = picSize; mImgDir = parentFile; } } mCursor.close(); // 扫描完成,辅助的HashSet也就可以释放内存了 mDirPaths = null; // 通知Handler扫描图片完成 mHandler.sendEmptyMessage(0x110); } }).start(); } /** * 初始化View */ private void initView() { mGirdView = (GridView) findViewById(R.id.id_gridView); mChooseDir = (TextView) findViewById(R.id.id_choose_dir); mImageCount = (TextView) findViewById(R.id.id_total_count); mBottomLy = (RelativeLayout) findViewById(R.id.id_bottom_ly); } private void initEvent() { /** * 为底部的布局设置点击事件,弹出popupWindow */ mBottomLy.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { mListImageDirPopupWindow .setAnimationStyle(R.style.anim_popup_dir); mListImageDirPopupWindow.showAsDropDown(mBottomLy, 0, 0); // 设置背景颜色变暗 WindowManager.LayoutParams lp = getWindow().getAttributes(); lp.alpha = .3f; getWindow().setAttributes(lp); } }); } @Override public void selected(ImageFloder floder) { mImgDir = new File(floder.getDir()); mImgs = Arrays.asList(mImgDir.list(new FilenameFilter() { @Override public boolean accept(File dir, String filename) { if (filename.endsWith(".jpg") || filename.endsWith(".png") || filename.endsWith(".jpeg")) return true; return false; } })); /** * 可以看到文件夹的路径和图片的路径分开保存,极大的减少了内存的消耗; */ mAdapter = new MyAdapter(getApplicationContext(), mImgs, R.layout.grid_item, mImgDir.getAbsolutePath()); mGirdView.setAdapter(mAdapter); // mAdapter.notifyDataSetChanged(); mImageCount.setText(floder.getCount() "张"); mChooseDir.setText(floder.getName()); mListImageDirPopupWindow.dismiss(); }}
    2015-04-08下载
    积分:1
  • android 自定义对话框 实例源码下载
    android 自定义对话框 实例源码下载
    2014-08-21下载
    积分:1
  • android 猜扑克 洗牌小游戏 实例 附完整源码下载
    android 猜扑克牌游戏 猜中有鼓励 供大家学习哦
    2013-03-16下载
    积分:1
  • 696518资源总数
  • 104269会员总数
  • 42今日下载