Commit 943b1b12 authored by rahadi's avatar rahadi

Improved table view to support <select> tag

parent db297e6a
......@@ -288,8 +288,12 @@ public class XmlUtils {
String html = doc.getRootElement().getNamespace();
Element body = doc.getRootElement().getElement(html, "body");
List<Element> inputs = findAllElementsByTagName(body, "input");
List<Element> inputs = findAllElementsByAttrName(body, "ref");
for (Element input : inputs) {
if (input.getName().equals("group")) {
continue;
}
String ref = getAttributeValue(input, "ref");
if (ref != null) {
if (xPaths.contains(ref)) {
......
......@@ -79,9 +79,8 @@ public class SplashScreenActivity extends AppCompatActivity {
startActivity(new Intent(this, CapiMainActivity.class));
// startActivity(new Intent(this, BSActivity.class));
} else {
startActivity(new Intent(this, CapiMainActivity.class));
// startActivity(new Intent(this, CapiLoginActivity.class));
// startActivity(new Intent(this, ListingInstanceActivity.class));
// startActivity(new Intent(this, CapiMainActivity.class));
startActivity(new Intent(this, CapiLoginActivity.class));
}
finish();
}
......
......@@ -21,10 +21,6 @@ import android.text.format.DateFormat;
import org.kxml2.io.KXmlParser;
import org.kxml2.kdom.Document;
import id.ac.stis.capi.BuildConfig;
import id.ac.stis.capi.R;
import id.ac.stis.capi.odk.application.Collect;
import id.ac.stis.capi.odk.preferences.PreferenceKeys;
import org.opendatakit.httpclientandroidlib.Header;
import org.opendatakit.httpclientandroidlib.HttpEntity;
import org.opendatakit.httpclientandroidlib.HttpHost;
......@@ -64,6 +60,10 @@ import java.util.Locale;
import java.util.TimeZone;
import java.util.zip.GZIPInputStream;
import id.ac.stis.capi.BuildConfig;
import id.ac.stis.capi.R;
import id.ac.stis.capi.odk.application.Collect;
import id.ac.stis.capi.odk.preferences.PreferenceKeys;
import timber.log.Timber;
/**
......@@ -75,17 +75,14 @@ import timber.log.Timber;
*/
public final class WebUtils {
private static final String USER_AGENT_HEADER = "User-Agent";
public static final String OPEN_ROSA_VERSION_HEADER = "X-OpenRosa-Version";
public static final String OPEN_ROSA_VERSION = "1.0";
private static final String DATE_HEADER = "Date";
public static final String HTTP_CONTENT_TYPE_TEXT_XML = "text/xml";
public static final int CONNECTION_TIMEOUT = 30000;
public static final String ACCEPT_ENCODING_HEADER = "Accept-Encoding";
public static final String GZIP_CONTENT_ENCODING = "gzip";
private static final String USER_AGENT_HEADER = "User-Agent";
private static final String DATE_HEADER = "Date";
public static final List<AuthScope> buildAuthScopes(String host) {
List<AuthScope> asList = new ArrayList<AuthScope>();
......@@ -137,7 +134,7 @@ public final class WebUtils {
* for accessing this host.
*/
public static final void addCredentials(String username, String password,
String host) {
String host) {
// to ensure that this is the only authentication available for this
// host...
clearHostCredentials(host);
......@@ -303,7 +300,7 @@ public final class WebUtils {
* http context and client objects involved in the web connection.
*/
public static DocumentFetchResult getXmlDocument(String urlString,
HttpContext localContext, HttpClient httpclient) {
HttpContext localContext, HttpClient httpclient) {
URI u = null;
try {
URL url = new URL(urlString);
......
......@@ -4,6 +4,6 @@
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFF"
android:fillColor="#000"
android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/>
</vector>
......@@ -24,6 +24,7 @@
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="never"
tools:listitem="@layout/collectiva_item_form" />
<ProgressBar
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout 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:layout_width="match_parent"
......@@ -8,10 +7,11 @@
android:orientation="vertical"
tools:context="id.ac.stis.capi.revalidasi.activities.DataDownloadActivity">
<com.rahadi.vsen.views.ExtendedRecyclerView
<id.ac.stis.capi.lessthink.views.ExtendedRecyclerView
android:id="@+id/vd_recycler_down"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
tools:listitem="@layout/vd_item_download" />
<LinearLayout
android:id="@+id/holder_message"
......@@ -19,20 +19,22 @@
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:padding="30dp"
android:orientation="vertical">
android:orientation="vertical"
android:padding="30dp">
<ImageView
android:id="@+id/icon_message"
android:layout_width="50dp"
android:layout_height="70dp"
android:tint="@android:color/darker_gray"
app:srcCompat="@drawable/ic_sad_sorry"/>
app:srcCompat="@drawable/ic_sad_sorry" />
<TextView
android:id="@+id/message_error"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:text="Sorry, internal error."/>
android:text="Sorry, internal error."
android:textAlignment="center" />
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
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 to comment