- 博客(25)
- 收藏
- 关注
转载 懒汉单例
public class RetrofitManager { private static final String BASE_URL = "http://www.zhaoapi.cn/"; private static Retrofit retrofit; private static final class SINGLE_INSTANCE { pri...
2018-11-23 08:04:39 87
转载 上传头像、相机、相册
EventBus.getDefault().postSticky(list.getData().getUsername()); https://blog.csdn.net/bai1452789545/article/details/82594709友盟第三方集成http://www.jcodecraeer.com/a/anzhuokai...
2018-11-23 07:54:14 105
转载 流式布局
自定义 布局;;;;package soexample.umeng.com.zfx001;import android.content.Context;import android.util.AttributeSet;import android.view.View;import android.view.ViewGroup;/** * Created by TP-PC on...
2018-10-26 07:50:58 106
翻译 cart
自定义加减器;;;;private int num;public void setNum(int num) { this.num = num; tvNum.setText(num + "");}public int getNum() { return num;}@Overridepublic void onClick(View v) { swi...
2018-10-26 07:46:38 93
转载 单例////okHttp
private static volatile HttpUtils instance;private OkHttpClient client;private Handler handler = new Handler();private HttpUtils() { client = new OkHttpClient();}public static HttpUtils ...
2018-10-14 21:16:15 116
转载 WaveView -------
private void init() { //new 出一个画笔 paint1 = new Paint(); //设置画笔颜色 paint1.setColor(Color.WHITE); // 设置抗锯齿 paint1.setAntiAlias(true); // 填充 或 空 FILL - STROKE paint1.set...
2018-10-07 21:17:33 1548
原创 判断网络、数据库、putorefresh
判断网络 ::::::public class NetUtils { public static boolean isNetAvailable(Context context) { ConnectivityManager manager = (ConnectivityManager) context.getSystemService(Context.CONNECTI...
2018-09-24 19:34:02 105
翻译 数据库整理
BaseActivity previewAction(); setContentView(getContentView()); initView(); initData(); setListener(); setMoreAction();Fragment:::::public View onCreateV...
2018-09-21 11:47:28 86
原创 知识点整理
TabLayout 的使用:::定义List集合 ,集合添加数据,tabNews.setTabMode(TabLayout.MODE_FIXED);tabNews.setTabTextColors(ColorStateList.valueOf(Color.BLACK));与ViewPager联合 适配器添加下面方法getPageTitle添加视图tabNews....
2018-09-16 14:55:55 119
转载 ImageLoader
if(Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)){ File rootSD = Environment.getExternalStorageDirectory(); file = new File(rootSD,"uio"); if(!file.exists()){ ...
2018-09-08 11:34:14 74
转载 HttpUtile
HttpUrl 请求:String result = "";try { URL url = new URL(urlString); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); conn...
2018-09-03 08:06:05 206
翻译 修改
<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <title></title> <script src="js/angular.min.js" type="text/javascript" charset
2018-07-01 20:26:32 106
转载 添加
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <script src="js/angular.min.js" type="text/javascript" charset=&
2018-07-01 19:46:24 118
原创 bs
<input type="checkbox" onclick="c1(this)"/> //选中改变颜色 function c1(v){ if(v.checked){ $(v).parent().parent().css("background-color","hotpink"); }else{ $(v).parent().paren...
2018-06-29 11:22:07 171
转载 ^^
<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <title></title> <script src="js/angular.min.js" type="text/javascript" charset
2018-06-29 10:57:00 90
转载 mi
<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <title></title> <script src="js/jquery-3.2.1.min.js" type="text/javascript" ch
2018-06-29 10:38:20 155
转载 点菜
<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <title></title> <script src="js/angular.min.js" type="text/javascript" charset
2018-06-29 10:36:55 192
转载 发货 二级
<td> <span ng-show="x.state=='已发货'" style="background-color: yellow;">{{x.state}}</span> <input ng-show="x.state=='未发货'" style="background-color: red;" type
2018-06-29 10:33:27 125
转载 全选 ---- 添加验证
<th><input type="checkbox" ng-model="qq" ng-click="all()"/></th><td><input type="checkbox" ng-model="x.qx"/></td>//全选
2018-06-29 10:13:20 60
原创 正序倒序
<tr ng-repeat="g in goods | filter:{gname:name,tel:sj,state:fh} | orderBy:oid"><input type="button" value="^" ng-click="kk()"/>var ids = true; $scope.kk = function(){ if(ids){
2018-06-25 16:02:37 239
翻译 删除与数据清空
<button ng-click="kk()">清空购物车</button>//清空数据$scope.kk=function(){ $scope.shops=""; }<input type="button" name="" id="" value="删除" ng-click="del($index)
2018-06-25 15:11:46 129
转载 ng-过滤器|排序
<input type="text" placeholder="输入商品名" ng-model="name"/> <select ng-model="price"> <option value="">按单价排序</option> <option value="
2018-06-25 15:05:52 78
转载 ng——显示数据
<tr ng-repeat="x in shops | filter:{gname:name} | orderBy:price" id="t"> <td>{{x.gid}}</td> <td>{{x.gname}}</td> <td> <input type=&q
2018-06-25 15:04:34 330
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人