working on instructions by using PCB

parent a18377fb
......@@ -145,6 +145,7 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-support" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/restart-dex" />
......
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yottacode.pictogram.tabletlibrary">
......@@ -6,7 +5,7 @@
android:allowBackup="true"
android:label="@string/app_name"
android:supportsRtl="true">
<activity android:name=".gui.session.Session"></activity>
</application>
</manifest>
......@@ -6,6 +6,7 @@ import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
......@@ -21,14 +22,16 @@ import java.util.Vector;
* @author Fernando
* @version 1.1
*/
public class ListSessionsFragment extends Fragment{
public class ListInstructionsFragment extends Fragment{
ProgressDialog progressDialog;
private Vector<JSONObject> downloaded_students;
private final String LOG_TAG = this.getClass().getSimpleName(); // Or .getCanonicalName()
ListView listview;
ListView listview_instructions;
ListView listview_stepsinstruction;
private int mSelectedItem;
@Override
......@@ -49,14 +52,29 @@ public class ListSessionsFragment extends Fragment{
adapter.add("Sesion 1");
adapter.add("Sesion 2");
adapter.add("Sesion 3");
this.listview.setAdapter(adapter);
this.listview_instructions.setAdapter(adapter);
this.listview_stepsinstruction.setAdapter(new ArrayAdapter<>(getActivity(),R.layout.list_sessions));
this.listview_instructions.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int pos, long arg3) {
ArrayAdapter<String> adapter=(ArrayAdapter<String>)listview_stepsinstruction.getAdapter();
adapter.clear();
adapter.add("pos"+pos);
adapter.add("pos"+pos);
adapter.add("pos"+pos);
adapter.notifyDataSetChanged();
mSelectedItem = pos;
((ArrayAdapter<String>)listview_instructions.getAdapter()).notifyDataSetChanged();
}
});
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_sessions_session, container, false);
this.listview = (ListView) view.findViewById(R.id.sessionsListView);
View view = inflater.inflate(R.layout.fragment_instructions_session, container, false);
this.listview_instructions = (ListView) view.findViewById(R.id.instructionsListView);
this.listview_stepsinstruction = (ListView) view.findViewById(R.id.stepsInstructionsListView);
setSessions();
return view;
}
......
package com.yottacode.pictogram.tabletlibrary.gui.session;
import android.app.Fragment;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;
import com.yottacode.pictogram.tabletlibrary.R;
import org.json.JSONObject;
import java.util.Vector;
/**
* StudentFragmentGrid implements the gridview with the students
* @author Miguel Ángel García Cumbreras
* @author Fernando
* @version 1.1
*/
public class ListStepsSessionFragment extends Fragment{
ProgressDialog progressDialog;
private Vector<JSONObject> downloaded_students;
private final String LOG_TAG = this.getClass().getSimpleName(); // Or .getCanonicalName()
ListView listview;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRetainInstance(true);
}
@Override
public void onStart() {
super.onStart();
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_steps_session, container, false);
this.listview = (ListView) view.findViewById(R.id.stepsSessionListView);
return view;
}
@Override
public void onPause() {
super.onPause();
if ((progressDialog!= null) && progressDialog.isShowing())
progressDialog.dismiss();
progressDialog = null;
}
}
......@@ -52,7 +52,6 @@
android:textColor="@color/abc_secondary_text_material_light" />
</LinearLayout>
</RelativeLayout>
<View
......@@ -64,26 +63,12 @@
android:layout_below="@+id/sessionTopbarLayout"
android:layout_marginTop="0dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/sessionTopbarLayout">
<fragment
android:layout_width="wrap_content"
android:layout_height="wrap_content"
class="com.yottacode.pictogram.tabletlibrary.gui.session.ListSessionsFragment"
android:id="@+id/ListSessionsFragment"
android:layout_gravity="center"
tools:layout="@layout/fragment_new_student" />
<fragment
android:layout_width="wrap_content"
android:layout_height="wrap_content"
class="com.yottacode.pictogram.tabletlibrary.gui.session.ListSessionsFragment"
android:id="@+id/ListStepsFragment"
android:layout_gravity="center"
tools:layout="@layout/fragment_new_student" />
</LinearLayout>
android:layout_height="match_parent"
android:layout_below="@+id/sessionTopbarLayout"
class="com.yottacode.pictogram.tabletlibrary.gui.session.ListInstructionsFragment"
android:id="@+id/ListInstructionsFragment"
tools:layout="@layout/fragment_instructions_session" />
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/sessionsListView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical|center|center_horizontal"
android:padding="32dp"
android:horizontalSpacing="16dp"
android:verticalSpacing="16dp" />
<?xml version="1.0" encoding="utf-8"?>
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/stepsSessionListView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical|center|center_horizontal"
android:padding="32dp"
android:horizontalSpacing="16dp"
android:verticalSpacing="16dp" />
......@@ -66,6 +66,12 @@
android:name=".kiosk.KioskService"
android:exported="false" />
<activity
android:name="com.yottacode.pictogram.tabletlibrary.gui.session.SessionActivity"
android:exported="true"
android:label="@string/app_name"
android:launchMode="singleTop"
android:screenOrientation="landscape" />
</application>
</manifest>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment