Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/drawer_layout"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <LinearLayout
- android:id="@+id/container_toolbar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="top"
- android:orientation="vertical">
- <include
- android:id="@+id/toolbar"
- layout="@layout/toolbar" />
- </LinearLayout>
- <FrameLayout
- android:id="@+id/container_top"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/container_toolbar"/>
- <FrameLayout
- android:id="@+id/container_bottom"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/container_bottom"/>
- </RelativeLayout>
- <fragment
- android:id="@+id/fragment_navigation_drawer"
- android:name="activity.FragmentDrawer"
- android:layout_width="@dimen/nav_drawer_width"
- android:layout_height="match_parent"
- android:layout_gravity="start"
- app:layout="@layout/fragment_navigation_drawer"
- tools:layout="@layout/fragment_navigation_drawer" />
- </android.support.v4.widget.DrawerLayout>
- <?xml version="1.0" encoding="utf-8"?>
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- style="@style/listview_row"
- android:background="@drawable/border_style"
- android:id="@+id/calclist">
- <TextView
- android:id="@+id/date_m_d"
- android:text="05.23"
- style="@style/listview_row_left_top"
- />
- <TextView
- android:id="@+id/title"
- android:layout_below="@id/date_m_d"
- style="@style/listview_row_left_bottom"
- />
- <TextView
- android:id="@+id/value"
- android:layout_toRightOf="@id/date_m_d"
- style="@style/listview_row_right_top" />
- <TextView
- android:id="@+id/value_detail"
- android:layout_below="@+id/value"
- android:layout_toRightOf="@id/date_m_d"
- style="@style/listview_row_right_bottom" />
- <TextView
- android:id="@+id/value_detail2"
- android:layout_below="@+id/value"
- android:layout_toRightOf="@id/value_detail"
- style="@style/listview_row_right_bottom_second" />
- </RelativeLayout>
- <style name="listview_row">
- <item name="android:layout_width">match_parent</item>
- <item name="android:layout_height">wrap_content</item>
- </style>
- @Override
- public void onCreate(Bundle savedInstanceState) {
- if (getArguments() != null) {
- pID = getArguments().getInt("id");
- }
- else {
- throw new IllegalArgumentException("Referenced without valid id");
- }
- String[] selectArgs = {Integer.toString(pID)};
- super.query = "myqueryhere";
- super.queryArgs = myArgs;
- SimpleCursorAdapter adapter=
- new SimpleCursorAdapter(getActivity(), R.layout.fragment_calculations_list, current,
- new String[] {
- "fielda","fieldb", "fieldc", "fieldd", "fielde"
- },
- new int[] {R.id.date_m_d, R.id.title, R.id.value, R.id.value_detail, R.id.value_detail2},
- 0);
- setListAdapter(adapter);
- if (current==null) {
- db = new DatabaseHelper(getActivity().getApplicationContext(), "my.db", 1);
- task=new LoadCursorTask().execute();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement