Tag Archives: Your

Android Your content must have a ListView whose…

Android Your content must have a ListView whose id attribute is ‘android.R. id.list ‘solutions to errors

Listview plays an important role in Android development, and it is used in many occasions

Error prompt: your content must have a listview which ID attribute is’ Android. R id.list ‘

For the above error, it may be that we inherit liseactivity to monitor setonitemclick events in listview, but there is no listview tag. It has been said on the Internet that we only need to add the following code to the layout file:

<ListView

a<ListView android:id= “@ Android: ID/list” or android:id= “@id/ android:list ” android:layout_ width=”fill_ parent” android:layout_ height=”wrap_ content”&> </ListView&>
ndroid:id= “@ Android: ID/list” or android:id= “@id/ android:list ”

android:layout_ width=”fill_ parent”

android:layout_ height=”wrap_ content”&>

</ListView&>

However, if we want to implement a custom listview, that is, we will monitor the space in the listview through the baseadapter, then we just need to inherit the activity. But note that we use listview instead of inheriting listactivity. Therefore, we must remember to declare a listview object in the project and instantiate it, so that we can get the listview we want

Don’t worry. Don’t forget that we have our own instantiated listview. With this, we can call the setonitemclicklistener method. The details are as follows:

listView.setOnItemClickListener (new OnItemClickListener() {

@Override

public void onItemClick(AdapterView<?&> arg0, View arg1, int arg2,

long arg3) {

// TODO Auto-generated method stub

Log.i(“TAG”,”The Item has been clicked”);

}

});

listView.setOnItemClickListener (new OnItemClickListener() { @Override public void onItemClick(AdapterView<?&> arg0, View arg1, int arg2, long arg3) { // TODO Auto-generated method stub Log.i(“TAG”,”The Item has been clicked”); } });

At this time, we can still use the same construction method as the simpleadapter provided by the system to call our own customized baseadapter, as described before

Kali Linux 2.0 U disk installation error, unable to load CD-ROM

2. In the process of installing with USB flash disk, the CD-ROM cannot be mounted. Your installation CD-ROM could’t be mounted.

3. After Google search, we should refer to foreign methods.

4. The solution is obtained and the test is successful. As follows:

In the process of installing kali2.0, the penultimate installation interface (that is, the interface for selecting language, setting user name, password, partition, etc.) will have an execute a shell option.

After selecting execute a shell, there will be a window to execute the shell.

Step 1: DF – M

At this point, you will see the mount information, and the bottom is/dev/XYZ/media

This is the USB device mounted to/media, resulting in the CD-ROM can not be mounted.

Step 2: umount/media

The above foreign solution will continue to mount/dev/XYZ/CD-ROM

However, the local test does not need to be mounted by itself, and the installation program will be mounted by itself. It will cause grub installation failure later.

Step 3: exit

After exiting the command window, continue the installation.

Solve the problem of [newnullresponse] when updating MAC app store

This problem mostly occurs after you reload the system, because of the problems in the store area. The solution here is to clear the data and get it again.

Thank you to Josh from wings mills, because this method is provided by him. The original address is here: https://discussions.apple.com/message/23544639#23544639

No nonsense, just look at the steps

1) Exit app store

2) Open the activity monitor and search for “store”. Then force the following two processes to terminate:

A) com.apple.appstore .Plugin…;
B) storeagent,

3) Open the terminal, input the following command and execute it:

rm ~/Library/Preferences/ com.apple.appstore .plist

rm ~/Library/Preferences/ com.apple.storeagent .plist

rm -rf ~/Library/Preferences/ByHost/*

Note that the above three commands are executed one by one.

4) Open the app store again and everything is OK.

What if it’s not normal?Hammer it, of course, I will not be responsible for smashing, you have to buy again.