Commit fb614149 authored by rahadi's avatar rahadi

Added Pemutakhiran Module

Migrate to id.ac.stis.capi
parent 9cf02be6
...@@ -18,6 +18,7 @@ import android.util.Log; ...@@ -18,6 +18,7 @@ import android.util.Log;
import android.view.View; import android.view.View;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.Toast; import android.widget.Toast;
import com.google.firebase.messaging.FirebaseMessaging; import com.google.firebase.messaging.FirebaseMessaging;
import com.mikepenz.materialdrawer.AccountHeader; import com.mikepenz.materialdrawer.AccountHeader;
import com.mikepenz.materialdrawer.AccountHeaderBuilder; import com.mikepenz.materialdrawer.AccountHeaderBuilder;
...@@ -31,13 +32,21 @@ import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem; ...@@ -31,13 +32,21 @@ import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem;
import com.mikepenz.materialdrawer.util.AbstractDrawerImageLoader; import com.mikepenz.materialdrawer.util.AbstractDrawerImageLoader;
import com.mikepenz.materialdrawer.util.DrawerImageLoader; import com.mikepenz.materialdrawer.util.DrawerImageLoader;
import com.rahadi.vsen.contexts.Vsen; import com.rahadi.vsen.contexts.Vsen;
import com.rahadi.vsen.daos.*; import com.rahadi.vsen.daos.BlokSensusDao;
import com.rahadi.vsen.daos.CatatanDao;
import com.rahadi.vsen.daos.DsrtDao;
import com.rahadi.vsen.daos.DsrtLogDao;
import com.rahadi.vsen.daos.RutaDao;
import com.rahadi.vsen.listeners.OnSynchronizationCompletedListener; import com.rahadi.vsen.listeners.OnSynchronizationCompletedListener;
import com.rahadi.vsen.models.UserModel; import com.rahadi.vsen.models.UserModel;
import com.rahadi.vsen.tasks.BSSynchronizationTask; import com.rahadi.vsen.tasks.BSSynchronizationTask;
import com.squareup.picasso.Picasso; import com.squareup.picasso.Picasso;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray; import org.json.JSONArray;
import java.util.ArrayList;
import id.ac.stis.capi.R; import id.ac.stis.capi.R;
import id.ac.stis.capi.activities.SplashScreenActivity; import id.ac.stis.capi.activities.SplashScreenActivity;
import id.ac.stis.capi.collectiva.fragment.CapiFormFragment; import id.ac.stis.capi.collectiva.fragment.CapiFormFragment;
...@@ -48,17 +57,16 @@ import id.ac.stis.capi.pemutakhiran.fragments.BSFragment; ...@@ -48,17 +57,16 @@ import id.ac.stis.capi.pemutakhiran.fragments.BSFragment;
import id.ac.stis.capi.petawbdigital.activities.GeoPointMapboxRevoActivity; import id.ac.stis.capi.petawbdigital.activities.GeoPointMapboxRevoActivity;
import id.ac.stis.capi.petawbdigital.assets.VAR; import id.ac.stis.capi.petawbdigital.assets.VAR;
import id.ac.stis.capi.petawbdigital.externals.AksesDataOdk; import id.ac.stis.capi.petawbdigital.externals.AksesDataOdk;
import id.ac.stis.capi.petawbdigital.fragments.WbFragment;
import id.ac.stis.capi.petawbdigital.models.BlokSensus; import id.ac.stis.capi.petawbdigital.models.BlokSensus;
import id.ac.stis.capi.petawbdigital.models.Form; import id.ac.stis.capi.petawbdigital.models.Form;
import id.ac.stis.capi.preferences.GeneralSharedPreferences; import id.ac.stis.capi.preferences.GeneralSharedPreferences;
import id.ac.stis.capi.preferences.PreferenceKeys; import id.ac.stis.capi.preferences.PreferenceKeys;
import id.ac.stis.capi.revalidasi.activities.DataDownloadActivity; import id.ac.stis.capi.revalidasi.fragments.DataDownloadFragment;
import id.ac.stis.capi.revalidasi.notifikasi.GetUuidTask; import id.ac.stis.capi.revalidasi.notifikasi.GetUuidTask;
import id.ac.stis.capi.tasks.DiskSyncTask; import id.ac.stis.capi.tasks.DiskSyncTask;
import timber.log.Timber; import timber.log.Timber;
import java.util.ArrayList;
/** /**
* @author Muhammad Tohir * @author Muhammad Tohir
* edit Mahendri Dwicahyo * edit Mahendri Dwicahyo
...@@ -78,6 +86,8 @@ public class CapiMainActivity extends AppCompatActivity implements DiskSyncListe ...@@ -78,6 +86,8 @@ public class CapiMainActivity extends AppCompatActivity implements DiskSyncListe
private GeneralSharedPreferences prefs; private GeneralSharedPreferences prefs;
private CapiFormFragment capiListForms; private CapiFormFragment capiListForms;
private BSFragment bsFragment; private BSFragment bsFragment;
private DataDownloadFragment dataDownloadFragment;
private WbFragment wbFragment;
private Toolbar toolbar; private Toolbar toolbar;
private DiskSyncTask diskSyncTask; private DiskSyncTask diskSyncTask;
...@@ -89,6 +99,8 @@ public class CapiMainActivity extends AppCompatActivity implements DiskSyncListe ...@@ -89,6 +99,8 @@ public class CapiMainActivity extends AppCompatActivity implements DiskSyncListe
toolbar = (Toolbar) findViewById(R.id.toolbar); toolbar = (Toolbar) findViewById(R.id.toolbar);
capiListForms = new CapiFormFragment(); capiListForms = new CapiFormFragment();
bsFragment = BSFragment.newInstance(); bsFragment = BSFragment.newInstance();
dataDownloadFragment = DataDownloadFragment.newInstance();
wbFragment = WbFragment.newInstance();
prefs = GeneralSharedPreferences.getInstance(); prefs = GeneralSharedPreferences.getInstance();
setSupportActionBar(toolbar); setSupportActionBar(toolbar);
...@@ -258,9 +270,11 @@ public class CapiMainActivity extends AppCompatActivity implements DiskSyncListe ...@@ -258,9 +270,11 @@ public class CapiMainActivity extends AppCompatActivity implements DiskSyncListe
.addStickyDrawerItems( .addStickyDrawerItems(
new SecondaryDrawerItem().withName("Pengaturan") new SecondaryDrawerItem().withName("Pengaturan")
.withIcon(R.drawable.ic_setting) .withIcon(R.drawable.ic_setting)
.withSelectable(false)
.withIdentifier(MENUSETTING), .withIdentifier(MENUSETTING),
new SecondaryDrawerItem().withName("Logout") new SecondaryDrawerItem().withName("Logout")
.withIcon(R.drawable.ic_logout) .withIcon(R.drawable.ic_logout)
.withSelectable(false)
.withIdentifier(MENULOGOUT)) .withIdentifier(MENULOGOUT))
.withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener() { .withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener() {
@Override @Override
...@@ -268,22 +282,26 @@ public class CapiMainActivity extends AppCompatActivity implements DiskSyncListe ...@@ -268,22 +282,26 @@ public class CapiMainActivity extends AppCompatActivity implements DiskSyncListe
switch ((int) drawerItem.getIdentifier()) { switch ((int) drawerItem.getIdentifier()) {
case MENU_PEMUTAKHIRAN: case MENU_PEMUTAKHIRAN:
// startActivity(new Intent(context, BSActivity.class)); // startActivity(new Intent(context, BSActivity.class));
getSupportActionBar().setTitle("PEMUTAKHIRAN"); getSupportActionBar().setTitle("Pemutakhiran");
openFragment(bsFragment); openFragment(bsFragment);
break; break;
case MENUSURVEY: case MENUSURVEY:
getSupportActionBar().setTitle("DAFTAR KUESIONER"); getSupportActionBar().setTitle("Daftar Kuesioner");
openFragment(capiListForms); openFragment(capiListForms);
break; break;
case MENU_UPDATE: case MENU_UPDATE:
Intent toDownUpdate = new Intent(context, DataDownloadActivity.class); getSupportActionBar().setTitle("Notifikasi");
startActivity(toDownUpdate); openFragment(dataDownloadFragment);
// Intent toDownUpdate = new Intent(context, DataDownloadActivity.class);
// startActivity(toDownUpdate);
break; break;
case MENU_PETA_WB: case MENU_PETA_WB:
showModal(); getSupportActionBar().setTitle("Peta WB Digital");
openFragment(wbFragment);
// showModal();
break; break;
case MENULOGOUT: case MENULOGOUT:
......
...@@ -191,7 +191,9 @@ public class CapiFormFragment extends Fragment implements FormListDownloaderList ...@@ -191,7 +191,9 @@ public class CapiFormFragment extends Fragment implements FormListDownloaderList
if (formNamesAndURLs.isEmpty()) { if (formNamesAndURLs.isEmpty()) {
// first time, so get the formlist // first time, so get the formlist
onRefresPage(); onRefreshPage();
} else {
onDoneLoading();
} }
return v; return v;
...@@ -235,7 +237,7 @@ public class CapiFormFragment extends Fragment implements FormListDownloaderList ...@@ -235,7 +237,7 @@ public class CapiFormFragment extends Fragment implements FormListDownloaderList
updateAdapter(); updateAdapter();
} }
private void onRefresPage() { private void onRefreshPage() {
Collect.getInstance().getActivityLogger().logAction(this, "refreshForms", ""); Collect.getInstance().getActivityLogger().logAction(this, "refreshForms", "");
mFilteredFormList.clear(); mFilteredFormList.clear();
...@@ -311,7 +313,7 @@ public class CapiFormFragment extends Fragment implements FormListDownloaderList ...@@ -311,7 +313,7 @@ public class CapiFormFragment extends Fragment implements FormListDownloaderList
break; break;
case R.id.action_refresh: case R.id.action_refresh:
Toast.makeText(getContext(), "Refreshing..", Toast.LENGTH_SHORT).show(); Toast.makeText(getContext(), "Refreshing..", Toast.LENGTH_SHORT).show();
onRefresPage(); onRefreshPage();
break; break;
} }
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);
...@@ -551,6 +553,10 @@ public class CapiFormFragment extends Fragment implements FormListDownloaderList ...@@ -551,6 +553,10 @@ public class CapiFormFragment extends Fragment implements FormListDownloaderList
if (shouldExit) { if (shouldExit) {
getActivity().finish(); getActivity().finish();
} }
//RAHADI
setUpDownloadedFormsOffline();
break; break;
} }
} }
......
...@@ -83,7 +83,7 @@ public class BSFragment extends Fragment implements OnBSAdapterButtonClickedList ...@@ -83,7 +83,7 @@ public class BSFragment extends Fragment implements OnBSAdapterButtonClickedList
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_blok_sensus, container, false); View v = inflater.inflate(R.layout.upd_fragment_blok_sensus, container, false);
setHasOptionsMenu(true); setHasOptionsMenu(true);
blokSensusList = v.findViewById(com.rahadi.vsen.R.id.list_blok_sensus); blokSensusList = v.findViewById(com.rahadi.vsen.R.id.list_blok_sensus);
......
package id.ac.stis.capi.petawbdigital.adapters;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.rahadi.vsen.listeners.OnRecyclerItemClickListener;
import java.util.List;
import id.ac.stis.capi.R;
import id.ac.stis.capi.petawbdigital.models.BlokSensus;
public class WbBlokSensusAdapter extends RecyclerView.Adapter<WbBlokSensusAdapter.ViewHolder> {
private Context context;
private List<BlokSensus> blokSensuses;
private OnRecyclerItemClickListener onRecyclerItemClickListener;
public WbBlokSensusAdapter(Context context, List<BlokSensus> blokSensuses) {
this.context = context;
this.blokSensuses = blokSensuses;
}
public void setOnRecyclerItemClickListener(OnRecyclerItemClickListener onRecyclerItemClickListener) {
this.onRecyclerItemClickListener = onRecyclerItemClickListener;
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.wb_item_bloksensus, parent, false);
ViewHolder viewHolder = new ViewHolder(v);
return viewHolder;
}
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
holder.bind(position);
}
@Override
public int getItemCount() {
return blokSensuses.size();
}
public class ViewHolder extends RecyclerView.ViewHolder {
TextView title;
public ViewHolder(View itemView) {
super(itemView);
title = itemView.findViewById(R.id.title);
}
void bind(final int position) {
title.setText(blokSensuses.get(position).getNamaBs());
if (onRecyclerItemClickListener != null) {
itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
onRecyclerItemClickListener.onItemClick(view, position);
}
});
}
}
}
}
package id.ac.stis.capi.petawbdigital.fragments;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.rahadi.vsen.listeners.OnRecyclerItemClickListener;
import com.rahadi.vsen.views.ExtendedRecyclerView;
import java.util.List;
import id.ac.stis.capi.R;
import id.ac.stis.capi.dao.FormsDao;
import id.ac.stis.capi.database.ItemsetDbAdapter;
import id.ac.stis.capi.dto.Form;
import id.ac.stis.capi.pemutakhiran.adapters.GenerateChooserAdapter;
import id.ac.stis.capi.petawbdigital.activities.GeoPointMapboxRevoActivity;
import id.ac.stis.capi.petawbdigital.adapters.WbBlokSensusAdapter;
import id.ac.stis.capi.petawbdigital.models.BlokSensus;
/**
* Created by Rahadi on 26/02/2018.
*/
public class WbFragment extends Fragment {
WbBlokSensusAdapter adapter;
List<BlokSensus> blokSensusList;
View emptyView;
public WbFragment() {
// Required empty public constructor
}
public static WbFragment newInstance() {
WbFragment fragment = new WbFragment();
Bundle args = new Bundle();
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.vd_fragment_download, container, false);
setHasOptionsMenu(true);
ExtendedRecyclerView recyclerView = v.findViewById(R.id.vd_recycler_down);
emptyView = v.findViewById(R.id.holder_message);
blokSensusList = ItemsetDbAdapter.getInstance(getActivity()).getListBlokSensus();
adapter = new WbBlokSensusAdapter(getActivity(), blokSensusList);
adapter.setOnRecyclerItemClickListener(new OnRecyclerItemClickListener() {
@Override
public void onItemClick(View v, final int position) {
final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setTitle("Pilih Kuesioner");
FormsDao fd = new FormsDao();
List<Form> forms = fd.getFormsFromCursor(fd.getFormsCursor());
if (forms.isEmpty()) {
builder.setMessage("Anda belum mengunduh kuesioner. " +
"\nTips: Unduh kuesioner terlebih dahulu dari menu Daftar Kuesioner untuk dapat menggunakan fitur ini.");
} else {
final GenerateChooserAdapter generateAdapter = new GenerateChooserAdapter(getActivity(), forms);
builder.setAdapter(generateAdapter, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Form form = (Form) generateAdapter.getItem(i);
Intent intent = new Intent(getActivity(), GeoPointMapboxRevoActivity.class);
intent.putExtra("idBs", blokSensusList.get(position).getIdBs());
intent.putExtra("idKuesioner", form.getJrFormId());
intent.putExtra("question", false);
startActivity(intent);
}
});
}
builder.setNegativeButton("Batal", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
dialogInterface.dismiss();
}
});
AlertDialog dialog = builder.create();
dialog.getListView().setSelector(android.R.color.transparent);
dialog.show();
}
});
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
recyclerView.setEmptyView(emptyView);
recyclerView.setAdapter(adapter);
return v;
}
}
...@@ -11,7 +11,7 @@ public final class NotifDataProviderAPI { ...@@ -11,7 +11,7 @@ public final class NotifDataProviderAPI {
private NotifDataProviderAPI(){} private NotifDataProviderAPI(){}
public static final String AUTHORITY = "org.odk.collect.android.provider.odk.notifdata"; public static final String AUTHORITY = "id.ac.stis.capi.provider.odk.notifdata";
public static final class NotifDataColumns implements BaseColumns { public static final class NotifDataColumns implements BaseColumns {
private NotifDataColumns(){} private NotifDataColumns(){}
......
package id.ac.stis.capi.revalidasi.fragments;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.ContentResolver;
import android.content.Context;
import android.content.DialogInterface;
import android.database.Cursor;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import java.io.File;
import id.ac.stis.capi.R;
import id.ac.stis.capi.application.Collect;
import id.ac.stis.capi.provider.InstanceProviderAPI;
import id.ac.stis.capi.receivers.NetworkReceiver;
import id.ac.stis.capi.revalidasi.activities.DownloadIsian;
import id.ac.stis.capi.revalidasi.adapter.DownAdapter;
import id.ac.stis.capi.revalidasi.briefcase.util.FileSystemUtils;
import id.ac.stis.capi.revalidasi.custom.NotifData;
import id.ac.stis.capi.revalidasi.custom.NotifDataDao;
import id.ac.stis.capi.revalidasi.listener.DownloadListener;
import id.ac.stis.capi.utilities.ToastUtils;
/**
* Created by Rahadi on 26/02/2018.
*/
public class DataDownloadFragment extends Fragment implements DownAdapter.DownClickHandler, DownloadListener {
private DownAdapter adapter;
private NotifDataDao notifDataDao;
private Cursor cursorData;
private ProgressDialog progressDialog;
public DataDownloadFragment() {
// Required empty public constructor
}
public static DataDownloadFragment newInstance() {
DataDownloadFragment fragment = new DataDownloadFragment();
Bundle args = new Bundle();
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.vd_fragment_download, container, false);
setHasOptionsMenu(true);
RecyclerView recyclerView = (RecyclerView) v.findViewById(R.id.vd_recycler_down);
adapter = new DownAdapter(null, this);
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
recyclerView.setAdapter(adapter);
notifDataDao = new NotifDataDao();
cursorData = notifDataDao.getNotifDataCursor();
adapter.changeCursor(cursorData);
return v;
}
@Override
public void onPostDownload(boolean successDownload, NotifData notifData) {
progressDialog.dismiss();
if (successDownload)
Toast.makeText(getActivity(), "Isian sukses diunduh", Toast.LENGTH_SHORT).show();
else
Toast.makeText(getActivity(), "Gagal mengunduh", Toast.LENGTH_SHORT).show();
}
@Override
public void onImgClick(long idInstance) {
ConnectivityManager connectivityManager = (ConnectivityManager) getActivity().getSystemService(
Context.CONNECTIVITY_SERVICE);
NetworkInfo ni = connectivityManager.getActiveNetworkInfo();
if (NetworkReceiver.running)
ToastUtils.showShortToast("Processing other request, please wait");
else if (ni == null || !ni.isConnected())
ToastUtils.showShortToast(R.string.no_connection);
else downloadSelected(idInstance);
}
void initiateDownloadData(NotifData notifData) {
progressDialog = new ProgressDialog(getActivity());
progressDialog.setIndeterminate(true);
progressDialog.setTitle("Mengunduh");
progressDialog.setMessage("Mengunduh " + notifData.getNameInstance());
progressDialog.show();
DownloadIsian downloadIsian = new DownloadIsian(notifData, getActivity(), this);
downloadIsian.executeIsian();
}
void downloadSelected(long idInstance) {
final NotifData notifData = notifDataDao.getNotifData(idInstance);
//cek file yang sama
final String fileName = Collect.INSTANCES_PATH + File.separator
+ FileSystemUtils.asFilesystemSafeName(notifData.getUuid()) + File.separator
+ FileSystemUtils.asFilesystemSafeName(notifData.getUuid()) + ".xml";
File file = new File(fileName);
if (file.exists()) {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setTitle("Isian sama");
builder.setMessage("Terdapat isian yang mirip pada data lokal")
.setCancelable(false)
.setPositiveButton("Unduh", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
String where = InstanceProviderAPI.InstanceColumns.INSTANCE_FILE_PATH + " =?";
String[] whereArgs = new String[]{fileName};
ContentResolver resolver = Collect.getInstance().getContentResolver();
resolver.delete(InstanceProviderAPI.InstanceColumns.CONTENT_URI, where, whereArgs);
initiateDownloadData(notifData);
}
})
.setNegativeButton("Batal", null);
//tidak terdapat duplikat
} else initiateDownloadData(notifData);
}
}
<?xml version="1.0" encoding="utf-8"?>
<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"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="id.ac.stis.capi.revalidasi.activities.DataDownloadActivity">
<com.rahadi.vsen.views.ExtendedRecyclerView
android:id="@+id/vd_recycler_down"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:id="@+id/holder_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:padding="30dp"
android:orientation="vertical">
<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"/>
<TextView
android:id="@+id/message_error"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:text="Sorry, internal error."/>
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:foreground="?attr/selectableItemBackgroundBorderless"
android:orientation="vertical"
android:layout_marginBottom="4dp"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_marginTop="4dp"
app:cardElevation="1.6dp"
app:cardUseCompatPadding="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/image_pattern"
android:layout_width="match_parent"
android:layout_height="30dp"
android:adjustViewBounds="true"
android:alpha="0.8"
android:scaleType="centerCrop"
android:src="@drawable/pattern8" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/image_pattern"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="16dp">
<ImageView
android:id="@+id/img_project"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_centerInParent="true"
android:layout_marginRight="16dp"
android:background="@drawable/cl_cicle_bg_trans_stroke_darkgray"