<ImageView android:layout_width="60dp" android:layout_height="60dp" android:background="@drawable/button_share_1_pressed" /> button_share_1_pressed.xml <?xml version="1.0" encoding="UTF-8"?> &l…
首先搭建布局 主界面布局: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" > <LinearLa…
ImageView设置点击效果需要注意两点,第一个设置android:clickable="true",第二个 <item android:drawable="@drawable/button_n"/>属性必须放到最后才能生效 <?xml version="1.0" encoding="utf-8"?><!--发现大类列表项--> <ImageView xmlns:android=&q…
今天在使用自定义圆形imageview的时候,想利用其点击事件来实现查看个人资料功能,但是该空间在Activity中的onCreate方法中调用点击事件总是出现空指针异常,每次程序都进不去主页面,到处查,和同学商量,还是没有解决,最后还是看到了网友的一句话: 控件A是在子布局中使用的控件,如果子布局未能成功加载,A也无法使用 意思也就是,如果 子布局在初始化界面的时候没有加载,但是你要用子布局中的控件,肯定是行不通的,所以要先在加载子布局之后实例化控件,然后定义各种操作: 下面给出我的例子: 这…
-------------------------------Dog类--------------- publicclass Dog implements Serializable{ privatestaticfinallongserialVersionUID = 1L; private String dname; privateintdage; private String say; ----------------------------------------------------Per…
(不是大神,没有几百子项目,去你丫的) private int last_item_position ; @Override public void onItemClick(AdapterView<?> arg0, View view, int position, long arg3) { // 取消合成 mTts.stopSpeaking(); isSpeaking = 0; PoiList poiList = poiListList.get(position); List<Strin…
<div class="buttons"> <button id="katong">卡通</button>    <button id="jian">简约</button>    <button id="gufeng">古风</button> </div> <ul class="1"> <li…
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlkAAAHWCAIAAADLlAuAAAAgAElEQVR4nOzd5XNc157w+/l7bt2n6t…
if($('.icon-right img').src==null){ $('.span-gray').addClass('c8'); } <img> ///////////// <script> function change_pic(){ var imgObj = document.getElementById("caocao_pic"); )=="images/caocao.png"){ imgObj.src="images/…
后台: //生成验证码 public void CreateImage() { //获取4位验证码,并转成小写. ).ToLower(); //验证码赋值Cookie HttpCookie myCookie = new HttpCookie(Constant.LOGIN_VALIDATE_CODE); myCookie.Value = MD5Utils.getMD5(code); myCookie.Expires = DateTime.Now.AddMinutes(); Response.Coo…