1 |
efrain |
1 |
package com.cesams.twogetskills.fragment;
|
|
|
2 |
|
|
|
3 |
import android.os.Bundle;
|
|
|
4 |
import android.view.LayoutInflater;
|
|
|
5 |
import android.view.Menu;
|
|
|
6 |
import android.view.MenuInflater;
|
|
|
7 |
import android.view.View;
|
|
|
8 |
import android.view.ViewGroup;
|
|
|
9 |
import android.widget.Button;
|
|
|
10 |
|
|
|
11 |
import androidx.annotation.NonNull;
|
|
|
12 |
import androidx.annotation.Nullable;
|
|
|
13 |
import androidx.fragment.app.Fragment;
|
|
|
14 |
|
4 |
gabriel |
15 |
import com.airbnb.lottie.LottieAnimationView;
|
1 |
efrain |
16 |
import com.cesams.twogetskills.Constants;
|
|
|
17 |
import com.cesams.twogetskills.R;
|
|
|
18 |
import com.cesams.twogetskills.skeleton.ITwoGetSkills;
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
public class FinishTopicFragment extends Fragment {
|
|
|
22 |
|
|
|
23 |
private Button button;
|
4 |
gabriel |
24 |
LottieAnimationView figura;
|
|
|
25 |
|
1 |
efrain |
26 |
private ITwoGetSkills iTwoGetSkills;
|
|
|
27 |
|
|
|
28 |
public FinishTopicFragment() {
|
|
|
29 |
// Required empty public constructor
|
|
|
30 |
}
|
|
|
31 |
|
|
|
32 |
@Override
|
|
|
33 |
public void onCreate(@Nullable Bundle savedInstanceState) {
|
|
|
34 |
super.onCreate(savedInstanceState);
|
|
|
35 |
setHasOptionsMenu(true);
|
|
|
36 |
}
|
|
|
37 |
|
|
|
38 |
@Override
|
|
|
39 |
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
|
|
40 |
super.onCreateOptionsMenu(menu, inflater);
|
|
|
41 |
menu.clear();
|
|
|
42 |
}
|
|
|
43 |
|
|
|
44 |
@Override
|
|
|
45 |
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
|
|
46 |
Bundle savedInstanceState) {
|
|
|
47 |
// Inflate the layout for this fragment
|
|
|
48 |
return inflater.inflate(R.layout.fragment_finish_topic, container, false);
|
|
|
49 |
}
|
|
|
50 |
|
|
|
51 |
@Override
|
|
|
52 |
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
|
|
53 |
super.onViewCreated(view, savedInstanceState);
|
|
|
54 |
|
|
|
55 |
try {
|
|
|
56 |
iTwoGetSkills = (ITwoGetSkills) getActivity();
|
|
|
57 |
} catch(ClassCastException e) {
|
|
|
58 |
new Exception("La Actividad no implementa Sign");
|
|
|
59 |
}
|
|
|
60 |
|
|
|
61 |
button = (Button) getView().findViewById(R.id.fragment_finish_topic_button);
|
4 |
gabriel |
62 |
figura = getView().findViewById(R.id.animationView2);
|
1 |
efrain |
63 |
button.setOnClickListener(new View.OnClickListener() {
|
|
|
64 |
@Override
|
|
|
65 |
public void onClick(View view) {
|
|
|
66 |
iTwoGetSkills.requestExecuteSyncAdapter();
|
|
|
67 |
iTwoGetSkills.invokeFragment(Constants.IDX_FRAGMENT_TOPICS);
|
|
|
68 |
}
|
|
|
69 |
});
|
|
|
70 |
}
|
|
|
71 |
}
|