我有一个带文本应用的按钮.当用户执行某个操作时,按钮文本被更改为apply.Now当按钮上的文本被应用时,我想禁用按钮单击.我怎么能实现这一点.
码
if (data.get (i).get ("status").equals ("null")) {
holder.apply.setText ("Apply");
} else {
holder.apply.setText (data.get (i).get ("status"));
}
if (holder.apply.getText ().equals ("Applied")) {
holder.apply.setFocusable (false);
holder.apply.setClickable (false);
holder.apply.setFocusableInTouchMode (false);
}
Run Code Online (Sandbox Code Playgroud) 我已经创建了一个应用程序,其中用户登录他的帐户.为此我使用asyncTask.Everything工作正常,但事情是当我得到响应,我希望进度条停止.但它继续下去.
异步任务
protected void onPreExecute() {
super.onPreExecute ();
CommonFunctions.showProgress (c, "Please Wait", true);
}
@Override
protected void onPostExecute(String s) {
super.onPostExecute (s);
try {
JSONObject jsonObject = new JSONObject (s.trim ());
JSONObject NewDataSet = jsonObject.getJSONObject ("NewDataSet");
JSONObject Table = NewDataSet.getJSONObject ("Table");
String User_ID = Table.getString ("User_ID");
String Vendor_IEntity_Code = Table.getString ("Vendor_IEntity_Code");
String Vendor_Name = Table.getString ("Vendor_Name");
// setting the preferences
SettingPreference.setUserId (c, User_ID);
SettingPreference.setVendorId (c, Vendor_IEntity_Code);
SettingPreference.setVendorName (c, Vendor_Name);
} catch (JSONException e) {
e.printStackTrace ();
}
CommonFunctions.showProgress (c, "", …Run Code Online (Sandbox Code Playgroud)