| 2 |
gabriel |
1 |
package com.cesams.twogetskills.fragment;
|
|
|
2 |
|
|
|
3 |
import android.os.Bundle;
|
|
|
4 |
|
| 11 |
gabriel |
5 |
import androidx.annotation.NonNull;
|
| 2 |
gabriel |
6 |
import androidx.fragment.app.Fragment;
|
|
|
7 |
import androidx.lifecycle.LifecycleOwner;
|
| 17 |
gabriel |
8 |
import androidx.lifecycle.ViewModelProvider;
|
| 2 |
gabriel |
9 |
import androidx.recyclerview.widget.GridLayoutManager;
|
|
|
10 |
import androidx.recyclerview.widget.RecyclerView;
|
|
|
11 |
|
| 13 |
gabriel |
12 |
import android.text.Editable;
|
|
|
13 |
import android.text.TextWatcher;
|
| 2 |
gabriel |
14 |
import android.util.Log;
|
|
|
15 |
import android.view.LayoutInflater;
|
| 11 |
gabriel |
16 |
import android.view.MotionEvent;
|
| 2 |
gabriel |
17 |
import android.view.View;
|
|
|
18 |
import android.view.ViewGroup;
|
| 11 |
gabriel |
19 |
import android.widget.AdapterView;
|
| 9 |
gabriel |
20 |
import android.widget.Button;
|
| 8 |
gabriel |
21 |
import android.widget.EditText;
|
| 9 |
gabriel |
22 |
import android.widget.ImageView;
|
|
|
23 |
import android.widget.ProgressBar;
|
| 2 |
gabriel |
24 |
import android.widget.TextView;
|
| 46 |
gabriel |
25 |
import android.widget.Toast;
|
| 2 |
gabriel |
26 |
|
| 9 |
gabriel |
27 |
import com.bumptech.glide.Glide;
|
|
|
28 |
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
|
|
29 |
import com.bumptech.glide.load.model.GlideUrl;
|
|
|
30 |
import com.bumptech.glide.load.model.LazyHeaders;
|
|
|
31 |
import com.bumptech.glide.request.RequestOptions;
|
|
|
32 |
import com.cesams.twogetskills.Constants;
|
| 2 |
gabriel |
33 |
import com.cesams.twogetskills.R;
|
|
|
34 |
import com.cesams.twogetskills.adapter.CapsuleListViewAdapter;
|
| 4 |
gabriel |
35 |
import com.cesams.twogetskills.adapter.TabsCapsulesAdapter;
|
| 2 |
gabriel |
36 |
import com.cesams.twogetskills.dao.CapsuleDao;
|
| 25 |
gabriel |
37 |
import com.cesams.twogetskills.dao.NotificationCenterDao;
|
| 2 |
gabriel |
38 |
import com.cesams.twogetskills.dao.ProgressDao;
|
| 16 |
gabriel |
39 |
import com.cesams.twogetskills.dao.SlideDao;
|
| 2 |
gabriel |
40 |
import com.cesams.twogetskills.dao.TopicDao;
|
|
|
41 |
import com.cesams.twogetskills.entity.Capsule;
|
|
|
42 |
import com.cesams.twogetskills.entity.Progress;
|
| 16 |
gabriel |
43 |
import com.cesams.twogetskills.entity.Slide;
|
| 2 |
gabriel |
44 |
import com.cesams.twogetskills.entity.Topic;
|
| 9 |
gabriel |
45 |
import com.cesams.twogetskills.library.MD5;
|
| 2 |
gabriel |
46 |
import com.cesams.twogetskills.skeleton.ITwoGetSkills;
|
| 17 |
gabriel |
47 |
import com.cesams.twogetskills.viewmodel.SlideRefreshUIViewModel;
|
| 12 |
gabriel |
48 |
import com.google.android.material.tabs.TabLayout;
|
| 2 |
gabriel |
49 |
|
| 24 |
gabriel |
50 |
import java.text.DateFormat;
|
| 21 |
gabriel |
51 |
import java.text.Normalizer;
|
| 24 |
gabriel |
52 |
import java.text.SimpleDateFormat;
|
| 2 |
gabriel |
53 |
import java.util.ArrayList;
|
| 9 |
gabriel |
54 |
import java.util.Calendar;
|
| 25 |
gabriel |
55 |
import java.util.Date;
|
| 2 |
gabriel |
56 |
import java.util.HashMap;
|
|
|
57 |
import java.util.List;
|
| 9 |
gabriel |
58 |
import java.util.Random;
|
|
|
59 |
import java.util.TimeZone;
|
| 2 |
gabriel |
60 |
|
|
|
61 |
/**
|
|
|
62 |
* A simple {@link Fragment} subclass.
|
|
|
63 |
* Use the {@link WelcomeFragment#newInstance} factory method to
|
|
|
64 |
* create an instance of this fragment.
|
|
|
65 |
*/
|
| 17 |
gabriel |
66 |
public class WelcomeFragment extends Fragment implements TabsCapsulesAdapter.ClickListener, LifecycleOwner {
|
| 2 |
gabriel |
67 |
|
| 10 |
gabriel |
68 |
TextView username, titulotarjeta, progresoporcentaje, empezar; ProgressBar progresotarjeta;
|
| 9 |
gabriel |
69 |
private ITwoGetSkills iTwoGetSkills; View card;
|
| 2 |
gabriel |
70 |
ArrayList<HashMap<String, String>> capsuleList;
|
| 11 |
gabriel |
71 |
ImageView imagetarjeta;
|
|
|
72 |
TabsCapsulesAdapter adapter2;
|
|
|
73 |
RecyclerView categorizados;
|
| 9 |
gabriel |
74 |
EditText busqueda; TextView textowelcome; Button continuar;
|
| 17 |
gabriel |
75 |
TabLayout tabs; String tabactual="pendientes"; private SlideRefreshUIViewModel mSlideRefreshUi;
|
| 2 |
gabriel |
76 |
|
| 17 |
gabriel |
77 |
|
| 2 |
gabriel |
78 |
public WelcomeFragment() {
|
|
|
79 |
// Required empty public constructor
|
|
|
80 |
}
|
|
|
81 |
|
|
|
82 |
public static WelcomeFragment newInstance() {
|
|
|
83 |
WelcomeFragment fragment = new WelcomeFragment();
|
|
|
84 |
return fragment;
|
|
|
85 |
}
|
|
|
86 |
|
|
|
87 |
@Override
|
|
|
88 |
public void onCreate(Bundle savedInstanceState) {
|
|
|
89 |
super.onCreate(savedInstanceState);
|
|
|
90 |
}
|
|
|
91 |
|
|
|
92 |
@Override
|
|
|
93 |
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
|
|
94 |
Bundle savedInstanceState) {
|
|
|
95 |
|
| 8 |
gabriel |
96 |
|
| 2 |
gabriel |
97 |
iTwoGetSkills = (ITwoGetSkills) getActivity();
|
|
|
98 |
|
| 56 |
gabriel |
99 |
|
| 2 |
gabriel |
100 |
View view= inflater.inflate(R.layout.fragment_welcome, container, false);
|
|
|
101 |
|
|
|
102 |
username=view.findViewById(R.id.textView14);
|
| 8 |
gabriel |
103 |
textowelcome= view.findViewById(R.id.textView15);
|
|
|
104 |
busqueda=view.findViewById(R.id.busqueda);
|
| 12 |
gabriel |
105 |
card= view.findViewById(R.id.include); empezar= view.findViewById(R.id.titlenotifi); tabs=view.findViewById(R.id.tabLayout);
|
| 8 |
gabriel |
106 |
capsuleList = new ArrayList<>();
|
| 2 |
gabriel |
107 |
|
| 17 |
gabriel |
108 |
|
|
|
109 |
mSlideRefreshUi = new ViewModelProvider(requireActivity()).get(SlideRefreshUIViewModel.class);
|
|
|
110 |
|
|
|
111 |
|
|
|
112 |
|
|
|
113 |
|
| 9 |
gabriel |
114 |
//Tarjeta Principal
|
| 11 |
gabriel |
115 |
titulotarjeta = view.findViewById(R.id.description); progresotarjeta= view.findViewById(R.id.progressBar2); imagetarjeta= view.findViewById(R.id.imagelist);
|
| 9 |
gabriel |
116 |
continuar = view.findViewById(R.id.button); progresoporcentaje = view.findViewById(R.id.textView16);
|
|
|
117 |
|
|
|
118 |
|
| 2 |
gabriel |
119 |
username.setText("¡Hola, "+(iTwoGetSkills.getPreference().getFirstName() +"!"));
|
|
|
120 |
|
| 12 |
gabriel |
121 |
tabs.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
|
|
|
122 |
@Override
|
|
|
123 |
public void onTabSelected(TabLayout.Tab tab) {
|
|
|
124 |
int position=tab.getPosition();
|
| 2 |
gabriel |
125 |
|
| 12 |
gabriel |
126 |
capsuleList.clear();
|
|
|
127 |
adapter2.notifyDataSetChanged();
|
| 2 |
gabriel |
128 |
|
| 12 |
gabriel |
129 |
if(position==0)
|
|
|
130 |
{
|
| 13 |
gabriel |
131 |
tabactual="pendientes";
|
|
|
132 |
loadData(tabactual,"");
|
| 12 |
gabriel |
133 |
adapter2.notifyDataSetChanged();
|
|
|
134 |
}
|
|
|
135 |
else if(position==1)
|
|
|
136 |
{
|
| 13 |
gabriel |
137 |
tabactual="cursando";
|
|
|
138 |
loadData("cursando","");
|
| 12 |
gabriel |
139 |
adapter2.notifyDataSetChanged();
|
|
|
140 |
}
|
|
|
141 |
else if(position==2)
|
|
|
142 |
{
|
| 13 |
gabriel |
143 |
tabactual="finalizados";
|
|
|
144 |
loadData("finalizados","");
|
| 12 |
gabriel |
145 |
adapter2.notifyDataSetChanged();
|
|
|
146 |
}
|
|
|
147 |
}
|
|
|
148 |
|
|
|
149 |
@Override
|
|
|
150 |
public void onTabUnselected(TabLayout.Tab tab) {
|
|
|
151 |
|
|
|
152 |
}
|
|
|
153 |
|
|
|
154 |
@Override
|
|
|
155 |
public void onTabReselected(TabLayout.Tab tab) {
|
|
|
156 |
|
|
|
157 |
}
|
|
|
158 |
});
|
|
|
159 |
|
| 13 |
gabriel |
160 |
loadData("pendientes","");
|
| 12 |
gabriel |
161 |
|
| 8 |
gabriel |
162 |
busqueda.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
|
|
163 |
@Override
|
|
|
164 |
public void onFocusChange(View v, boolean hasFocus) {
|
|
|
165 |
if(hasFocus)
|
|
|
166 |
{
|
| 9 |
gabriel |
167 |
card.setVisibility(View.GONE);
|
| 8 |
gabriel |
168 |
username.setVisibility(View.GONE);
|
|
|
169 |
textowelcome.setVisibility(View.GONE);
|
| 34 |
gabriel |
170 |
Log.e("Tengo foco"," Oculto");
|
| 8 |
gabriel |
171 |
}
|
|
|
172 |
|
|
|
173 |
}
|
|
|
174 |
});
|
|
|
175 |
|
| 13 |
gabriel |
176 |
busqueda.addTextChangedListener(new TextWatcher() {
|
|
|
177 |
@Override
|
|
|
178 |
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
| 8 |
gabriel |
179 |
|
| 13 |
gabriel |
180 |
}
|
|
|
181 |
|
|
|
182 |
@Override
|
|
|
183 |
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
| 17 |
gabriel |
184 |
// Log.e("El texto","buscado: "+s);
|
| 13 |
gabriel |
185 |
capsuleList.clear();
|
|
|
186 |
adapter2.notifyDataSetChanged();
|
|
|
187 |
loadData(tabactual, s.toString());
|
|
|
188 |
}
|
|
|
189 |
|
|
|
190 |
@Override
|
|
|
191 |
public void afterTextChanged(Editable s) {
|
|
|
192 |
|
|
|
193 |
|
|
|
194 |
|
|
|
195 |
}
|
|
|
196 |
});
|
|
|
197 |
|
|
|
198 |
|
| 4 |
gabriel |
199 |
adapter2 = new TabsCapsulesAdapter(getContext(),capsuleList);
|
| 2 |
gabriel |
200 |
|
|
|
201 |
|
|
|
202 |
|
| 4 |
gabriel |
203 |
categorizados = view.findViewById(R.id.categorizados);
|
|
|
204 |
GridLayoutManager layoutcategoria = new GridLayoutManager(getContext(),1,GridLayoutManager.VERTICAL, false);
|
|
|
205 |
categorizados.setLayoutManager(layoutcategoria);
|
|
|
206 |
categorizados.setAdapter(adapter2);
|
|
|
207 |
|
| 11 |
gabriel |
208 |
|
| 17 |
gabriel |
209 |
adapter2.setClickListener(this);
|
| 11 |
gabriel |
210 |
|
| 8 |
gabriel |
211 |
categorizados.setOnFlingListener(new RecyclerView.OnFlingListener() {
|
|
|
212 |
@Override
|
|
|
213 |
public boolean onFling(int velocityX, int velocityY) {
|
|
|
214 |
|
|
|
215 |
if (categorizados.canScrollVertically(-1) ) {
|
|
|
216 |
|
| 17 |
gabriel |
217 |
// Log.e("Se activa", "On fling");
|
| 9 |
gabriel |
218 |
card.setVisibility(View.GONE);
|
| 8 |
gabriel |
219 |
username.setVisibility(View.GONE);
|
|
|
220 |
textowelcome.setVisibility(View.GONE);
|
|
|
221 |
}else
|
|
|
222 |
{
|
| 9 |
gabriel |
223 |
card.setVisibility(View.VISIBLE);
|
| 8 |
gabriel |
224 |
username.setVisibility(View.VISIBLE);
|
|
|
225 |
textowelcome.setVisibility(View.VISIBLE);
|
|
|
226 |
}
|
|
|
227 |
|
|
|
228 |
return false;
|
|
|
229 |
}
|
|
|
230 |
});
|
|
|
231 |
|
| 11 |
gabriel |
232 |
|
| 8 |
gabriel |
233 |
/* categorizados.setOnScrollChangeListener(new View.OnScrollChangeListener() {
|
|
|
234 |
@Override
|
|
|
235 |
public void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
|
|
|
236 |
|
|
|
237 |
if (!categorizados.canScrollVertically(-1)) {
|
|
|
238 |
// Toast.makeText(getActivity(), "Last", Toast.LENGTH_LONG).show();
|
|
|
239 |
capsulas.setVisibility(View.VISIBLE);
|
|
|
240 |
username.setVisibility(View.VISIBLE);
|
|
|
241 |
textowelcome.setVisibility(View.VISIBLE);
|
|
|
242 |
Log.e("On scroll"," se activa");
|
|
|
243 |
}
|
|
|
244 |
|
|
|
245 |
}
|
|
|
246 |
});
|
|
|
247 |
*/
|
| 21 |
gabriel |
248 |
getActivity().runOnUiThread(() -> {
|
|
|
249 |
String message = capsuleList.size() == 1
|
|
|
250 |
? "Hay 1 cápsula nueva disponible"
|
|
|
251 |
: "Tiene " + capsuleList.size() + " cápsulas pendientes para ver";
|
|
|
252 |
|
| 46 |
gabriel |
253 |
Toast.makeText(getContext(), ""+message, Toast.LENGTH_LONG).show();
|
| 25 |
gabriel |
254 |
|
| 53 |
gabriel |
255 |
iTwoGetSkills.saveNotificationCenter("Contenidos disponibles","",message);
|
|
|
256 |
|
| 21 |
gabriel |
257 |
});
|
| 56 |
gabriel |
258 |
iTwoGetSkills.showNavigationAndToolbar();
|
|
|
259 |
|
| 2 |
gabriel |
260 |
return view;
|
|
|
261 |
}
|
|
|
262 |
|
| 9 |
gabriel |
263 |
@Override
|
|
|
264 |
public void onResume() {
|
|
|
265 |
super.onResume();
|
| 38 |
gabriel |
266 |
getActivity().runOnUiThread(() -> {
|
|
|
267 |
loadContinuecard();
|
|
|
268 |
});
|
| 9 |
gabriel |
269 |
}
|
| 2 |
gabriel |
270 |
|
| 9 |
gabriel |
271 |
@Override
|
|
|
272 |
public void onHiddenChanged(boolean hidden) {
|
|
|
273 |
super.onHiddenChanged(hidden);
|
|
|
274 |
|
| 17 |
gabriel |
275 |
// Log.e("TAG", "onHiddenChanged : " + (hidden ? "true" : "false"));
|
| 9 |
gabriel |
276 |
|
|
|
277 |
if(!hidden) {
|
| 27 |
gabriel |
278 |
// Log.e("Esta oculto", "el fragmento");
|
| 16 |
gabriel |
279 |
|
|
|
280 |
getActivity().runOnUiThread(() -> {
|
|
|
281 |
|
|
|
282 |
capsuleList.clear();
|
|
|
283 |
|
|
|
284 |
loadContinuecard();
|
|
|
285 |
loadData("pendientes","");
|
|
|
286 |
|
|
|
287 |
adapter2.notifyDataSetChanged();
|
|
|
288 |
|
|
|
289 |
tabs.getTabAt(0).select();
|
|
|
290 |
|
|
|
291 |
});
|
|
|
292 |
|
|
|
293 |
|
| 9 |
gabriel |
294 |
}
|
|
|
295 |
}
|
|
|
296 |
|
|
|
297 |
private void loadContinuecard(){
|
|
|
298 |
|
| 43 |
gabriel |
299 |
//Log.e("Cargo datos"," en tarjeta principal");
|
| 9 |
gabriel |
300 |
|
|
|
301 |
//Capsula de primera tarjeta
|
|
|
302 |
CapsuleDao capsuleDao = iTwoGetSkills.getDatabase().getCapsuleDao();
|
| 39 |
gabriel |
303 |
boolean continues=false;
|
| 9 |
gabriel |
304 |
Progress progress;
|
|
|
305 |
ProgressDao progressDao = iTwoGetSkills.getDatabase().getProgressDao();
|
|
|
306 |
|
| 17 |
gabriel |
307 |
|
| 9 |
gabriel |
308 |
List<Capsule> dbCapsules= capsuleDao.selectAll();
|
|
|
309 |
for(Capsule dbCapsule : dbCapsules)
|
|
|
310 |
{
|
|
|
311 |
progress = progressDao.selectByCapsuleUuid(dbCapsule.getUuid());
|
|
|
312 |
|
|
|
313 |
if (progress != null) {
|
|
|
314 |
|
| 10 |
gabriel |
315 |
if (progress.getProgress() < 100) {
|
| 43 |
gabriel |
316 |
// Log.e("Es menor"," a 100");
|
| 39 |
gabriel |
317 |
continues=true;
|
| 9 |
gabriel |
318 |
titulotarjeta.setText(dbCapsule.getName());
|
| 10 |
gabriel |
319 |
progresotarjeta.setVisibility(View.VISIBLE);
|
|
|
320 |
progresoporcentaje.setVisibility(View.VISIBLE);
|
| 9 |
gabriel |
321 |
progresotarjeta.setProgress((int) progress.getProgress());
|
|
|
322 |
progresoporcentaje.setText("" + progress.getProgress() + " %");
|
| 10 |
gabriel |
323 |
empezar.setText("En curso");
|
| 9 |
gabriel |
324 |
|
| 39 |
gabriel |
325 |
iTwoGetSkills.getPreference().setOrigennavigation("welcome");
|
|
|
326 |
|
| 38 |
gabriel |
327 |
int fragmentIdxActive = iTwoGetSkills.getPreference().getFragmentIdxActive();
|
|
|
328 |
|
|
|
329 |
if (fragmentIdxActive != Constants.IDX_FRAGMENT_WELCOME
|
|
|
330 |
) {
|
|
|
331 |
return;
|
|
|
332 |
}
|
| 26 |
gabriel |
333 |
iTwoGetSkills.getPreference().setCapsuleUuidActive(dbCapsule.getUuid());
|
| 38 |
gabriel |
334 |
// Log.e("La capsula","activa en loadcurso"+dbCapsule.getUuid());
|
|
|
335 |
|
| 26 |
gabriel |
336 |
iTwoGetSkills.getPreference().setTopicUuidActive(dbCapsule.getTopicUuid());
|
| 9 |
gabriel |
337 |
|
|
|
338 |
if (dbCapsule.getImage() != null && !dbCapsule.getImage().equals("")) {
|
|
|
339 |
|
|
|
340 |
TimeZone timeZone = TimeZone.getTimeZone("UTC");
|
|
|
341 |
Calendar calendar = Calendar.getInstance(timeZone);
|
|
|
342 |
TimeZone tz = calendar.getTimeZone();
|
|
|
343 |
int created = (int) (calendar.getTimeInMillis() / 1000);
|
|
|
344 |
|
|
|
345 |
Random random = new Random(created);
|
|
|
346 |
int rand = 1000 + random.nextInt(8999);
|
|
|
347 |
|
|
|
348 |
|
|
|
349 |
String deviceUuid = iTwoGetSkills.getPreference().getDeviceUuid();
|
|
|
350 |
String password = iTwoGetSkills.getPreference().getPassword();
|
|
|
351 |
|
|
|
352 |
|
|
|
353 |
String secret = MD5.generar(password + ':' + created + ':' + rand);
|
|
|
354 |
GlideUrl url = new GlideUrl(dbCapsule.getImage(), new LazyHeaders.Builder()
|
|
|
355 |
.addHeader(Constants.HTTP_HEADER_ACCEPT, Constants.HTTP_HEADER_ACCEPT_VALUE)
|
|
|
356 |
.addHeader(Constants.HTTP_HEADER_SECURITY_TOKEN, deviceUuid)
|
|
|
357 |
.addHeader(Constants.HTTP_HEADER_SECURITY_SECRET, secret)
|
|
|
358 |
.addHeader(Constants.HTTP_HEADER_SECURITY_CREATED, String.valueOf(created))
|
|
|
359 |
.addHeader(Constants.HTTP_HEADER_SECURITY_RAND, String.valueOf(rand))
|
|
|
360 |
.build());
|
|
|
361 |
|
|
|
362 |
RequestOptions options = new RequestOptions()
|
|
|
363 |
.diskCacheStrategy(DiskCacheStrategy.ALL);
|
|
|
364 |
|
|
|
365 |
Glide.with(getContext()).load(url)
|
|
|
366 |
.thumbnail()
|
|
|
367 |
.apply(options)
|
|
|
368 |
.into(imagetarjeta);
|
|
|
369 |
}
|
|
|
370 |
}
|
|
|
371 |
|
| 10 |
gabriel |
372 |
}
|
|
|
373 |
|
|
|
374 |
|
|
|
375 |
}
|
|
|
376 |
if(titulotarjeta.getText().equals(""))
|
|
|
377 |
{
|
| 17 |
gabriel |
378 |
// Log.e("Nombre","vacio");
|
| 37 |
gabriel |
379 |
SlideDao slideDao = iTwoGetSkills.getDatabase().getSlideDao();
|
| 10 |
gabriel |
380 |
|
| 37 |
gabriel |
381 |
|
| 10 |
gabriel |
382 |
//Despues del recorrido no se encontro progreso en ninguna capsula, por lo cual la tarjeta queda vacia
|
|
|
383 |
// vamos a llenarla con la ultima capsula, que debe ser nueva al no tener progreso
|
|
|
384 |
|
| 38 |
gabriel |
385 |
|
| 10 |
gabriel |
386 |
for(Capsule dbCapsule : dbCapsules)
|
|
|
387 |
{
|
| 37 |
gabriel |
388 |
List<Slide> slides = slideDao.selectAllByCapsuleUuid(dbCapsule.getUuid());
|
| 10 |
gabriel |
389 |
|
| 37 |
gabriel |
390 |
if (slides.isEmpty()) {
|
|
|
391 |
|
|
|
392 |
} else {
|
| 10 |
gabriel |
393 |
progress = progressDao.selectByCapsuleUuid(dbCapsule.getUuid());
|
| 38 |
gabriel |
394 |
|
| 37 |
gabriel |
395 |
// Log.e("Capsula","Es omitida, no tiene slides");
|
| 10 |
gabriel |
396 |
|
| 37 |
gabriel |
397 |
if (progress == null) {
|
| 10 |
gabriel |
398 |
|
| 37 |
gabriel |
399 |
// Log.e("Es nueva","");
|
| 10 |
gabriel |
400 |
|
|
|
401 |
titulotarjeta.setText(dbCapsule.getName());
|
|
|
402 |
progresotarjeta.setVisibility(View.INVISIBLE);
|
|
|
403 |
progresoporcentaje.setVisibility(View.INVISIBLE);
|
|
|
404 |
empezar.setText("Nueva");
|
|
|
405 |
continuar.setText("Ver cápsula");
|
|
|
406 |
|
| 39 |
gabriel |
407 |
iTwoGetSkills.getPreference().setOrigennavigation("welcome");
|
|
|
408 |
|
| 38 |
gabriel |
409 |
int fragmentIdxActive = iTwoGetSkills.getPreference().getFragmentIdxActive();
|
| 10 |
gabriel |
410 |
|
| 38 |
gabriel |
411 |
if (fragmentIdxActive != Constants.IDX_FRAGMENT_WELCOME
|
|
|
412 |
) {
|
|
|
413 |
return;
|
|
|
414 |
}
|
| 37 |
gabriel |
415 |
iTwoGetSkills.getPreference().setCapsuleUuidActive(dbCapsule.getUuid());
|
| 38 |
gabriel |
416 |
// Log.e("La capsula","activa en load"+dbCapsule.getUuid());
|
| 37 |
gabriel |
417 |
iTwoGetSkills.getPreference().setTopicUuidActive(dbCapsule.getTopicUuid());
|
| 26 |
gabriel |
418 |
|
| 37 |
gabriel |
419 |
if (dbCapsule.getImage() != null && !dbCapsule.getImage().equals("")) {
|
| 10 |
gabriel |
420 |
|
|
|
421 |
TimeZone timeZone = TimeZone.getTimeZone("UTC");
|
|
|
422 |
Calendar calendar = Calendar.getInstance(timeZone);
|
|
|
423 |
TimeZone tz = calendar.getTimeZone();
|
|
|
424 |
int created = (int) (calendar.getTimeInMillis() / 1000);
|
|
|
425 |
|
|
|
426 |
Random random = new Random(created);
|
|
|
427 |
int rand = 1000 + random.nextInt(8999);
|
|
|
428 |
|
|
|
429 |
|
|
|
430 |
String deviceUuid = iTwoGetSkills.getPreference().getDeviceUuid();
|
|
|
431 |
String password = iTwoGetSkills.getPreference().getPassword();
|
|
|
432 |
|
|
|
433 |
|
|
|
434 |
String secret = MD5.generar(password + ':' + created + ':' + rand);
|
|
|
435 |
GlideUrl url = new GlideUrl(dbCapsule.getImage(), new LazyHeaders.Builder()
|
|
|
436 |
.addHeader(Constants.HTTP_HEADER_ACCEPT, Constants.HTTP_HEADER_ACCEPT_VALUE)
|
|
|
437 |
.addHeader(Constants.HTTP_HEADER_SECURITY_TOKEN, deviceUuid)
|
|
|
438 |
.addHeader(Constants.HTTP_HEADER_SECURITY_SECRET, secret)
|
|
|
439 |
.addHeader(Constants.HTTP_HEADER_SECURITY_CREATED, String.valueOf(created))
|
|
|
440 |
.addHeader(Constants.HTTP_HEADER_SECURITY_RAND, String.valueOf(rand))
|
|
|
441 |
.build());
|
|
|
442 |
|
|
|
443 |
RequestOptions options = new RequestOptions()
|
|
|
444 |
.diskCacheStrategy(DiskCacheStrategy.ALL);
|
|
|
445 |
|
|
|
446 |
Glide.with(getContext()).load(url)
|
|
|
447 |
.thumbnail()
|
|
|
448 |
.apply(options)
|
|
|
449 |
.into(imagetarjeta);
|
|
|
450 |
}
|
|
|
451 |
|
|
|
452 |
}
|
| 37 |
gabriel |
453 |
}
|
| 10 |
gabriel |
454 |
|
| 38 |
gabriel |
455 |
}
|
| 10 |
gabriel |
456 |
|
|
|
457 |
|
|
|
458 |
|
| 38 |
gabriel |
459 |
}
|
| 39 |
gabriel |
460 |
else if (!titulotarjeta.getText().equals("") && !continues)
|
| 38 |
gabriel |
461 |
{
|
|
|
462 |
// Log.e("Nombre","vacio");
|
|
|
463 |
SlideDao slideDao = iTwoGetSkills.getDatabase().getSlideDao();
|
| 10 |
gabriel |
464 |
|
| 38 |
gabriel |
465 |
|
|
|
466 |
//Despues del recorrido no se encontro progreso en ninguna capsula, por lo cual la tarjeta queda vacia
|
|
|
467 |
// vamos a llenarla con la ultima capsula, que debe ser nueva al no tener progreso
|
|
|
468 |
|
|
|
469 |
|
|
|
470 |
for(Capsule dbCapsule : dbCapsules)
|
|
|
471 |
{
|
|
|
472 |
List<Slide> slides = slideDao.selectAllByCapsuleUuid(dbCapsule.getUuid());
|
|
|
473 |
|
|
|
474 |
if (slides.isEmpty()) {
|
|
|
475 |
|
|
|
476 |
} else {
|
|
|
477 |
progress = progressDao.selectByCapsuleUuid(dbCapsule.getUuid());
|
|
|
478 |
|
|
|
479 |
// Log.e("Capsula","Es omitida, no tiene slides");
|
|
|
480 |
|
|
|
481 |
if (progress == null) {
|
|
|
482 |
|
|
|
483 |
// Log.e("Es nueva","");
|
|
|
484 |
|
| 10 |
gabriel |
485 |
titulotarjeta.setText(dbCapsule.getName());
|
|
|
486 |
progresotarjeta.setVisibility(View.INVISIBLE);
|
|
|
487 |
progresoporcentaje.setVisibility(View.INVISIBLE);
|
|
|
488 |
empezar.setText("Nueva");
|
|
|
489 |
continuar.setText("Ver cápsula");
|
|
|
490 |
|
| 39 |
gabriel |
491 |
iTwoGetSkills.getPreference().setOrigennavigation("welcome");
|
|
|
492 |
|
|
|
493 |
|
| 38 |
gabriel |
494 |
int fragmentIdxActive = iTwoGetSkills.getPreference().getFragmentIdxActive();
|
|
|
495 |
|
|
|
496 |
if (fragmentIdxActive != Constants.IDX_FRAGMENT_WELCOME
|
|
|
497 |
) {
|
|
|
498 |
return;
|
|
|
499 |
}
|
| 10 |
gabriel |
500 |
iTwoGetSkills.getPreference().setCapsuleUuidActive(dbCapsule.getUuid());
|
| 38 |
gabriel |
501 |
// Log.e("La capsula","activa en load"+dbCapsule.getUuid());
|
| 10 |
gabriel |
502 |
iTwoGetSkills.getPreference().setTopicUuidActive(dbCapsule.getTopicUuid());
|
|
|
503 |
|
|
|
504 |
if (dbCapsule.getImage() != null && !dbCapsule.getImage().equals("")) {
|
|
|
505 |
|
|
|
506 |
TimeZone timeZone = TimeZone.getTimeZone("UTC");
|
|
|
507 |
Calendar calendar = Calendar.getInstance(timeZone);
|
|
|
508 |
TimeZone tz = calendar.getTimeZone();
|
|
|
509 |
int created = (int) (calendar.getTimeInMillis() / 1000);
|
|
|
510 |
|
|
|
511 |
Random random = new Random(created);
|
|
|
512 |
int rand = 1000 + random.nextInt(8999);
|
|
|
513 |
|
|
|
514 |
|
|
|
515 |
String deviceUuid = iTwoGetSkills.getPreference().getDeviceUuid();
|
|
|
516 |
String password = iTwoGetSkills.getPreference().getPassword();
|
|
|
517 |
|
|
|
518 |
|
|
|
519 |
String secret = MD5.generar(password + ':' + created + ':' + rand);
|
|
|
520 |
GlideUrl url = new GlideUrl(dbCapsule.getImage(), new LazyHeaders.Builder()
|
|
|
521 |
.addHeader(Constants.HTTP_HEADER_ACCEPT, Constants.HTTP_HEADER_ACCEPT_VALUE)
|
|
|
522 |
.addHeader(Constants.HTTP_HEADER_SECURITY_TOKEN, deviceUuid)
|
|
|
523 |
.addHeader(Constants.HTTP_HEADER_SECURITY_SECRET, secret)
|
|
|
524 |
.addHeader(Constants.HTTP_HEADER_SECURITY_CREATED, String.valueOf(created))
|
|
|
525 |
.addHeader(Constants.HTTP_HEADER_SECURITY_RAND, String.valueOf(rand))
|
|
|
526 |
.build());
|
|
|
527 |
|
|
|
528 |
RequestOptions options = new RequestOptions()
|
|
|
529 |
.diskCacheStrategy(DiskCacheStrategy.ALL);
|
|
|
530 |
|
|
|
531 |
Glide.with(getContext()).load(url)
|
|
|
532 |
.thumbnail()
|
|
|
533 |
.apply(options)
|
|
|
534 |
.into(imagetarjeta);
|
|
|
535 |
}
|
|
|
536 |
|
|
|
537 |
}
|
| 9 |
gabriel |
538 |
}
|
| 38 |
gabriel |
539 |
|
| 10 |
gabriel |
540 |
}
|
| 9 |
gabriel |
541 |
}
|
|
|
542 |
|
| 26 |
gabriel |
543 |
continuar.setOnClickListener(v -> {
|
| 10 |
gabriel |
544 |
|
|
|
545 |
|
| 23 |
gabriel |
546 |
// Log.e("Guardo",""+iTwoGetSkills.getPreference().getOrigenNavigation());
|
| 38 |
gabriel |
547 |
Log.e("Capsule","active"+iTwoGetSkills.getPreference().getCapsuleUuidActive());
|
| 58 |
gabriel |
548 |
iTwoGetSkills.invokeFragment(Constants.IDX_FRAGMENT_DETAIL_CAPSULE);
|
| 9 |
gabriel |
549 |
});
|
|
|
550 |
|
|
|
551 |
//Fin de primer tarjeta
|
|
|
552 |
|
|
|
553 |
}
|
|
|
554 |
|
| 13 |
gabriel |
555 |
private void loadData(String tabposition, String buscar)
|
| 2 |
gabriel |
556 |
{
|
|
|
557 |
|
| 12 |
gabriel |
558 |
|
| 2 |
gabriel |
559 |
TopicDao topicDao = iTwoGetSkills.getDatabase().getTopicDao();
|
|
|
560 |
ArrayList<Topic> dbTopics = (ArrayList<Topic>) topicDao.selectAll();
|
|
|
561 |
|
|
|
562 |
List<Capsule> dbCapsules;
|
|
|
563 |
CapsuleDao capsuleDao = iTwoGetSkills.getDatabase().getCapsuleDao();
|
|
|
564 |
|
| 24 |
gabriel |
565 |
ProgressDao progressDao = iTwoGetSkills.getDatabase().getProgressDao();
|
|
|
566 |
SlideDao slideDao = iTwoGetSkills.getDatabase().getSlideDao();
|
| 9 |
gabriel |
567 |
|
|
|
568 |
|
| 24 |
gabriel |
569 |
if (tabposition.equals("pendientes"))
|
|
|
570 |
{
|
|
|
571 |
for (Topic dbTopic : dbTopics) {
|
| 9 |
gabriel |
572 |
|
| 24 |
gabriel |
573 |
dbCapsules = capsuleDao.selectAllByTopicUuidandOrder(dbTopic.getUuid());
|
| 2 |
gabriel |
574 |
|
| 24 |
gabriel |
575 |
Capsule capsule;
|
|
|
576 |
Progress progress;
|
| 2 |
gabriel |
577 |
|
| 24 |
gabriel |
578 |
HashMap<String, String> m_li;
|
| 9 |
gabriel |
579 |
|
| 2 |
gabriel |
580 |
|
|
|
581 |
|
| 24 |
gabriel |
582 |
for(Capsule dbCapsule : dbCapsules) {
|
|
|
583 |
capsule = new Capsule();
|
|
|
584 |
capsule.setTopicUuid(dbCapsule.getTopicUuid());
|
|
|
585 |
capsule.setUuid(dbCapsule.getUuid());
|
|
|
586 |
capsule.setName(dbCapsule.getName());
|
|
|
587 |
capsule.setDescription(dbCapsule.getDescription());
|
|
|
588 |
capsule.setImage(dbCapsule.getImage());
|
|
|
589 |
capsule.setPosition(dbCapsule.getPosition());
|
|
|
590 |
capsule.setUpdatedOn(dbCapsule.getUpdatedOn());
|
| 9 |
gabriel |
591 |
|
| 24 |
gabriel |
592 |
m_li = new HashMap<>();
|
| 9 |
gabriel |
593 |
|
| 2 |
gabriel |
594 |
|
| 24 |
gabriel |
595 |
//m_li.put("copyright",copy);
|
| 2 |
gabriel |
596 |
|
| 24 |
gabriel |
597 |
progress = progressDao.selectByCapsuleUuid(capsule.getUuid());
|
| 2 |
gabriel |
598 |
|
| 24 |
gabriel |
599 |
if (progress != null) {
|
|
|
600 |
capsule.setCompleted(progress.getCompleted());
|
|
|
601 |
capsule.setViewSlides(progress.getViewSlides());
|
| 2 |
gabriel |
602 |
|
| 24 |
gabriel |
603 |
capsule.setTotalSlides(progress.getTotalSlides());
|
|
|
604 |
capsule.setProgress(progress.getProgress());
|
|
|
605 |
capsule.setAddedOn(progress.getAddedOn());
|
| 2 |
gabriel |
606 |
|
| 24 |
gabriel |
607 |
// Log.e("Agregado en"," "+progress.getAddedOn());
|
|
|
608 |
// m_li.put("addedon",progress.getAddedOn());
|
|
|
609 |
m_li.put("view", String.valueOf(progress.getViewSlides()));
|
|
|
610 |
m_li.put("total", String.valueOf(progress.getTotalSlides()));
|
|
|
611 |
m_li.put("progress", String.valueOf(progress.getProgress()));
|
|
|
612 |
m_li.put("completado",String.valueOf(progress.getCompleted()));
|
|
|
613 |
m_li.put("agregado",progress.getAddedOn());
|
| 2 |
gabriel |
614 |
|
| 24 |
gabriel |
615 |
}
|
| 2 |
gabriel |
616 |
|
| 24 |
gabriel |
617 |
m_li.put("imagen", capsule.getImage());
|
|
|
618 |
m_li.put("nombre", capsule.getName());
|
|
|
619 |
m_li.put("uuid", capsule.getUuid());
|
|
|
620 |
m_li.put("topicuuid", capsule.getTopicUuid());
|
|
|
621 |
m_li.put("description", capsule.getDescription());
|
| 16 |
gabriel |
622 |
|
| 18 |
gabriel |
623 |
|
| 24 |
gabriel |
624 |
//Lleno la lista segun el requerimiento de filtro accionado por el usuario
|
| 2 |
gabriel |
625 |
|
| 24 |
gabriel |
626 |
List<Slide> slides = slideDao.selectAllByCapsuleUuid(capsule.getUuid());
|
| 2 |
gabriel |
627 |
|
| 24 |
gabriel |
628 |
if (slides.isEmpty()) {
|
| 13 |
gabriel |
629 |
|
| 24 |
gabriel |
630 |
// Log.e("Capsula","Es omitida, no tiene slides");
|
|
|
631 |
} else {
|
| 2 |
gabriel |
632 |
|
| 12 |
gabriel |
633 |
|
| 24 |
gabriel |
634 |
if (progress == null) {
|
| 18 |
gabriel |
635 |
|
| 24 |
gabriel |
636 |
if (buscar.equals("")) {
|
| 18 |
gabriel |
637 |
|
| 24 |
gabriel |
638 |
capsuleList.add(m_li);
|
| 16 |
gabriel |
639 |
|
| 13 |
gabriel |
640 |
|
| 24 |
gabriel |
641 |
} else {
|
|
|
642 |
String nombre= capsule.getName();
|
|
|
643 |
String normalizada= Normalizer.normalize(nombre, Normalizer.Form.NFD);
|
|
|
644 |
normalizada= normalizada.replaceAll("[^\\p{ASCII}]", "");
|
|
|
645 |
if (normalizada.matches("(?i).*" + buscar + ".*")) {
|
|
|
646 |
capsuleList.add(m_li);
|
|
|
647 |
}
|
| 21 |
gabriel |
648 |
|
| 16 |
gabriel |
649 |
}
|
| 13 |
gabriel |
650 |
|
| 16 |
gabriel |
651 |
}
|
| 12 |
gabriel |
652 |
|
| 24 |
gabriel |
653 |
}
|
| 12 |
gabriel |
654 |
|
| 24 |
gabriel |
655 |
}
|
| 16 |
gabriel |
656 |
|
|
|
657 |
|
| 13 |
gabriel |
658 |
|
| 24 |
gabriel |
659 |
}
|
| 13 |
gabriel |
660 |
|
| 24 |
gabriel |
661 |
}
|
|
|
662 |
else if (tabposition.equals("cursando"))
|
|
|
663 |
{
|
| 2 |
gabriel |
664 |
|
| 24 |
gabriel |
665 |
HashMap<String, String> m_li;
|
|
|
666 |
List<Progress> progress;
|
|
|
667 |
Capsule capsule;
|
| 2 |
gabriel |
668 |
|
| 13 |
gabriel |
669 |
|
|
|
670 |
|
| 24 |
gabriel |
671 |
progress = progressDao.selectAllCapsulesProgress();
|
|
|
672 |
|
|
|
673 |
for(Progress dbProgress : progress) {
|
|
|
674 |
m_li = new HashMap<>();
|
|
|
675 |
|
|
|
676 |
capsule = capsuleDao.selectByUuid(dbProgress.getCapsuleUuid());
|
|
|
677 |
|
|
|
678 |
m_li.put("view", String.valueOf(dbProgress.getViewSlides()));
|
|
|
679 |
m_li.put("total", String.valueOf(dbProgress.getTotalSlides()));
|
|
|
680 |
m_li.put("progress", String.valueOf(dbProgress.getProgress()));
|
|
|
681 |
m_li.put("completado",String.valueOf(dbProgress.getCompleted()));
|
|
|
682 |
m_li.put("agregado",dbProgress.getAddedOn());
|
|
|
683 |
|
|
|
684 |
|
| 56 |
gabriel |
685 |
if(capsule == null)
|
|
|
686 |
{
|
|
|
687 |
Log.e("El objeto es"," nulo");
|
|
|
688 |
}
|
|
|
689 |
else {
|
|
|
690 |
m_li.put("imagen", capsule.getImage());
|
|
|
691 |
m_li.put("nombre", capsule.getName());
|
|
|
692 |
m_li.put("uuid", capsule.getUuid());
|
|
|
693 |
m_li.put("topicuuid", capsule.getTopicUuid());
|
|
|
694 |
m_li.put("description", capsule.getDescription());
|
| 24 |
gabriel |
695 |
|
|
|
696 |
|
| 56 |
gabriel |
697 |
|
| 24 |
gabriel |
698 |
//Log.e("Lista",""+m_li);
|
|
|
699 |
//Lleno la lista segun el requerimiento de filtro accionado por el usuario
|
|
|
700 |
|
|
|
701 |
List<Slide> slides = slideDao.selectAllByCapsuleUuid(capsule.getUuid());
|
|
|
702 |
|
|
|
703 |
if (slides.isEmpty()) {
|
|
|
704 |
|
|
|
705 |
// Log.e("Capsula","Es omitida, no tiene slides");
|
|
|
706 |
} else {
|
|
|
707 |
|
|
|
708 |
if(dbProgress.getProgress() <= 100 && dbProgress.getCompleted()==0)
|
|
|
709 |
{
|
|
|
710 |
if (buscar.equals("")) {
|
|
|
711 |
capsuleList.add(m_li);
|
|
|
712 |
|
|
|
713 |
} else {
|
|
|
714 |
String nombre= capsule.getName();
|
|
|
715 |
String normalizada= Normalizer.normalize(nombre, Normalizer.Form.NFD);
|
|
|
716 |
normalizada= normalizada.replaceAll("[^\\p{ASCII}]", "");
|
|
|
717 |
if (normalizada.matches("(?i).*" + buscar + ".*")) {
|
|
|
718 |
capsuleList.add(m_li);
|
| 12 |
gabriel |
719 |
}
|
| 2 |
gabriel |
720 |
|
| 12 |
gabriel |
721 |
}
|
| 24 |
gabriel |
722 |
}}
|
| 56 |
gabriel |
723 |
}}}
|
| 2 |
gabriel |
724 |
|
| 24 |
gabriel |
725 |
else if (tabposition.equals("finalizados")){
|
| 12 |
gabriel |
726 |
|
| 24 |
gabriel |
727 |
HashMap<String, String> m_li;
|
|
|
728 |
List<Progress> progress;
|
|
|
729 |
Capsule capsule;
|
| 2 |
gabriel |
730 |
|
| 21 |
gabriel |
731 |
|
| 24 |
gabriel |
732 |
|
|
|
733 |
progress = progressDao.selectAllCapsulesProgress();
|
|
|
734 |
|
|
|
735 |
for(Progress dbProgress : progress) {
|
|
|
736 |
m_li = new HashMap<>();
|
|
|
737 |
|
|
|
738 |
capsule = capsuleDao.selectByUuid(dbProgress.getCapsuleUuid());
|
|
|
739 |
|
|
|
740 |
m_li.put("view", String.valueOf(dbProgress.getViewSlides()));
|
|
|
741 |
m_li.put("total", String.valueOf(dbProgress.getTotalSlides()));
|
|
|
742 |
m_li.put("progress", String.valueOf(dbProgress.getProgress()));
|
|
|
743 |
m_li.put("completado",String.valueOf(dbProgress.getCompleted()));
|
|
|
744 |
m_li.put("agregado",dbProgress.getAddedOn());
|
|
|
745 |
|
| 56 |
gabriel |
746 |
if(capsule == null)
|
|
|
747 |
{
|
|
|
748 |
Log.e("El objeto esta", "nulo");
|
|
|
749 |
}
|
|
|
750 |
else{
|
| 24 |
gabriel |
751 |
|
|
|
752 |
m_li.put("imagen", capsule.getImage());
|
|
|
753 |
m_li.put("nombre", capsule.getName());
|
|
|
754 |
m_li.put("uuid", capsule.getUuid());
|
|
|
755 |
m_li.put("topicuuid", capsule.getTopicUuid());
|
|
|
756 |
m_li.put("description", capsule.getDescription());
|
|
|
757 |
|
|
|
758 |
//Lleno la lista segun el requerimiento de filtro accionado por el usuario
|
|
|
759 |
|
|
|
760 |
List<Slide> slides = slideDao.selectAllByCapsuleUuid(capsule.getUuid());
|
|
|
761 |
|
|
|
762 |
if (slides.isEmpty()) {
|
|
|
763 |
|
|
|
764 |
// Log.e("Capsula","Es omitida, no tiene slides");
|
|
|
765 |
} else {
|
|
|
766 |
if(dbProgress.getProgress() >= 100 && dbProgress.getCompleted()==1){
|
|
|
767 |
|
|
|
768 |
if (buscar.equals("")) {
|
|
|
769 |
//capsule.getCompleted();
|
|
|
770 |
capsuleList.add(m_li);
|
|
|
771 |
|
|
|
772 |
} else {
|
|
|
773 |
String nombre= capsule.getName();
|
|
|
774 |
String normalizada= Normalizer.normalize(nombre, Normalizer.Form.NFD);
|
|
|
775 |
normalizada= normalizada.replaceAll("[^\\p{ASCII}]", "");
|
|
|
776 |
if (normalizada.matches("(?i).*" + buscar + ".*")) {
|
|
|
777 |
capsuleList.add(m_li);
|
|
|
778 |
}
|
|
|
779 |
|
|
|
780 |
}
|
|
|
781 |
}
|
| 2 |
gabriel |
782 |
}
|
| 56 |
gabriel |
783 |
}}}
|
| 2 |
gabriel |
784 |
|
|
|
785 |
|
| 24 |
gabriel |
786 |
}
|
|
|
787 |
|
|
|
788 |
|
| 17 |
gabriel |
789 |
@Override
|
|
|
790 |
public void onItemClick(int position, View v) {
|
|
|
791 |
|
| 24 |
gabriel |
792 |
// Log.e("Evento","del click"+position);
|
| 17 |
gabriel |
793 |
|
|
|
794 |
|
|
|
795 |
iTwoGetSkills.getPreference().setCapsuleUuidActive(capsuleList.get(position).get("uuid"));
|
|
|
796 |
iTwoGetSkills.getPreference().setTopicUuidActive(capsuleList.get(position).get("topicuuid"));
|
| 58 |
gabriel |
797 |
iTwoGetSkills.invokeFragment(Constants.IDX_FRAGMENT_DETAIL_CAPSULE);
|
| 17 |
gabriel |
798 |
|
| 18 |
gabriel |
799 |
iTwoGetSkills.getPreference().setOrigennavigation("welcome");
|
| 56 |
gabriel |
800 |
iTwoGetSkills.hideKeyboard(v); //Ocultamos el teclado
|
| 24 |
gabriel |
801 |
// Log.e("Completada",""+capsuleList.get(position).get("completado"));
|
| 18 |
gabriel |
802 |
|
| 17 |
gabriel |
803 |
// Log.e("Capsula","topic active"+mDataSet.get(viewHolder.getAbsoluteAdapterPosition()).get("topicuuid"));
|
|
|
804 |
|
|
|
805 |
}
|
| 56 |
gabriel |
806 |
}
|