From bc28fc4d8bf6760228dbb7726d2954dfcb9110ef Mon Sep 17 00:00:00 2001 From: Trinea Date: Tue, 4 Mar 2014 18:01:50 +0800 Subject: [PATCH] Disable button when get from net --- src/cn/trinea/android/demo/HttpCacheDemo.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cn/trinea/android/demo/HttpCacheDemo.java b/src/cn/trinea/android/demo/HttpCacheDemo.java index a484ae5..2886818 100644 --- a/src/cn/trinea/android/demo/HttpCacheDemo.java +++ b/src/cn/trinea/android/demo/HttpCacheDemo.java @@ -55,6 +55,7 @@ public void onClick(View v) { protected void onPreGet() { httpCacheInfoTV.setText(""); httpGetContentTV.setText("wating…"); + httpGetBT.setEnabled(false); } protected void onPostGet(HttpResponse httpResponse, boolean isInCache) { @@ -71,6 +72,7 @@ protected void onPostGet(HttpResponse httpResponse, boolean isInCache) { httpCacheInfoTV.setText(""); httpGetContentTV.setText("response is null."); } + httpGetBT.setEnabled(true); } }); }