MCPcopy Create free account
hub / github.com/Odoo-mobile/framework / createView

Method createView

src/com/odoo/addons/idea/Library.java:146–172  ·  view source on GitHub ↗
(View mView, OEDataRow row)

Source from the content-addressed store, hash-verified

144 }
145
146 private void createView(View mView, OEDataRow row) {
147 OEControls.setText(mView, R.id.txvName, row.getString("name"));
148 List<String> values = new ArrayList<String>();
149 switch (mCurrentKey) {
150 case Books:
151 for (OEDataRow category : row.getM2MRecord("category_ids")
152 .browseEach()) {
153 values.add("- " + category.getString("name"));
154 }
155
156 break;
157 case Authors:
158 OEDataRow country = row.getM2ORecord("country_id").browse();
159 if (country != null) {
160 values.add(country.getString("name"));
161 }
162
163 break;
164 case Students:
165 for (OEDataRow book : row.getO2MRecord("book_ids").browseEach()) {
166 values.add("- " + book.getString("name"));
167 }
168 break;
169 case Category:
170 }
171 OEControls.setText(mView, R.id.txvValues, TextUtils.join("\n", values));
172 }
173
174 private void checkArguments() {
175 Bundle arg = getArguments();

Callers 1

getViewMethod · 0.95

Calls 9

setTextMethod · 0.95
getStringMethod · 0.95
getM2MRecordMethod · 0.80
browseMethod · 0.80
getM2ORecordMethod · 0.80
getO2MRecordMethod · 0.80
getStringMethod · 0.45
browseEachMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected