上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 31 下一页
摘要: Expandablelistview1Activity.javapackage com.wangzhu.demoexpandablelistview;import java.util.ArrayList;import java.util.HashMap;import java.util.List;i... 阅读全文
posted @ 2014-04-27 12:57 qingyezhu 阅读(321) 评论(0) 推荐(0)
摘要: list_item.xml listview.xml ViewHolder.javapackage com.wangzhu.demoselect... 阅读全文
posted @ 2014-04-26 19:10 qingyezhu 阅读(652) 评论(0) 推荐(0)
摘要: listview0.xml list_item_0.xml list_item_bg_selector.xml使用了 android:state_activated属... 阅读全文
posted @ 2014-04-26 19:06 qingyezhu 阅读(527) 评论(0) 推荐(0)
摘要: listview_color.xml aa.javapackage com.wangzhu.demoselector;import android.app.Activity;import android.os.Bundle;import android.widget.ArrayAdap... 阅读全文
posted @ 2014-04-26 19:01 qingyezhu 阅读(920) 评论(0) 推荐(0)
摘要: Java核心代码:package com.example.demolistview1;import android.app.ListActivity;import android.os.Bundle;import android.view.View;import android.widget.Arr... 阅读全文
posted @ 2014-04-04 10:39 qingyezhu 阅读(324) 评论(0) 推荐(0)
摘要: 代码:package com.wangzhu.linkedlist;public class LinkedListDemo { /** * @param args */ public static void main(String[] args) { LinkedList linkedList = new LinkedList(); Node head = null; Node reverseHead = null; // 链表长度为0 head = new Node(); for ... 阅读全文
posted @ 2014-03-31 11:44 qingyezhu 阅读(880) 评论(0) 推荐(0)
摘要: 代码如下:package com.wangzhu.arrays;import java.util.Arrays;import java.util.Collections;public class ArraysDemo { /** * @param args */ public static void main(String[] args) { Dog[] dogs = new Dog[] { new Dog(5), new Dog(2), new Dog(19), new Dog(21), new Dog(12), new... 阅读全文
posted @ 2014-03-30 15:21 qingyezhu 阅读(237) 评论(0) 推荐(0)
摘要: 除了一个出现1次,其他的数字都出现了3次,找出出现1次的数字 32位的二进制中,每一位要么是0,要么是1; 对于数组中的元素,每一个元素其某一位出现1的次数的和,肯定是3N或3N+1次,则次数和对3取模必定是只出现1次的元素在该位的值,即是0或1。 代码: 方法二: 阅读全文
posted @ 2014-03-29 00:54 qingyezhu 阅读(168) 评论(0) 推荐(0)
摘要: 代码:/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) { * val = x; * next = null; * } * } */public class Solution { public ListNode addTwoNumbers(ListNode l1, ListNode l2) { ListNode result ... 阅读全文
posted @ 2014-03-28 23:48 qingyezhu 阅读(195) 评论(0) 推荐(0)
摘要: 源代码:import java.util.Arrays;public class Solution { public int[] twoSum(int[] numbers, int target) { int[] results = new int[2]; int len = numbers.length; Node[] nodes = new Node[len]; for (int i = 0; i nodes[j + 1].value) { tempNode = nodes[j]; ... 阅读全文
posted @ 2014-03-28 23:17 qingyezhu 阅读(137) 评论(0) 推荐(0)
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 31 下一页