private void saveURLButton(JSONObject MBData, int layer) { ButtonEntity bTemp = new ButtonForURL(); bTemp.setUrl(MBData.getString("url")); bTemp.setName(MBData.getString("name")); bTemp.setType(MBData.getString("type")); ButtonModel bM = new ButtonModel(); bM.setButton(bTemp, 1); bM.setLayer(layer); allMenuButtons.add(bM); }
private void saveMediaButton(JSONObject MBData, int layer) { ButtonEntity bTemp = new ButtonForMedia(); bTemp.setMedia_id(MBData.getString("media_id")); bTemp.setName(MBData.getString("name")); bTemp.setType(MBData.getString("type")); ButtonModel bM = new ButtonModel(); bM.setButton(bTemp, 2); bM.setLayer(layer); allMenuButtons.add(bM); }
private void saveKeyButton(JSONObject MBData, int layer) { ButtonEntity bTemp = new ButtonForClick(); bTemp.setKey(MBData.getString("key")); bTemp.setName(MBData.getString("name")); bTemp.setType(MBData.getString("type")); ButtonModel bM = new ButtonModel(); bM.setButton(bTemp, 0); bM.setLayer(layer); allMenuButtons.add(bM); }