Android Samples
修订版 | 92af71bf0d1de6b9fc8087a4185e35cd9479e25c (tree) |
---|---|
时间 | 2014-06-13 04:58:08 |
作者 | Masahiko, SAWAI <say@user...> |
Commiter | Masahiko, SAWAI |
Chenged the package name of listview-single-choice-checkable-layout
@@ -1,7 +1,7 @@ | ||
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | 2 | <manifest |
3 | 3 | xmlns:android="http://schemas.android.com/apk/res/android" |
4 | - package="com.example.hello.android.checkable_layout_hello" | |
4 | + package="com.example.hello.android.listview_single_choice_checkable_layout" | |
5 | 5 | android:versionCode="1" |
6 | 6 | android:versionName="1.0" |
7 | 7 | > |
@@ -1,6 +1,6 @@ | ||
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | 2 | <view |
3 | - class="com.example.hello.android.checkable_layout_hello.CheckableLinearLayout" | |
3 | + class="com.example.hello.android.listview_single_choice_checkable_layout.CheckableLinearLayout" | |
4 | 4 | xmlns:android="http://schemas.android.com/apk/res/android" |
5 | 5 | android:layout_width="fill_parent" |
6 | 6 | android:layout_height="wrap_content" |
@@ -21,7 +21,7 @@ | ||
21 | 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
22 | 22 | * THE SOFTWARE. |
23 | 23 | */ |
24 | -package com.example.hello.android.checkable_layout_hello; | |
24 | +package com.example.hello.android.listview_single_choice_checkable_layout; | |
25 | 25 | |
26 | 26 | import android.content.Context; |
27 | 27 | import android.util.AttributeSet; |
@@ -21,7 +21,7 @@ | ||
21 | 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
22 | 22 | * THE SOFTWARE. |
23 | 23 | */ |
24 | -package com.example.hello.android.checkable_layout_hello; | |
24 | +package com.example.hello.android.listview_single_choice_checkable_layout; | |
25 | 25 | |
26 | 26 | import android.app.ListActivity; |
27 | 27 | import android.os.Bundle; |
@@ -105,8 +105,10 @@ public class MainActivity extends ListActivity | ||
105 | 105 | { |
106 | 106 | Map<String, String> userData = userList.get(checkedItemPosition); |
107 | 107 | String name = userData.get(MAPPING_KEY_NAME); |
108 | - Log.d(LOG_TAG, "checked user name => " + name); | |
109 | - Toast.makeText(this, "checked user name => " + name, Toast.LENGTH_SHORT).show(); | |
108 | + String email = userData.get(MAPPING_KEY_EMAIL); | |
109 | + String message = String.format("Checked User : name => %s, email => %s", name, email); | |
110 | + Log.d(LOG_TAG, message); | |
111 | + Toast.makeText(this, message, Toast.LENGTH_SHORT).show(); | |
110 | 112 | } |
111 | 113 | } |
112 | 114 | } |