小编kan*_*ert的帖子

自定义ListView上的setOnItemClickListener

我有一个习惯ListView.这ListView包含1个图像和6个TextView.要检索我创建的值setOnItemClickListener(...).每当我点击我ListView怎样才能真正从6 TextView中检索所有数据?

android listview

24
推荐指数
3
解决办法
13万
查看次数

解密错误:Pad块损坏

我有以下代码.

    byte[] input = etInput.getText().toString().getBytes();
    byte[] keyBytes = new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
        0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 };

    SecretKeySpec key = new SecretKeySpec(keyBytes, "AES");

    Cipher cipher = Cipher.getInstance("AES/ECB/PKCS7Padding", "BC");

    // encryption pass
    cipher.init(Cipher.ENCRYPT_MODE, key);

    byte[] cipherText = new byte[cipher.getOutputSize(input.length)];
    int ctLength = cipher.update(input, 0, input.length, cipherText, 0);
    ctLength += cipher.doFinal(cipherText, ctLength);

    cipher.init(Cipher.DECRYPT_MODE, key);
    byte[] plainText = new byte[cipher.getOutputSize(ctLength)];
    int ptLength = cipher.update(cipherText, …
Run Code Online (Sandbox Code Playgroud)

java encryption android

7
推荐指数
2
解决办法
3万
查看次数

可包裹类

我在下面有一堂课,想实现 Parcelable。我遇到了错误。请指教。

 in.readValue(row);
Run Code Online (Sandbox Code Playgroud)

错误信息:Parcel 类型中的 readValue(ClassLoader) 方法不适用于参数 (ArrayList)

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;

import android.os.Parcel;
import android.os.Parcelable;

public class cls_datatable implements Parcelable {
private ArrayList<String> column = new ArrayList<String>();
private ArrayList<cls_datarow> row = new ArrayList<cls_datarow>();
private int indexCounter = 0;
private Hashtable<Integer, Integer> IDnIndex = new Hashtable<Integer, Integer>();

public cls_datatable(Parcel in) {
    readFromParcel(in);
}

public class cls_datarow {

    private ArrayList<String> columnValues;
    private int id;

    public cls_datarow(int id) {
        this.id = id;
        columnValues = new ArrayList<String>();
        for (int …
Run Code Online (Sandbox Code Playgroud)

android

0
推荐指数
1
解决办法
2964
查看次数

标签 统计

android ×3

encryption ×1

java ×1

listview ×1