Will accept to all! There were tasks to implement the program on Android, something like a converter. So far, what is given is not easy, but the sample implementation of the calculator was less successful. The question is the following if someone sketched the source code of the application, which has a list of "calculation types" and when clicked on the calculation, switched to a new canvas with a certain number of fields (required for input). The maximum number of fields for input: 3. I found a source on the Internet called "AndroidListView". There is a list of titles, when you switch to which a detailed page appears, however this is one page for each item in the list, the name changes. I tried to adapt to this logic, but it was not there. I created 3 fields and wanted to hide the 3rd field by default (for some calculations only 2 are required) and got stuck with it. The application just crashes. Does anyone have sketches or ideas on how to get out of this situation? Thank you all for your attention. Listing below:
public class AndroidListViewActivity extends ListActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // storing string resources into Array String[] adobe_products = getResources().getStringArray(R.array.adobe_products); // Binding Array to ListAdapter this.setListAdapter(new ArrayAdapter<String>(this, R.layout.list_item, R.id.label, adobe_products)); ListView lv = getListView(); // listening to single list item on click lv.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int position, long id) { EditText InputС = (EditText) findViewById(R.id.InputC); InputС.setVisibility(View.VISIBLE); //Toast.makeText(getBaseContext(), "tabId = " + , Toast.LENGTH_SHORT).show(); // selected item String product = ((TextView) view).getText().toString(); // Launching new Activity on selecting single List Item Intent i = new Intent(getApplicationContext(), SingleListItem.class); // sending data to new activity i.putExtra("product", product); startActivity(i); } }); } }