|  |  | 
 |  |  |  | 
 |  |  | import static android.view.Gravity.CENTER; | 
 |  |  |  | 
 |  |  | import static com.dayu.baselibrary.utils.BaseCommon.HeNanLibrary; | 
 |  |  | import static com.dayu.baselibrary.utils.BaseCommon.QHAloneLibrary; | 
 |  |  | import static com.dayu.baselibrary.utils.BaseCommon.QHOnLineLibrary; | 
 |  |  |  | 
 |  |  | import android.app.Activity; | 
 |  |  | import android.app.Dialog; | 
 |  |  | import android.view.Gravity; | 
 |  |  | 
 |  |  |         getWindow().setGravity(CENTER); | 
 |  |  |         setContentView(R.layout.library_dialog); | 
 |  |  |         setCanceledOnTouchOutside(false); | 
 |  |  |         setCancelable(false); | 
 |  |  |         RadioGroup radioGroup = findViewById(R.id.radioLibrary); | 
 |  |  |         libraryDao = BaseDaoSingleton.getInstance(mContext).libraryDao(); | 
 |  |  |         if (libraryDao != null) { | 
 |  |  | 
 |  |  |                 ischose = true; | 
 |  |  |                 // 当选中的RadioButton发生变化时调用 | 
 |  |  |                 if (checkedId == R.id.henanLibrary) { | 
 |  |  |                     type = 0; | 
 |  |  |                     type = HeNanLibrary; | 
 |  |  |                     libraryBean.setType(type); | 
 |  |  |                     data = "确认选择河南版本吗?"; | 
 |  |  |                 } else if (checkedId == R.id.qhAloneLibrary) {// 处理选中Option 2的逻辑 | 
 |  |  |                     type = 1; | 
 |  |  |                     type = QHAloneLibrary; | 
 |  |  |                     libraryBean.setType(type); | 
 |  |  |                     data = "确认选择齐河单机版本吗?"; | 
 |  |  |                 } else if (checkedId == R.id.qhOnLineLibrary) {// 处理选中Option 2的逻辑 | 
 |  |  |                     type = QHOnLineLibrary; | 
 |  |  |                     libraryBean.setType(type); | 
 |  |  |                     data = "确认选择齐河联网版本吗?"; | 
 |  |  |                 } | 
 |  |  |             }); | 
 |  |  |             TextView okBtn = findViewById(R.id.ok); |