Commit ea0fca7f authored by Christof Wolke's avatar Christof Wolke

new path for files

parent 8b4e5d7a
......@@ -3,6 +3,7 @@ package de.uni_oldenburg.bidl.member_view;
import android.annotation.SuppressLint;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.webkit.WebView;
import android.widget.AdapterView;
......@@ -68,7 +69,7 @@ public class MaterialsActivity extends BaseActivity {
String filename = (String) adapterView.getItemAtPosition(position);
String filePath = map.get(filename);
Uri uri = Uri.parse(REST.FULL_URL + filePath);
Uri uri = Uri.parse(REST.SERVER_FILE_URL + filePath);
webview = new WebView(MaterialsActivity.this);
webview.getSettings().setJavaScriptEnabled(true);
webview.loadUrl("https://docs.google.com/gview?embedded=true&url=" + uri);
......
......@@ -74,13 +74,10 @@ public class SearchActivity extends BaseActivity implements ListCommunicator {
searchQueryView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String query) {
if (query.length() > 4) {
onStartSearchAction(query);
} else {
Toast.makeText(getApplicationContext(),
getResources().getString(R.string.notEnoughCaracters),
Toast.LENGTH_SHORT).show();
}
return false;
}
......
......@@ -20,6 +20,9 @@ public abstract class REST {
public static String FULL_URL = LOCAL_URL;
//Url to pdf directories
public static String SERVER_FILE_URL = "http://192.168.1.2:" + LOCAL_PORT + "/pub/";
//Login path
private static final String LOGIN = "/login";
public static String SPRING_LOGIN = FULL_URL + LOGIN;
......
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