Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 24.23 KB | None | 0 0
  1. package com.sky.vsuwt_schedule_.adapters;
  2.  
  3.  
  4. import android.content.Context;
  5. import android.graphics.Typeface;
  6. import android.view.LayoutInflater;
  7. import android.view.View;
  8. import android.view.ViewGroup;
  9. import android.widget.ImageView;
  10. import android.widget.LinearLayout;
  11. import android.widget.TextView;
  12.  
  13. import androidx.annotation.NonNull;
  14. import androidx.recyclerview.widget.RecyclerView;
  15.  
  16. import com.sky.vsuwt_schedule_.R;
  17. import com.sky.vsuwt_schedule_.models.lessonModel;
  18.  
  19. import java.util.ArrayList;
  20.  
  21. import static android.graphics.Typeface.BOLD;
  22.  
  23. public class lessonAdapter extends RecyclerView.Adapter<lessonAdapter.LessonHolder> {
  24.  
  25.  
  26.  
  27.     private Context mContext;
  28.  
  29.     private ArrayList<lessonModel> lessonModels;
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.     public lessonAdapter ( Context mContext, ArrayList<lessonModel> lessonModels)
  39.     {
  40.         this.mContext = mContext;
  41.         this.lessonModels = lessonModels;
  42.  
  43.     }
  44.  
  45.     public void setData(ArrayList<lessonModel> models){
  46.  
  47.         this.lessonModels = models;
  48.  
  49.     }
  50.  
  51.  
  52.  
  53.  
  54.  
  55.     @NonNull
  56.     public LessonHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType){
  57.  
  58.         View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.lesson_item,parent, false);
  59.         return new LessonHolder(v);
  60.     }
  61.  
  62.     public void onBindViewHolder(@NonNull LessonHolder holder, int position) {
  63.  
  64.  
  65.         if ((lessonModels.get(position).getL1Class().equals("")) && (lessonModels.get(position).getL2Class().equals("")) &&
  66.                 (lessonModels.get(position).getL3Class().equals("")) &&
  67.                 (lessonModels.get(position).getL4Class().equals("")) &&
  68.                 (lessonModels.get(position).getL5Class().equals("")) &&
  69.                 (lessonModels.get(position).getL6Class().equals("")) && (lessonModels.get(position).getL7Class().equals("")) && (lessonModels.get(position).getL8Class().equals(""))) {
  70.  
  71.  
  72.             holder.l1.setVisibility(View.GONE);
  73.             holder.l2.setVisibility(View.GONE);
  74.             holder.l3.setVisibility(View.GONE);
  75.             holder.l4.setVisibility(View.GONE);
  76.             holder.l5.setVisibility(View.GONE);
  77.             holder.l6.setVisibility(View.GONE);
  78.             holder.l7.setVisibility(View.GONE);
  79.             holder.l8.setVisibility(View.GONE);
  80.             holder.nol.setVisibility(View.VISIBLE);
  81.  
  82.         } else {
  83.  
  84.             holder.l1.setVisibility(View.VISIBLE);
  85.             holder.l2.setVisibility(View.VISIBLE);
  86.             holder.l3.setVisibility(View.VISIBLE);
  87.             holder.l4.setVisibility(View.VISIBLE);
  88.             holder.l5.setVisibility(View.VISIBLE);
  89.             holder.l6.setVisibility(View.VISIBLE);
  90.             holder.l7.setVisibility(View.VISIBLE);
  91.             holder.l8.setVisibility(View.VISIBLE);
  92.             holder.nol.setVisibility(View.GONE);
  93.  
  94.  
  95.         }
  96.  
  97.         if (lessonModels.get(position).getL1Class().equals("")) {
  98.  
  99.             holder.l1.setVisibility(View.GONE);
  100.  
  101.         } else {
  102.  
  103.             holder.l1.setVisibility(View.VISIBLE);
  104.  
  105.         }
  106.         if (lessonModels.get(position).getL2Class().equals("")) {
  107.  
  108.             holder.l2.setVisibility(View.GONE);
  109.  
  110.         } else {
  111.  
  112.             holder.l2.setVisibility(View.VISIBLE);
  113.  
  114.         }
  115.         if (lessonModels.get(position).getL3Class().equals("")) {
  116.  
  117.             holder.l3.setVisibility(View.GONE);
  118.  
  119.         } else {
  120.  
  121.             holder.l3.setVisibility(View.VISIBLE);
  122.  
  123.         }
  124.         if (lessonModels.get(position).getL4Class().equals("")) {
  125.  
  126.             holder.l4.setVisibility(View.GONE);
  127.  
  128.         } else {
  129.  
  130.             holder.l4.setVisibility(View.VISIBLE);
  131.  
  132.         }
  133.         if (lessonModels.get(position).getL5Class().equals("")) {
  134.  
  135.             holder.l5.setVisibility(View.GONE);
  136.  
  137.         } else {
  138.  
  139.             holder.l5.setVisibility(View.VISIBLE);
  140.  
  141.         }
  142.         if (lessonModels.get(position).getL6Class().equals("")) {
  143.  
  144.             holder.l6.setVisibility(View.GONE);
  145.  
  146.         } else {
  147.  
  148.             holder.l6.setVisibility(View.VISIBLE);
  149.  
  150.         }
  151.         if (lessonModels.get(position).getL7Class().equals("")) {
  152.  
  153.             holder.l7.setVisibility(View.GONE);
  154.  
  155.         } else {
  156.  
  157.             holder.l7.setVisibility(View.VISIBLE);
  158.  
  159.         }
  160.  
  161.         if (lessonModels.get(position).getL8Class().equals("")) {
  162.  
  163.             holder.l8.setVisibility(View.GONE);
  164.  
  165.         } else {
  166.  
  167.             holder.l8.setVisibility(View.VISIBLE);
  168.  
  169.         }
  170.  
  171.  
  172.         if (lessonModels.get(position).getGetCurrentLesson().equals("1")) {
  173.  
  174.             holder.clock0.setVisibility(View.VISIBLE);
  175.  
  176.         } else {
  177.             holder.clock0.setVisibility(View.INVISIBLE);
  178.         }
  179.  
  180.         if (lessonModels.get(position).getGetCurrentLesson().equals("2")) {
  181.  
  182.             holder.clock1.setVisibility(View.VISIBLE);
  183.  
  184.         } else {
  185.             holder.clock1.setVisibility(View.INVISIBLE);
  186.         }
  187.  
  188.         if (lessonModels.get(position).getGetCurrentLesson().equals("3")) {
  189.  
  190.             holder.clock2.setVisibility(View.VISIBLE);
  191.  
  192.         } else {
  193.             holder.clock2.setVisibility(View.INVISIBLE);
  194.         }
  195.  
  196.         if (lessonModels.get(position).getGetCurrentLesson().equals("4")) {
  197.  
  198.             holder.clock3.setVisibility(View.VISIBLE);
  199.  
  200.         } else {
  201.             holder.clock3.setVisibility(View.INVISIBLE);
  202.         }
  203.  
  204.         if (lessonModels.get(position).getGetCurrentLesson().equals("5")) {
  205.  
  206.             holder.clock4.setVisibility(View.VISIBLE);
  207.  
  208.         } else {
  209.             holder.clock4.setVisibility(View.INVISIBLE);
  210.         }
  211.  
  212.         if (lessonModels.get(position).getGetCurrentLesson().equals("6")) {
  213.  
  214.             holder.clock5.setVisibility(View.VISIBLE);
  215.  
  216.         } else {
  217.             holder.clock5.setVisibility(View.INVISIBLE);
  218.         }
  219.  
  220.         if (lessonModels.get(position).getGetCurrentLesson().equals("7")) {
  221.  
  222.             holder.clock6.setVisibility(View.VISIBLE);
  223.  
  224.         } else {
  225.             holder.clock6.setVisibility(View.INVISIBLE);
  226.         }
  227.  
  228.         if (lessonModels.get(position).getGetCurrentLesson().equals("8")) {
  229.  
  230.             holder.clock7.setVisibility(View.VISIBLE);
  231.  
  232.         } else {
  233.             holder.clock7.setVisibility(View.INVISIBLE);
  234.         }
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.         if (lessonModels.get(position).getIsChanges().equals("true"))
  246.         {
  247.  
  248.             holder.changes.setVisibility(View.VISIBLE);
  249.  
  250.         }
  251.         else{
  252.  
  253.             holder.changes.setVisibility(View.INVISIBLE);
  254.         }
  255.  
  256.  
  257.  
  258.  
  259.  
  260.         if (lessonModels.get(position).getL1type().equals("Практика")){
  261.  
  262.             holder.l1Type.setBackgroundColor(mContext.getResources().getColor(R.color.colorSapphire));
  263.         }
  264.         if (lessonModels.get(position).getL2type().equals("Практика")){
  265.  
  266.             holder.l2Type.setBackgroundColor(mContext.getResources().getColor(R.color.colorSapphire));
  267.         }
  268.         if (lessonModels.get(position).getL3type().equals("Практика")){
  269.  
  270.             holder.l3Type.setBackgroundColor(mContext.getResources().getColor(R.color.colorSapphire));
  271.         }
  272.         if (lessonModels.get(position).getL4type().equals("Практика")){
  273.  
  274.             holder.l4Type.setBackgroundColor(mContext.getResources().getColor(R.color.colorSapphire));
  275.         }
  276.  
  277.         if (lessonModels.get(position).getL5type().equals("Практика")){
  278.  
  279.             holder.l5Type.setBackgroundColor(mContext.getResources().getColor(R.color.colorSapphire));
  280.         }
  281.         if (lessonModels.get(position).getL6type().equals("Практика")){
  282.  
  283.             holder.l6Type.setBackgroundColor(mContext.getResources().getColor(R.color.colorSapphire));
  284.         }
  285.         if (lessonModels.get(position).getL7type().equals("Практика")){
  286.  
  287.             holder.l7Type.setBackgroundColor(mContext.getResources().getColor(R.color.colorSapphire));
  288.         }
  289.  
  290.         if (lessonModels.get(position).getL8type().equals("Практика")){
  291.  
  292.             holder.l8Type.setBackgroundColor(mContext.getResources().getColor(R.color.colorSapphire));
  293.         }
  294.  
  295.  
  296.  
  297.         if (lessonModels.get(position).getL1type().equals("Лекция")){
  298.  
  299.             holder.l1Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  300.         }
  301.         if (lessonModels.get(position).getL2type().equals("Лекция")){
  302.  
  303.             holder.l2Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  304.         }
  305.         if (lessonModels.get(position).getL3type().equals("Лекция")){
  306.  
  307.             holder.l3Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  308.         }
  309.         if (lessonModels.get(position).getL4type().equals("Лекция")){
  310.  
  311.             holder.l4Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  312.         }
  313.  
  314.         if (lessonModels.get(position).getL5type().equals("Лекция")){
  315.  
  316.             holder.l5Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  317.         }
  318.         if (lessonModels.get(position).getL6type().equals("Лекция")){
  319.  
  320.             holder.l6Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  321.         }
  322.         if (lessonModels.get(position).getL7type().equals("Лекция")){
  323.  
  324.             holder.l7Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  325.         }
  326.  
  327.         if (lessonModels.get(position).getL8type().equals("Лекция")){
  328.  
  329.             holder.l8Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  330.         }
  331.  
  332.  
  333.  
  334.  
  335.         if (lessonModels.get(position).getL1type().equals("Аудиторное занятие")){
  336.  
  337.             holder.l1Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  338.         }
  339.         if (lessonModels.get(position).getL2type().equals("Аудиторное занятие")){
  340.  
  341.             holder.l2Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  342.         }
  343.         if (lessonModels.get(position).getL3type().equals("Аудиторное занятие")){
  344.  
  345.             holder.l3Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  346.         }
  347.         if (lessonModels.get(position).getL4type().equals("Аудиторное занятие")){
  348.  
  349.             holder.l4Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  350.         }
  351.  
  352.         if (lessonModels.get(position).getL5type().equals("Аудиторное занятие")){
  353.  
  354.             holder.l5Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  355.         }
  356.         if (lessonModels.get(position).getL6type().equals("Аудиторное занятие")){
  357.  
  358.             holder.l6Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  359.         }
  360.         if (lessonModels.get(position).getL7type().equals("Аудиторное занятие")){
  361.  
  362.             holder.l7Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  363.         }
  364.  
  365.         if (lessonModels.get(position).getL8type().equals("Аудиторное занятие")){
  366.  
  367.             holder.l8Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  368.         }
  369.  
  370.  
  371.  
  372. //        if ((!lessonModels.get(position).getL1type().equals("Аудиторное занятие")) && (!lessonModels.get(position).getL1type().equals("Лекция")) && (!lessonModels.get(position).getL1type().equals("Практика"))){
  373. //
  374. //            holder.l1Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  375. //        }
  376. //
  377. //        if ((!lessonModels.get(position).getL2type().equals("Аудиторное занятие")) && (!lessonModels.get(position).getL1type().equals("Лекция")) && (!lessonModels.get(position).getL1type().equals("Практика"))){
  378. //
  379. //            holder.l2Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  380. //        }
  381. //
  382. //        if ((!lessonModels.get(position).getL3type().equals("Аудиторное занятие")) && (!lessonModels.get(position).getL1type().equals("Лекция")) && (!lessonModels.get(position).getL1type().equals("Практика"))){
  383. //
  384. //            holder.l3Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  385. //        }
  386. //
  387. //        if ((!lessonModels.get(position).getL4type().equals("Аудиторное занятие")) && (!lessonModels.get(position).getL1type().equals("Лекция")) && (!lessonModels.get(position).getL1type().equals("Практика"))){
  388. //
  389. //            holder.l4Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  390. //        }
  391. //
  392. //        if ((!lessonModels.get(position).getL5type().equals("Аудиторное занятие")) && (!lessonModels.get(position).getL1type().equals("Лекция")) && (!lessonModels.get(position).getL1type().equals("Практика"))){
  393. //
  394. //            holder.l5Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  395. //        }
  396. //
  397. //        if ((!lessonModels.get(position).getL6type().equals("Аудиторное занятие")) && (!lessonModels.get(position).getL1type().equals("Лекция")) && (!lessonModels.get(position).getL1type().equals("Практика"))){
  398. //
  399. //            holder.l6Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  400. //        }
  401. //
  402. //        if ((!lessonModels.get(position).getL7type().equals("Аудиторное занятие")) && (!lessonModels.get(position).getL1type().equals("Лекция")) && (!lessonModels.get(position).getL1type().equals("Практика"))){
  403. //
  404. //            holder.l7Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  405. //        }
  406. //
  407. //        if ((!lessonModels.get(position).getL8type().equals("Аудиторное занятие")) && (!lessonModels.get(position).getL1type().equals("Лекция")) && (!lessonModels.get(position).getL1type().equals("Практика"))){
  408. //
  409. //            holder.l8Type.setBackgroundColor(mContext.getResources().getColor(R.color.pacificBlue));
  410. //        }
  411.  
  412.  
  413.  
  414.  
  415.  
  416.         holder.isDay.setText((lessonModels).get(position).getIs_day());
  417.         holder.date.setText(lessonModels.get(position).getIsDate());
  418.         holder.l1Name.setText((lessonModels).get(position).getL1Name());
  419.         holder.l2Name.setText((lessonModels).get(position).getL2Name());
  420.         holder.l3Name.setText((lessonModels).get(position).getL3Name());
  421.         holder.l4Name.setText((lessonModels).get(position).getL4Name());
  422.         holder.l5Name.setText((lessonModels).get(position).getL5Name());
  423.         holder.l6Name.setText((lessonModels).get(position).getL6Name());
  424.         holder.l7Name.setText((lessonModels).get(position).getL7Name());
  425.         holder.l8Name.setText((lessonModels).get(position).getL8Name());
  426.  
  427.         holder.l1Type.setText((lessonModels).get(position).getL1type());
  428.         holder.l2Type.setText((lessonModels).get(position).getL2type());
  429.         holder.l3Type.setText((lessonModels).get(position).getL3type());
  430.         holder.l4Type.setText((lessonModels).get(position).getL4type());
  431.         holder.l5Type.setText((lessonModels).get(position).getL5type());
  432.         holder.l6Type.setText((lessonModels).get(position).getL6type());
  433.         holder.l7Type.setText((lessonModels).get(position).getL7type());
  434.         holder.l8Type.setText((lessonModels).get(position).getL8type());
  435.  
  436.         holder.l1Clss.setText((lessonModels).get(position).getL1Class());
  437.         holder.l2Clss.setText((lessonModels).get(position).getL2Class());
  438.         holder.l3Clss.setText((lessonModels).get(position).getL3Class());
  439.         holder.l4Clss.setText((lessonModels).get(position).getL4Class());
  440.         holder.l5Clss.setText((lessonModels).get(position).getL5Class());
  441.         holder.l6Clss.setText((lessonModels).get(position).getL6Class());
  442.         holder.l7Clss.setText((lessonModels).get(position).getL7Class());
  443.         holder.l8Clss.setText((lessonModels).get(position).getL8Class());
  444.  
  445.         holder.l1Teacher.setText((lessonModels).get(position).getL1Teacher());
  446.         holder.l2Teacher.setText((lessonModels).get(position).getL2Teacher());
  447.         holder.l3Teacher.setText((lessonModels).get(position).getL3Teacher());
  448.         holder.l4Teacher.setText((lessonModels).get(position).getL4Teacher());
  449.         holder.l5Teacher.setText((lessonModels).get(position).getL5Teacher());
  450.         holder.l6Teacher.setText((lessonModels).get(position).getL6Teacher());
  451.         holder.l7Teacher.setText((lessonModels).get(position).getL7Teacher());
  452.         holder.l8Teacher.setText((lessonModels).get(position).getL8Teacher());
  453.  
  454.  
  455.     }
  456.  
  457.     public int getItemCount(){
  458.         return lessonModels.size();
  459.     }
  460.  
  461.  
  462.  
  463.      class LessonHolder extends RecyclerView.ViewHolder {
  464.  
  465.         ImageView changes;
  466.         ImageView clock0;
  467.         ImageView clock1;
  468.         ImageView clock2;
  469.         ImageView clock3;
  470.         ImageView clock4;
  471.         ImageView clock5;
  472.         ImageView clock6;
  473.         ImageView clock7;
  474.  
  475.         LinearLayout nol;
  476.         LinearLayout l1;
  477.         LinearLayout l2;
  478.         LinearLayout l3;
  479.         LinearLayout l4;
  480.         LinearLayout l5;
  481.         LinearLayout l6;
  482.         LinearLayout l7;
  483.         LinearLayout l8;
  484.  
  485.         TextView date;
  486.         TextView isDay;
  487.         TextView l1Name;
  488.         TextView l2Name;
  489.         TextView l3Name;
  490.         TextView l4Name;
  491.         TextView l5Name;
  492.         TextView l6Name;
  493.         TextView l7Name;
  494.         TextView l8Name;
  495.         TextView l1Type;
  496.         TextView l2Type;
  497.         TextView l3Type;
  498.         TextView l4Type;
  499.         TextView l5Type;
  500.         TextView l6Type;
  501.         TextView l7Type;
  502.         TextView l8Type;
  503.         TextView l1Clss;
  504.         TextView l2Clss;
  505.         TextView l3Clss;
  506.         TextView l4Clss;
  507.         TextView l5Clss;
  508.         TextView l6Clss;
  509.         TextView l7Clss;
  510.         TextView l8Clss;
  511.  
  512.         TextView l1Teacher;
  513.         TextView l2Teacher;
  514.         TextView l3Teacher;
  515.         TextView l4Teacher;
  516.         TextView l5Teacher;
  517.         TextView l6Teacher;
  518.         TextView l7Teacher;
  519.         TextView l8Teacher;
  520.  
  521.  
  522.      public    LessonHolder(View itemView) {   //, final OnItemClickListener listener
  523.             super(itemView);
  524.          Typeface MainFont = Typeface.createFromAsset(mContext.getAssets(), "FuturaDemiC.ttf");
  525.  
  526.          Typeface dateFont = Typeface.createFromAsset(mContext.getAssets(), "FuturaLightC.ttf");
  527.  
  528.             TextView time1 = itemView.findViewById(R.id.timeOne);
  529.             TextView time2 = itemView.findViewById(R.id.timetwo);
  530.             TextView time3 = itemView.findViewById(R.id.timethree);
  531.             TextView time4 = itemView.findViewById(R.id.timeFour);
  532.             TextView time5 = itemView.findViewById(R.id.timeFive);
  533.             TextView time6 = itemView.findViewById(R.id.timeSix);
  534.             TextView time7 = itemView.findViewById(R.id.timeSeven);
  535.             TextView time8 = itemView.findViewById(R.id.timeeight);
  536.  
  537.             time1.setTypeface(MainFont, BOLD);
  538.             time2.setTypeface(MainFont, BOLD);
  539.             time3.setTypeface(MainFont, BOLD);
  540.             time4.setTypeface(MainFont, BOLD);
  541.             time5.setTypeface(MainFont, BOLD);
  542.             time6.setTypeface(MainFont, BOLD);
  543.             time7.setTypeface(MainFont, BOLD);
  544.             time8.setTypeface(MainFont, BOLD);
  545.  
  546.             clock0 = itemView.findViewById(R.id.clock_0);
  547.             clock1 = itemView.findViewById(R.id.clock_1);
  548.             clock2 = itemView.findViewById(R.id.clock_2);
  549.             clock3 = itemView.findViewById(R.id.clock_3);
  550.             clock4 = itemView.findViewById(R.id.clock_4);
  551.             clock5 = itemView.findViewById(R.id.clock_5);
  552.             clock6 = itemView.findViewById(R.id.clock_6);
  553.             clock7 = itemView.findViewById(R.id.clock_7);
  554.  
  555.             changes = itemView.findViewById(R.id.isChanges);
  556.             l1 = itemView.findViewById(R.id.one_l);
  557.             l2 = itemView.findViewById(R.id.two_l);
  558.             l3 = itemView.findViewById(R.id.three_l);
  559.             l4 = itemView.findViewById(R.id.four_l);
  560.             l5 = itemView.findViewById(R.id.five_l);
  561.             l6 = itemView.findViewById(R.id.six_l);
  562.             l7 = itemView.findViewById(R.id.seven_l);
  563.             l8 = itemView.findViewById(R.id.eight_l);
  564.             nol = itemView.findViewById(R.id.no_lessons);
  565.             isDay = itemView.findViewById(R.id.is_day);
  566.  
  567.  
  568.             isDay.setTypeface(MainFont, BOLD);
  569.  
  570.             date = itemView.findViewById(R.id.is_date);
  571.  
  572.          //Typeface dateFont = Typeface.createFromAsset(mContext.getAssets(), "FuturaDemiC.ttf");
  573.          date.setTypeface(dateFont);
  574.  
  575.             l1Name = itemView.findViewById(R.id.text_l1name_lesson);
  576.             l2Name = itemView.findViewById(R.id.text_l2name_lesson);
  577.             l3Name = itemView.findViewById(R.id.text_l3name_lesson);
  578.             l4Name = itemView.findViewById(R.id.text_l4name_lesson);
  579.             l5Name = itemView.findViewById(R.id.text_l5name_lesson);
  580.             l6Name = itemView.findViewById(R.id.text_l6name_lesson);
  581.             l7Name = itemView.findViewById(R.id.text_l7name_lesson);
  582.             l8Name = itemView.findViewById(R.id.text_l8name_lesson);
  583.             l1Type = itemView.findViewById(R.id.text_l1type_lesson);
  584.             l2Type = itemView.findViewById(R.id.text_l2type_lesson);
  585.             l3Type = itemView.findViewById(R.id.text_l3type_lesson);
  586.             l4Type = itemView.findViewById(R.id.text_l4type_lesson);
  587.             l5Type = itemView.findViewById(R.id.text_l5type_lesson);
  588.             l6Type = itemView.findViewById(R.id.text_l6type_lesson);
  589.             l7Type = itemView.findViewById(R.id.text_l7type_lesson);
  590.             l8Type = itemView.findViewById(R.id.text_l8type_lesson);
  591.             l1Clss = itemView.findViewById(R.id.text_l1class_lesson);
  592.             l2Clss = itemView.findViewById(R.id.text_l2class_lesson);
  593.             l3Clss = itemView.findViewById(R.id.text_l3class_lesson);
  594.             l4Clss = itemView.findViewById(R.id.text_l4class_lesson);
  595.             l5Clss = itemView.findViewById(R.id.text_l5class_lesson);
  596.             l6Clss = itemView.findViewById(R.id.text_l6class_lesson);
  597.             l7Clss = itemView.findViewById(R.id.text_l7class_lesson);
  598.             l8Clss = itemView.findViewById(R.id.text_l8class_lesson);
  599.  
  600.  
  601.  
  602.             l1Teacher = itemView.findViewById(R.id.text_l1teacher_lesson);
  603.             l2Teacher = itemView.findViewById(R.id.text_l2teacher_lesson);
  604.             l3Teacher = itemView.findViewById(R.id.text_l3teacher_lesson);
  605.             l4Teacher = itemView.findViewById(R.id.text_l4teacher_lesson);
  606.             l5Teacher = itemView.findViewById(R.id.text_l5teacher_lesson);
  607.             l6Teacher = itemView.findViewById(R.id.text_l6teacher_lesson);
  608.             l7Teacher = itemView.findViewById(R.id.text_l7teacher_lesson);
  609.             l8Teacher = itemView.findViewById(R.id.text_l8teacher_lesson);
  610.  
  611.          l1Type.setTypeface(dateFont);
  612.          l2Type.setTypeface(dateFont);
  613.          l3Type.setTypeface(dateFont);
  614.          l4Type.setTypeface(dateFont);
  615.          l5Type.setTypeface(dateFont);
  616.          l6Type.setTypeface(dateFont);
  617.          l7Type.setTypeface(dateFont);
  618.          l8Type.setTypeface(dateFont);
  619.  
  620.          l1Clss.setTypeface(dateFont);
  621.          l2Clss.setTypeface(dateFont);
  622.          l3Clss.setTypeface(dateFont);
  623.          l4Clss.setTypeface(dateFont);
  624.          l5Clss.setTypeface(dateFont);
  625.          l6Clss.setTypeface(dateFont);
  626.          l7Clss.setTypeface(dateFont);
  627.          l8Clss.setTypeface(dateFont);
  628.  
  629.          l1Teacher.setTypeface(dateFont);
  630.          l2Teacher.setTypeface(dateFont);
  631.          l3Teacher.setTypeface(dateFont);
  632.          l4Teacher.setTypeface(dateFont);
  633.          l5Teacher.setTypeface(dateFont);
  634.          l6Teacher.setTypeface(dateFont);
  635.          l7Teacher.setTypeface(dateFont);
  636.          l8Teacher.setTypeface(dateFont);
  637.  
  638.  
  639.          l1Name.setTypeface(MainFont);
  640.          l2Name.setTypeface(MainFont);
  641.          l3Name.setTypeface(MainFont);
  642.          l4Name.setTypeface(MainFont);
  643.          l5Name.setTypeface(MainFont);
  644.          l6Name.setTypeface(MainFont);
  645.          l7Name.setTypeface(MainFont);
  646.          l8Name.setTypeface(MainFont);
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.         }
  656.  
  657.  
  658.     }
  659.  
  660.  
  661.  
  662. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement