mirror of https://github.com/MISP/misp-bump
cleanup
parent
268112b6e4
commit
e860219dc4
|
@ -15,9 +15,11 @@
|
|||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
tools:ignore="GoogleAppIndexingWarning">
|
||||
<activity android:name=".activities.UploadActivity"
|
||||
<activity android:name=".activities.UploadInformationActivity"></activity>
|
||||
<activity
|
||||
android:name=".activities.UploadActivity"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:label="Upload"/>
|
||||
android:label="Upload" />
|
||||
<activity android:name=".activities.PreferenceActivity" />
|
||||
<activity android:name=".activities.StartUpActivity">
|
||||
<intent-filter>
|
||||
|
|
|
@ -2,7 +2,7 @@ package lu.circl.mispbump.activities;
|
|||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
||||
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
import com.google.gson.Gson;
|
||||
|
@ -21,28 +21,18 @@ import android.widget.TextView;
|
|||
import java.util.List;
|
||||
|
||||
import lu.circl.mispbump.R;
|
||||
import lu.circl.mispbump.adapters.SyncAdapter;
|
||||
import lu.circl.mispbump.auxiliary.DialogManager;
|
||||
import lu.circl.mispbump.adapters.UploadInfoAdapter;
|
||||
import lu.circl.mispbump.auxiliary.PreferenceManager;
|
||||
import lu.circl.mispbump.interfaces.IOnItemClickListener;
|
||||
import lu.circl.mispbump.interfaces.OnRecyclerItemClickListener;
|
||||
import lu.circl.mispbump.models.UploadInformation;
|
||||
|
||||
public class HomeActivity extends AppCompatActivity {
|
||||
|
||||
public static final String TAG = "Home";
|
||||
|
||||
private CoordinatorLayout layout;
|
||||
private RecyclerView recyclerView;
|
||||
|
||||
private View rootView;
|
||||
private PreferenceManager preferenceManager;
|
||||
|
||||
private View.OnClickListener onFabClicked = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent sync = new Intent(HomeActivity.this, SyncActivity.class);
|
||||
startActivity(sync);
|
||||
}
|
||||
};
|
||||
private RecyclerView recyclerView;
|
||||
private UploadInfoAdapter uploadInfoAdapter;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
@ -51,14 +41,72 @@ public class HomeActivity extends AppCompatActivity {
|
|||
|
||||
preferenceManager = PreferenceManager.getInstance(this);
|
||||
|
||||
initializeViews();
|
||||
init();
|
||||
initRecyclerView();
|
||||
}
|
||||
|
||||
|
||||
private void init() {
|
||||
rootView = findViewById(R.id.rootLayout);
|
||||
|
||||
// populate Toolbar (Actionbar)
|
||||
Toolbar myToolbar = findViewById(R.id.toolbar);
|
||||
setSupportActionBar(myToolbar);
|
||||
|
||||
ActionBar ab = getSupportActionBar();
|
||||
if (ab != null) {
|
||||
ab.setDisplayHomeAsUpEnabled(false);
|
||||
}
|
||||
|
||||
FloatingActionButton sync_fab = findViewById(R.id.home_fab);
|
||||
sync_fab.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
startActivity(new Intent(HomeActivity.this, SyncActivity.class));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initRecyclerView() {
|
||||
recyclerView = findViewById(R.id.recyclerView);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(HomeActivity.this));
|
||||
|
||||
uploadInfoAdapter = new UploadInfoAdapter(HomeActivity.this);
|
||||
|
||||
uploadInfoAdapter.setOnRecyclerItemClickListener(new OnRecyclerItemClickListener<UploadInformation>() {
|
||||
@Override
|
||||
public void onClick(UploadInformation item) {
|
||||
Intent i = new Intent(HomeActivity.this, UploadInformationActivity.class);
|
||||
i.putExtra(UploadInformationActivity.EXTRA_UPLOAD_INFO_KEY, new Gson().toJson(item));
|
||||
startActivity(i);
|
||||
}
|
||||
});
|
||||
|
||||
recyclerView.setAdapter(uploadInfoAdapter);
|
||||
}
|
||||
|
||||
private void refreshRecyclerView() {
|
||||
List<UploadInformation> uploadInformationList = preferenceManager.getUploadInformation();
|
||||
TextView empty = findViewById(R.id.empty);
|
||||
|
||||
// no sync information available
|
||||
if (uploadInformationList == null) {
|
||||
empty.setVisibility(View.VISIBLE);
|
||||
recyclerView.setVisibility(View.GONE);
|
||||
return;
|
||||
}
|
||||
|
||||
// sync information available
|
||||
empty.setVisibility(View.GONE);
|
||||
recyclerView.setVisibility(View.VISIBLE);
|
||||
uploadInfoAdapter.setItems(uploadInformationList);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
initializeRecyclerView();
|
||||
refreshSyncInformation();
|
||||
refreshRecyclerView();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -82,79 +130,4 @@ public class HomeActivity extends AppCompatActivity {
|
|||
// invoke superclass to handle unrecognized item (eg. homeAsUp)
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
private void initializeViews() {
|
||||
layout = findViewById(R.id.rootLayout);
|
||||
|
||||
// populate Toolbar (Actionbar)
|
||||
Toolbar myToolbar = findViewById(R.id.toolbar);
|
||||
setSupportActionBar(myToolbar);
|
||||
|
||||
ActionBar ab = getSupportActionBar();
|
||||
if (ab != null) {
|
||||
ab.setDisplayHomeAsUpEnabled(false);
|
||||
}
|
||||
|
||||
recyclerView = findViewById(R.id.recyclerView);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||
|
||||
FloatingActionButton sync_fab = findViewById(R.id.home_fab);
|
||||
sync_fab.setOnClickListener(onFabClicked);
|
||||
}
|
||||
|
||||
private void refreshSyncInformation () {
|
||||
List<UploadInformation> uploadInformationList = preferenceManager.getUploadInformation();
|
||||
TextView empty = findViewById(R.id.emtpy);
|
||||
|
||||
// no sync information available
|
||||
if (uploadInformationList == null) {
|
||||
empty.setVisibility(View.VISIBLE);
|
||||
recyclerView.setVisibility(View.GONE);
|
||||
return;
|
||||
}
|
||||
|
||||
// sync information available
|
||||
empty.setVisibility(View.GONE);
|
||||
recyclerView.setVisibility(View.VISIBLE);
|
||||
|
||||
SyncAdapter adapter = (SyncAdapter) recyclerView.getAdapter();
|
||||
assert adapter != null;
|
||||
adapter.setUploadInformationList(uploadInformationList);
|
||||
}
|
||||
|
||||
private void initializeRecyclerView() {
|
||||
SyncAdapter syncAdapter = new SyncAdapter(HomeActivity.this);
|
||||
syncAdapter.setOnDeleteClickListener(new IOnItemClickListener<UploadInformation>() {
|
||||
@Override
|
||||
public void onItemClick(final UploadInformation clickedObject) {
|
||||
DialogManager.deleteSyncInformationDialog(HomeActivity.this, new DialogManager.IDialogFeedback() {
|
||||
@Override
|
||||
public void positive() {
|
||||
boolean status = preferenceManager.removeUploadInformation(clickedObject.getId());
|
||||
|
||||
if (status) {
|
||||
Snackbar.make(layout, "Successfully deleted sync information", Snackbar.LENGTH_LONG).show();
|
||||
refreshSyncInformation();
|
||||
} else {
|
||||
Snackbar.make(layout, "Failed to delete sync information", Snackbar.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void negative() { }
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
syncAdapter.setOnRetryClickListener(new IOnItemClickListener<UploadInformation>() {
|
||||
@Override
|
||||
public void onItemClick(UploadInformation clickedObject) {
|
||||
Intent upload = new Intent(HomeActivity.this, UploadActivity.class);
|
||||
upload.putExtra(UploadActivity.EXTRA_UPLOAD_INFO, new Gson().toJson(clickedObject));
|
||||
startActivity(upload);
|
||||
}
|
||||
});
|
||||
|
||||
recyclerView.setAdapter(syncAdapter);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,8 +31,8 @@ import lu.circl.mispbump.restful_client.Organisation;
|
|||
import lu.circl.mispbump.restful_client.User;
|
||||
|
||||
/**
|
||||
* This activity is shown when the current device has no misp user associated with it.
|
||||
* Takes care of downloading all information necessary for a sync with other misp instances.
|
||||
* This activity is shown when the current device has no misp user and organisation associated with it.
|
||||
* It takes care of downloading all information necessary for a sync with other misp instances.
|
||||
*/
|
||||
public class LoginActivity extends AppCompatActivity {
|
||||
|
||||
|
@ -78,11 +78,11 @@ public class LoginActivity extends AppCompatActivity {
|
|||
|
||||
constraintLayout = findViewById(R.id.rootLayout);
|
||||
|
||||
serverUrl = findViewById(R.id.login_server_url);
|
||||
serverAutomationKey = findViewById(R.id.login_automation_key);
|
||||
Button downloadInfoButton = findViewById(R.id.login_download_button);
|
||||
downloadInfoButton.setOnClickListener(onClickDownload);
|
||||
|
||||
serverUrl = findViewById(R.id.login_server_url);
|
||||
serverAutomationKey = findViewById(R.id.login_automation_key);
|
||||
progressBar = findViewById(R.id.login_progressbar);
|
||||
|
||||
preferenceManager = PreferenceManager.getInstance(this);
|
||||
|
@ -124,7 +124,7 @@ public class LoginActivity extends AppCompatActivity {
|
|||
preferenceManager.setServerUrl(url);
|
||||
|
||||
// instance of MispRestClient with given URL
|
||||
final MispRestClient mispRestClient = new MispRestClient(getApplicationContext());
|
||||
final MispRestClient mispRestClient = MispRestClient.getInstance(getApplicationContext());
|
||||
|
||||
// display progress bar
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
|
|
|
@ -44,7 +44,7 @@ public class ProfileActivity extends AppCompatActivity {
|
|||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_profile);
|
||||
|
||||
mispRestClient = new MispRestClient(this);
|
||||
mispRestClient = MispRestClient.getInstance(this);
|
||||
preferenceManager = PreferenceManager.getInstance(this);
|
||||
|
||||
initializeViews();
|
||||
|
|
|
@ -55,8 +55,9 @@ public class UploadActivity extends AppCompatActivity {
|
|||
}
|
||||
|
||||
private void init() {
|
||||
restClient = MispRestClient.getInstance(this);
|
||||
preferenceManager = PreferenceManager.getInstance(this);
|
||||
restClient = new MispRestClient(this);
|
||||
|
||||
rootLayout = findViewById(R.id.rootLayout);
|
||||
|
||||
// toolbar
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
package lu.circl.mispbump.activities;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
|
||||
import lu.circl.mispbump.R;
|
||||
import lu.circl.mispbump.models.UploadInformation;
|
||||
|
||||
public class UploadInformationActivity extends AppCompatActivity {
|
||||
|
||||
public static String EXTRA_UPLOAD_INFO_KEY = "uploadInformation";
|
||||
|
||||
private UploadInformation uploadInformation;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_upload_information);
|
||||
|
||||
parseExtra();
|
||||
init();
|
||||
}
|
||||
|
||||
private void parseExtra() {
|
||||
String uploadInfo = getIntent().getStringExtra(EXTRA_UPLOAD_INFO_KEY);
|
||||
this.uploadInformation = new Gson().fromJson(uploadInfo, UploadInformation.class);
|
||||
}
|
||||
|
||||
private void init() {
|
||||
TextView name = findViewById(R.id.orgName);
|
||||
name.setText(uploadInformation.getRemote().organisation.name);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,157 +0,0 @@
|
|||
package lu.circl.mispbump.adapters;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.core.widget.ImageViewCompat;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.content.res.ColorStateList;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lu.circl.mispbump.R;
|
||||
import lu.circl.mispbump.custom_views.MaterialPreferenceText;
|
||||
import lu.circl.mispbump.interfaces.IOnItemClickListener;
|
||||
import lu.circl.mispbump.models.UploadInformation;
|
||||
|
||||
public class SyncAdapter extends RecyclerView.Adapter<SyncAdapter.SyncViewHolder> {
|
||||
|
||||
private Context context;
|
||||
private List<UploadInformation> uploadInformationList;
|
||||
private IOnItemClickListener<UploadInformation> deleteListener, retryListener;
|
||||
|
||||
static class SyncViewHolder extends RecyclerView.ViewHolder {
|
||||
MaterialPreferenceText baseUrl, email, password, authkey;
|
||||
TextView orgName, date;
|
||||
ImageView syncStatus;
|
||||
ImageButton retry, delete;
|
||||
|
||||
ConstraintLayout collapsedContent, expandedContent;
|
||||
|
||||
SyncViewHolder(View v) {
|
||||
super(v);
|
||||
|
||||
expandedContent = v.findViewById(R.id.expandedContent);
|
||||
expandedContent.setVisibility(View.GONE);
|
||||
|
||||
collapsedContent = v.findViewById(R.id.collapsedContent);
|
||||
collapsedContent.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (expandedContent.getVisibility() == View.GONE) {
|
||||
expandedContent.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
expandedContent.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
orgName = v.findViewById(R.id.orgName);
|
||||
date = v.findViewById(R.id.date);
|
||||
|
||||
baseUrl = v.findViewById(R.id.baseUrl);
|
||||
email = v.findViewById(R.id.email);
|
||||
password = v.findViewById(R.id.password);
|
||||
authkey = v.findViewById(R.id.authkey);
|
||||
|
||||
syncStatus = v.findViewById(R.id.syncStatus);
|
||||
|
||||
retry = v.findViewById(R.id.retryButton);
|
||||
delete = v.findViewById(R.id.deleteButton);
|
||||
}
|
||||
|
||||
void bindDeleteListener(final UploadInformation item, final IOnItemClickListener<UploadInformation> listener) {
|
||||
delete.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
listener.onItemClick(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void bindRetryListener(final UploadInformation item, final IOnItemClickListener<UploadInformation> listener) {
|
||||
retry.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
listener.onItemClick(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public SyncAdapter(Context context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public void setUploadInformationList(List<UploadInformation> uploadInformationList) {
|
||||
this.uploadInformationList = uploadInformationList;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void setOnDeleteClickListener(IOnItemClickListener<UploadInformation> listener) {
|
||||
deleteListener = listener;
|
||||
}
|
||||
|
||||
public void setOnRetryClickListener(IOnItemClickListener<UploadInformation> listener) {
|
||||
retryListener = listener;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public SyncViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
|
||||
View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.viewholder_sync, viewGroup, false);
|
||||
return new SyncViewHolder(v);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull SyncViewHolder syncViewHolder, int i) {
|
||||
|
||||
syncViewHolder.date.setText(uploadInformationList.get(i).getDateString());
|
||||
syncViewHolder.orgName.setText(uploadInformationList.get(i).getRemote().organisation.name);
|
||||
|
||||
syncViewHolder.baseUrl.setSubText(uploadInformationList.get(i).getRemote().baseUrl);
|
||||
syncViewHolder.email.setSubText(uploadInformationList.get(i).getLocal().syncUserEmail);
|
||||
syncViewHolder.password.setSubText(uploadInformationList.get(i).getLocal().syncUserPassword);
|
||||
syncViewHolder.authkey.setSubText(uploadInformationList.get(i).getLocal().syncUserAuthkey);
|
||||
|
||||
|
||||
switch (uploadInformationList.get(i).getCurrentSyncStatus()) {
|
||||
case COMPLETE:
|
||||
ImageViewCompat.setImageTintList(syncViewHolder.syncStatus, ColorStateList.valueOf(context.getColor(R.color.status_green)));
|
||||
syncViewHolder.syncStatus.setImageResource(R.drawable.ic_check);
|
||||
syncViewHolder.retry.setVisibility(View.GONE);
|
||||
break;
|
||||
case FAILURE:
|
||||
ImageViewCompat.setImageTintList(syncViewHolder.syncStatus, ColorStateList.valueOf(context.getColor(R.color.status_red)));
|
||||
syncViewHolder.syncStatus.setImageResource(R.drawable.ic_error_outline);
|
||||
syncViewHolder.retry.setVisibility(View.VISIBLE);
|
||||
break;
|
||||
case PENDING:
|
||||
ImageViewCompat.setImageTintList(syncViewHolder.syncStatus, ColorStateList.valueOf(context.getColor(R.color.status_amber)));
|
||||
syncViewHolder.syncStatus.setImageResource(R.drawable.ic_info_outline);
|
||||
syncViewHolder.retry.setVisibility(View.VISIBLE);
|
||||
break;
|
||||
}
|
||||
|
||||
syncViewHolder.bindDeleteListener(uploadInformationList.get(i), deleteListener);
|
||||
syncViewHolder.bindRetryListener(uploadInformationList.get(i), retryListener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
if (uploadInformationList == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return uploadInformationList.size();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
package lu.circl.mispbump.adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.widget.ImageViewCompat;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lu.circl.mispbump.R;
|
||||
import lu.circl.mispbump.interfaces.OnRecyclerItemClickListener;
|
||||
import lu.circl.mispbump.models.UploadInformation;
|
||||
import lu.circl.mispbump.viewholders.UploadInfoListViewHolder;
|
||||
|
||||
public class UploadInfoAdapter extends RecyclerView.Adapter<UploadInfoListViewHolder> {
|
||||
|
||||
private Context context;
|
||||
private List<UploadInformation> items;
|
||||
|
||||
private OnRecyclerItemClickListener<UploadInformation> onRecyclerItemClickListener;
|
||||
|
||||
|
||||
public UploadInfoAdapter(Context context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public UploadInfoAdapter(Context context, List<UploadInformation> items) {
|
||||
this.context = context;
|
||||
this.items = items;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public UploadInfoListViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
|
||||
View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.row_upload_information, viewGroup, false);
|
||||
return new UploadInfoListViewHolder(v);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull final UploadInfoListViewHolder holder, int position) {
|
||||
|
||||
final UploadInformation item = items.get(position);
|
||||
|
||||
holder.date.setText(item.getDateString());
|
||||
holder.orgName.setText(item.getRemote().organisation.name);
|
||||
|
||||
switch (item.getCurrentSyncStatus()) {
|
||||
case COMPLETE:
|
||||
ImageViewCompat.setImageTintList(holder.syncStatus, ColorStateList.valueOf(context.getColor(R.color.status_green)));
|
||||
holder.syncStatus.setImageResource(R.drawable.ic_check);
|
||||
break;
|
||||
case FAILURE:
|
||||
ImageViewCompat.setImageTintList(holder.syncStatus, ColorStateList.valueOf(context.getColor(R.color.status_red)));
|
||||
holder.syncStatus.setImageResource(R.drawable.ic_error_outline);
|
||||
break;
|
||||
case PENDING:
|
||||
ImageViewCompat.setImageTintList(holder.syncStatus, ColorStateList.valueOf(context.getColor(R.color.status_amber)));
|
||||
holder.syncStatus.setImageResource(R.drawable.ic_info_outline);
|
||||
break;
|
||||
}
|
||||
|
||||
holder.rootView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
onRecyclerItemClickListener.onClick(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return items.size();
|
||||
}
|
||||
|
||||
public void setItems(List<UploadInformation> items) {
|
||||
this.items = items;
|
||||
}
|
||||
|
||||
public void setOnRecyclerItemClickListener(OnRecyclerItemClickListener<UploadInformation> onRecyclerItemClickListener) {
|
||||
this.onRecyclerItemClickListener = onRecyclerItemClickListener;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
package lu.circl.mispbump.adapters;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import lu.circl.mispbump.R;
|
||||
import lu.circl.mispbump.auxiliary.KeyValue;
|
||||
import lu.circl.mispbump.restful_client.Organisation;
|
||||
import lu.circl.mispbump.restful_client.User;
|
||||
|
||||
public class UserAdapter extends RecyclerView.Adapter<UserAdapter.UserViewHolder> {
|
||||
|
||||
private List<KeyValue<String, String>> data = new ArrayList<>();
|
||||
|
||||
static class UserViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView title;
|
||||
TextView description;
|
||||
|
||||
UserViewHolder(View v) {
|
||||
super(v);
|
||||
title = v.findViewById(R.id.viewholder_user_title);
|
||||
description = v.findViewById(R.id.viewholder_user_description);
|
||||
}
|
||||
}
|
||||
|
||||
public UserAdapter(User user, Organisation organisation) {
|
||||
data.add(new KeyValue<>("UUID", organisation.uuid));
|
||||
data.add(new KeyValue<>("Name", organisation.name));
|
||||
data.add(new KeyValue<>("Description", organisation.description));
|
||||
data.add(new KeyValue<>("Nationality", organisation.nationality));
|
||||
data.add(new KeyValue<>("Email", user.email));
|
||||
// data.add(new KeyValue<>("ID", "" + user.value));
|
||||
// data.add(new KeyValue<>("Organisation ID", "" + user.org_id));
|
||||
// data.add(new KeyValue<>("Role ID", "" + user.role_id));
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserAdapter.UserViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.viewholder_user, parent, false);
|
||||
return new UserViewHolder(v);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(UserViewHolder holder, int position) {
|
||||
holder.title.setText(data.get(position).key);
|
||||
holder.description.setText(data.get(position).value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return data.size();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,8 +1,5 @@
|
|||
package lu.circl.mispbump.custom_views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
|
@ -10,19 +7,14 @@ import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
|||
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
||||
|
||||
/**
|
||||
* Can disable touch input on bottom sheet.
|
||||
* @param <V>
|
||||
*/
|
||||
public class ExtendedBottomSheetBehavior<V extends View> extends BottomSheetBehavior<V> {
|
||||
|
||||
private boolean swipeable = false;
|
||||
private Context context;
|
||||
|
||||
public ExtendedBottomSheetBehavior() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ExtendedBottomSheetBehavior(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(CoordinatorLayout parent, V child, MotionEvent event) {
|
||||
|
@ -48,6 +40,7 @@ public class ExtendedBottomSheetBehavior<V extends View> extends BottomSheetBeha
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
public void setSwipeable(boolean swipeable) {
|
||||
this.swipeable = swipeable;
|
||||
}
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
package lu.circl.mispbump.interfaces;
|
||||
|
||||
public interface IOnItemClickListener<T> {
|
||||
void onItemClick(T clickedObject);
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
package lu.circl.mispbump.interfaces;
|
||||
|
||||
public interface OnRecyclerItemClickListener<T> {
|
||||
void onClick(T item);
|
||||
}
|
|
@ -39,8 +39,6 @@ import retrofit2.converter.gson.GsonConverterFactory;
|
|||
*/
|
||||
public class MispRestClient {
|
||||
|
||||
private static final String TAG = "restClient";
|
||||
|
||||
public interface AvailableCallback {
|
||||
void available();
|
||||
|
||||
|
@ -59,11 +57,6 @@ public class MispRestClient {
|
|||
void failure(String error);
|
||||
}
|
||||
|
||||
public interface OrganisationsCallback {
|
||||
void success(Organisation[] organisations);
|
||||
void failure(String error);
|
||||
}
|
||||
|
||||
public interface ServerCallback {
|
||||
void success(List<MispServer> servers);
|
||||
|
||||
|
@ -75,21 +68,29 @@ public class MispRestClient {
|
|||
}
|
||||
|
||||
|
||||
private static MispRestClient instance;
|
||||
private PreferenceManager preferenceManager;
|
||||
private MispRestService mispRestService;
|
||||
|
||||
|
||||
public static MispRestClient getInstance(Context context) {
|
||||
if (instance == null) {
|
||||
instance = new MispRestClient(context);
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the rest client to communicate with a MISP instance.
|
||||
*
|
||||
* @param context needed to access the preferences for loading credentials
|
||||
*/
|
||||
public MispRestClient(Context context) {
|
||||
private MispRestClient(Context context) {
|
||||
preferenceManager = PreferenceManager.getInstance(context);
|
||||
|
||||
String url = preferenceManager.getServerUrl();
|
||||
|
||||
Log.i(TAG, "URL: " + url);
|
||||
|
||||
try {
|
||||
Retrofit retrofit = new Retrofit.Builder()
|
||||
.baseUrl(url)
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
package lu.circl.mispbump.viewholders;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import lu.circl.mispbump.R;
|
||||
|
||||
public class UploadInfoListViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
public View rootView;
|
||||
public ImageView syncStatus;
|
||||
public TextView orgName, date;
|
||||
|
||||
public UploadInfoListViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
|
||||
rootView = itemView;
|
||||
|
||||
orgName = itemView.findViewById(R.id.orgName);
|
||||
date = itemView.findViewById(R.id.date);
|
||||
syncStatus = itemView.findViewById(R.id.syncStatus);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z"/>
|
||||
</vector>
|
|
@ -4,7 +4,8 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/rootLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -23,10 +24,11 @@
|
|||
android:id="@+id/recyclerView"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/emtpy"
|
||||
android:id="@+id/empty"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
|
|
@ -14,10 +14,10 @@
|
|||
android:background="@color/colorPrimary"
|
||||
android:elevation="6dp"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/login_server_url"
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
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"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activities.UploadInformationActivity">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/orgName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:text="HALLO HER STEHT TEXT"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
|
@ -1,23 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/colorPrimary">
|
||||
|
||||
<ImageView
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_check_outline"
|
||||
android:tint="@color/white"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/Text.Title"
|
||||
android:textColor="@color/white"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="Organisation A"/>
|
||||
</LinearLayout>
|
|
@ -0,0 +1,55 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
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/header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:layout_marginBottom="1dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/syncStatus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:tint="@color/status_red"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_error_outline" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/orgName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:textAppearance="@style/Text.Title"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/date"
|
||||
app:layout_constraintStart_toEndOf="@+id/syncStatus"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Organisation A" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:textAppearance="@style/Text.SubTitle"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="20.3.2019" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,149 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
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"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:layout_margin="8dp"
|
||||
android:animateLayoutChanges="true">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/collapsedContent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/orgName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:textAppearance="@style/Text.Title"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/date"
|
||||
app:layout_constraintStart_toEndOf="@+id/syncStatus"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Organisation A" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:textAppearance="@style/Text.SubTitle"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="20.3.2019" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/syncStatus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:tint="@color/status_red"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_error_outline" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/expandedContent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="visible">
|
||||
|
||||
<lu.circl.mispbump.custom_views.MaterialPreferenceText
|
||||
android:id="@+id/baseUrl"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:pref_icon="@drawable/ic_link"
|
||||
app:subText="https://google.de"
|
||||
app:text="URL" />
|
||||
|
||||
<lu.circl.mispbump.custom_views.MaterialPreferenceText
|
||||
android:id="@+id/email"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/baseUrl"
|
||||
app:pref_icon="@drawable/ic_email"
|
||||
app:subText="email@email.de"
|
||||
app:text="Email" />
|
||||
|
||||
<lu.circl.mispbump.custom_views.MaterialPreferenceText
|
||||
android:id="@+id/password"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/email"
|
||||
app:pref_icon="@drawable/ic_key"
|
||||
app:subText="000000000000"
|
||||
app:text="Password" />
|
||||
|
||||
<lu.circl.mispbump.custom_views.MaterialPreferenceText
|
||||
android:id="@+id/authkey"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/password"
|
||||
app:pref_icon="@drawable/ic_verified_user"
|
||||
app:subText="0asd5asd5asd1asda"
|
||||
app:text="Authkey" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/retryButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:padding="8dp"
|
||||
android:tint="@color/colorPrimaryDark"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/deleteButton"
|
||||
app:layout_constraintTop_toBottomOf="@+id/authkey"
|
||||
app:srcCompat="@drawable/ic_autorenew" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/deleteButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:padding="8dp"
|
||||
android:tint="@color/colorPrimaryDark"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/authkey"
|
||||
app:srcCompat="@drawable/ic_delete_forever" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
|
@ -1,43 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
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"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/viewholder_user_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="TextView"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/viewholder_user_description"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="TextView"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toEndOf="@+id/viewholder_user_title"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@color/dividerColor"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/viewholder_user_description" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,23 +0,0 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIDwzCCAqugAwIBAgIUEHRo5YZyVzJRWcqG4zHzG68DoTgwDQYJKoZIhvcNAQEL
|
||||
BQAwcTELMAkGA1UEBhMCREUxDDAKBgNVBAgMA05SVzENMAsGA1UEBwwEQm9ubjEO
|
||||
MAwGA1UECgwFRmVsaXgxEjAQBgNVBAMMCWxvY2FsaG9zdDEhMB8GCSqGSIb3DQEJ
|
||||
ARYSZmVsaXhwa0BvdXRsb29rLmRlMB4XDTE5MDUxMzA4NTEwOVoXDTIwMDUxMjA4
|
||||
NTEwOVowcTELMAkGA1UEBhMCREUxDDAKBgNVBAgMA05SVzENMAsGA1UEBwwEQm9u
|
||||
bjEOMAwGA1UECgwFRmVsaXgxEjAQBgNVBAMMCWxvY2FsaG9zdDEhMB8GCSqGSIb3
|
||||
DQEJARYSZmVsaXhwa0BvdXRsb29rLmRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
|
||||
MIIBCgKCAQEA0ut7qAzPuNPoZmQNCyOkDL8szBT6+pspGNQHQpL7GG5UotlniXcp
|
||||
q+FtF4X4PEow5P0aRMBG72QIxUzAtFiqK2/RCbK3ECrKezedM26BT0xkEB/eUU7E
|
||||
RQIO+XYa4JUi+g+YwnDCnPWexGIsztq+vvHXdny+uMeRCBFQxiPuPwdB4uPQyy8d
|
||||
kv9XNScRCOu4Hp4IaFBIw5V7uP71WdyoHjD7NBbzubrVjcr+I0DC+MbpJOKpM/YB
|
||||
lbp+I9NeA/rWZ4r6rrMAVOv6tV2dgnQ+6cWOFBiM3ZkxuocPWg/iI4UzdSsy2K/W
|
||||
qONJfAjAqkmgkBBr2cyW5wwWEN8J994DIwIDAQABo1MwUTAdBgNVHQ4EFgQUWsMY
|
||||
gtEo2b2WtuROWMfRDKzwTT0wHwYDVR0jBBgwFoAUWsMYgtEo2b2WtuROWMfRDKzw
|
||||
TT0wDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAmGU2K9isN1Wm
|
||||
2PksR92pKrs7SJom2L3o7V3ui8oZ2FZrLx/IUeUA4aSmSeyqbxuziPqYUkO0ku1t
|
||||
9ASaf9yaNS7CULDftgoebLzlIEwktvEI3XixpRIfJJywHSG5eLsG51D65hyuOZ2z
|
||||
s0Y94HzvKX4fIaXv7NxGCW+xHhc6anxYKrXFldFwv3z/NHq0pzvd/aebbfuEeggH
|
||||
xpmA3dgi0y0meTLKzYzDypEhkUPiq6u8R+cEuFgSun89/fW80VktEo+32tkaczEm
|
||||
qjcZGfUFGNGG08p6MfRSl9PSakpdymV+aKK+TxB5nACe/RmISkqLz9REDlzUyNDm
|
||||
yArY8SEbhg==
|
||||
-----END CERTIFICATE-----
|
|
@ -10,5 +10,5 @@
|
|||
<string name="login_help_text"><b>MISP Server URL</b>\nDie URL unter der Ihre MISP Instanz erreichbar ist.\n\n<b>MISP Automatisierungs Schlüssel</b>\nZu finden unter ...</string>
|
||||
<string name="qr_code">QR code</string>
|
||||
<string name="sync">Synchronisation</string>
|
||||
<string name="no_syncs_hint">Sie haben noch keine MISP Instanzen verknüpft.</string>
|
||||
<string name="no_syncs_hint">Sie haben noch keine MISP Instanzen verknüpft</string>
|
||||
</resources>
|
|
@ -12,5 +12,5 @@
|
|||
<string name="ok" translatable="false">Okay</string>
|
||||
<string name="qr_code">QR code</string>
|
||||
<string name="sync">Synchronization</string>
|
||||
<string name="no_syncs_hint">You have not synced any MISP instances yet.</string>
|
||||
<string name="no_syncs_hint">You have not synced any MISP instances yet</string>
|
||||
</resources>
|
||||
|
|
|
@ -12,6 +12,15 @@
|
|||
<item name="android:windowTranslucentStatus">true</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.FullScreenDialog" parent="Theme.MaterialComponents.Light.DialogWhenLarge">
|
||||
<item name="android:statusBarColor">@color/colorPrimaryDark</item>
|
||||
</style>
|
||||
|
||||
<style name="DialogAnimation">
|
||||
<item name="android:windowEnterAnimation">@anim/fade_in</item>
|
||||
<item name="android:windowExitAnimation">@anim/fade_out</item>
|
||||
</style>
|
||||
|
||||
<style name="Text"/>
|
||||
|
||||
<style name="Text.Title" >
|
||||
|
|
Loading…
Reference in New Issue