- JAR with all compiled classes and resources
- Manifest file with properly configured main class and generated class path
- all dependencies
This problem could be easily solved with Apache Maven build manager.
Paste your text here.<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent" android:layout_width="fill_parent"
android:orientation="vertical"
>
<ScrollView android:id="@+id/ScrollView01" android:layout_weight="1" android:layout_height="wrap_content" android:layout_width="wrap_content">
<TableLayout android:id="@+id/TableLayout01" android:layout_width="fill_parent" android:layout_weight="1" android:layout_height="fill_parent" android:stretchColumns="0,1">
<TableRow android:id="@+id/TableRow01" android:layout_height="wrap_content" android:fitsSystemWindows="true" android:layout_width="fill_parent">
<CheckBox android:id="@+id/CheckBox01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/flyer_01" android:gravity="bottom"></CheckBox>
<CheckBox android:id="@+id/CheckBox02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/flyer_02" android:gravity="bottom"></CheckBox>
</TableRow>
<TableRow android:id="@+id/TableRow02" android:layout_height="wrap_content" android:fitsSystemWindows="true" android:layout_width="fill_parent">
<CheckBox android:id="@+id/CheckBox03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/flyer_03" android:gravity="bottom"></CheckBox>
<CheckBox android:id="@+id/CheckBox04" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/flyer_04" android:gravity="bottom"></CheckBox>
</TableRow>
<TableRow android:id="@+id/TableRow02" android:layout_height="wrap_content" android:fitsSystemWindows="true" android:layout_width="fill_parent">
<CheckBox android:id="@+id/CheckBox05" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/flyer_05" android:gravity="bottom"></CheckBox>
<CheckBox android:id="@+id/CheckBox06" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/flyer_06" android:gravity="bottom"></CheckBox>
</TableRow>
</TableLayout></ScrollView><LinearLayout android:id="@+id/LinearLayout01" android:layout_height="wrap_content" android:layout_width="fill_parent"><TextView android:id="@+id/TextView01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Add to:"></TextView>
<Spinner android:id="@+id/Spinner01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1"></Spinner>
<ImageButton android:id="@+id/ImageButton01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/add_to_list" android:onClick="onAddToList"></ImageButton>
</LinearLayout>
</LinearLayout>
xml version="1.0" encoding="utf-8"?>Более подробно можно почитать в документации по ImageButton. Обработка событий Здесь я использовал следующий подход. Каждый компонент типа View содержит атрибут android:onClick. Его значение - это строка, которая определяет метод в данном контексте (обычно текущая активность), который будет вызван при нажатии на этот компонент. Для кнопок этот подход тоже работает. Чтобы им воспользоваться необходимо:xmlns:android="http://schemas.android.com/apk/res/android"> - android:state_pressed="true" android:drawable="@drawable/button_pressed" />
- android:state_focused="true" android:drawable="@drawable/button_focused" />
- android:drawable="@drawable/button_normal" />
private final class ItemRowBinder implements SimpleCursorAdapter.ViewBinder {
private static final String TAG = "ItemRowBinder";
@Override
public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
switch (view.getId()) {
case R.id.ImageButtonDelete: {
view.setTag(Long.valueOf(cursor.getLong(columnIndex)));
return true;
}
}
return false;
}
}
Конечно надо не забыть указать привязку поля с ID и компонента кнопки в конструкторе SimpleCursorAdapter.
Isolation levels provide a degree of control of the effects one transaction can have on another concurrent transaction. Since concurrent effects are determined by the precise ways in which, a particular database handle locks and its drivers may handle these locks differently.
Isolation level | Phantom records | Non-repeatable reads | Dirty reads | Deadlocks |
Serializable | - | - | - | + |
Repeatable read | + | - | - | - |
Read committed | + | + | - | - |
Read uncommitted | + | + | + | - |
Strongest level of isolation. Places a range locks on the data set, preventing other users from updating or inserting rows into the data set until the transaction is complete. Can produce deadlocks.
Locks are placed on all data that is used in a query, preventing other users from updating the data, but new phantom records can be inserted into the data set by another user and are included in later reads in the current transaction.
Can't read uncommitted data by another transactions. Shared locks are held while the data is being read to avoid dirty reads, but the data can be changed before the end of the transaction resulting in non-repeatable reads and phantom records.
Can read uncommitted data (dirty reads) by another transaction, and non-repeatable read and phantom records are possible. Least restrictive of all isolation levels. No shared locks are issued and no exclusive locks are honoured.
As the transaction isolation level increases, likely performance degradation follows, as additional locks are required to protect data integrity. If the underlying data doesn't require such a high degree of integrity, the isolation level can be lowered to improve performance.
This post is created with OpenOffice.org.
We're very excited to announce the immediate availability of the JavaFX 1.3 platform. This release represents an important upgrade to the product and delivers a range of performance and functional improvements, including: * New and enhanced support for UI controls, CSS skinning, and programmatic layout * Performance improvements in the JavaFX Runtime * New NetBeans IDE 6.9 Beta with improved editing and an updated JavaFX Composer plug-in * New features and enhanced performance in JavaFX Production Suite * A native JavaFX font family called Amble * Support for the development of TV applications, including a new TV emulator * Availability of the mobile emulator on the Mac platformI'm going to give it a very last try. If this technology is still unusable for the real-life applications, then I will never look at it again! More details at the official site.
It is a great pleasure to announce the availability of the final release or version 6.0 of Substance look-and-feel (code-named Sonoma). The release notes for version 6.0 contain the detailed information on the contents of this release which include the following: * Multi-state animated transitions * New look for text based components (text fields, combo boxes, spinners, date pickers) * Custom component states * Support for drop locationFor more detail see official site... Animations in Substance 6.0 are powered by the Trident animation library. You will need to add the matching Trident jar to your classpath. Substance 6.0 is using version 1.2 of Trident which can be downloaded from the main Trident download area or from the Substance 6.0 download area.
import sun.net.www.protocol.http.AuthCache;
import sun.net.www.protocol.http.AuthCacheValue;
.....
AuthCacheValue.setAuthCache(new AuthCache() {
public void remove(String arg0, AuthCacheValue arg1) {
}
public void put(String arg0, AuthCacheValue arg1) {
}
public AuthCacheValue get(String arg0, String arg1) {
return null;
}
});
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new MyPasswordAuthentication(...);
}
});
In this case no credential are cached at all. It works for me. If you know another way to disable caching of credentials, please share it with me.