I'm Building a todo app, I declared methods in separate java file and when I wanna access them in another java file they are saying 'can't resolve the method'
You can see the whole project at https://github.com/RamcharanS/MyTODO_Be_Productive
Please Help me with this and if possible please check and give a small review on my code
Java file of Methods
package com.example.mytodo;
public class my_todo {
String titledoes;
String datedoes;
String descdoes;
String keydoes;
public my_todo() {
}
public my_todo(String titledoes, String datedoes, String descdoes, String keydoes) {
this.titledoes = titledoes;
this.datedoes = datedoes;
this.descdoes = descdoes;
this.keydoes = keydoes;
}
public String getKeydoes() {
return keydoes;
}
public void setKeydoes(String keydoes) {
this.keydoes = keydoes;
}
public String getTitledoes() {
return titledoes;
}
public void setTitledoes(String titledoes) {
this.titledoes = titledoes;
}
public String getDatedoes() {
return datedoes;
}
public void setDatedoes(String datedoes) {
this.datedoes = datedoes;
}
public String getDescdoes() {
return descdoes;
}
public void setDescdoes(String descdoes) {
this.descdoes = descdoes;
}
}
This is the Java file Giving me Error Method : getTitledoes() getDescdoes() getDatedoes()
package com.example.mytodo;
import android.content.Context;
import android.content.Intent;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.example.mytodo.R;
import org.w3c.dom.Text;
import java.util.ArrayList;
public class DoesAdapter extends RecyclerView.Adapter<DoesAdapter.MyViewHolder>{
Context context;
ArrayList myDoes;
public DoesAdapter(Context c, ArrayList p) {
context = c;
myDoes = p;
}
@NonNull
@Override
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i){
return new MyViewHolder(LayoutInflater.from(context).inflate(R.layout.new_todo, viewGroup, false));
}
@Override
public void onBindViewHolder(@NonNull MyViewHolder myViewHolder, int i){
MyViewHolder.titledoes.setText(myDoes.get(i).getTitledoes());
MyViewHolder.descdoes.setText(myDoes.get(i).getDescdoes());
MyViewHolder.datedoes.setText(myDoes.get(i).getDatedoes());
}
@Override
public int getItemCount(){
return myDoes.size();
}
class MyViewHolder extends RecyclerView.ViewHolder {
TextView titledoes, descdoes, datedoes;
public MyViewHolder(@NonNull View itemView){
super(itemView);
titledoes = (TextView) itemView.findViewById(R.id.titledoes);
descdoes = (TextView) itemView.findViewById(R.id.descdoes);
datedoes = (TextView) itemView.findViewById(R.id.datedoes);
}
}
}