I would like to know how I can structure my app with HTML, and style it with CSS too. I want to put a fieldset to form a table. I looked for tutorials on the internet but I did not quite understand how to use it.
I want the lvDolar, from the XML below, to be bypassed by a fieldset:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="com.example.teste.application.VerDolar"
android:background="@color/white">
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
**android:id="@+id/lvDolar"**
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:layout_marginBottom="0dp" />
</RelativeLayout>
This is my java class:
package teste;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import com.example.rainah.application.R;
import java.util.List;
public class VerDolar extends ActionBarActivity {
private ListView lvDolar;
private List<Dolar> dolar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_ver_dolar);
setTitle("Dolar");
lvDolar = (ListView) findViewById(R.id.lvDolar);
}
@Override
protected void onResume() {
super.onResume();
DbHelper db = new DbHelper(this);
List<Dolar> listDolar = db.selectDolar();
ArrayAdapter<Dolar> list = new ArrayAdapter<Dolar>(this, android.R.layout.simple_list_item_1, listDolar);
lvDolar.setAdapter(list);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_ver_dolar, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
//int id = item.getItemId();
//noinspection SimplifiableIfStatement
switch(item.getItemId()) {
case R.id.action_search:
break;
case R.id.action_new:
Intent intent = new Intent(this, AddDolar.class);
startActivity(intent);
break;
default:
return true;
}
return super.onOptionsItemSelected(item);
}
}
Thanks, if anyone can help me, because I think it's a relatively simple question, but I'm breaking my heart to understand how this works in android studio. Thanks in advance.