By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Java Textview properties in ListView do not change


New Coder
I have a listview, but when I try to change the text color and size of the textview in the listview, it doesn't change, but I don't get an error. I used to get errors when I tried something but now I don't .I do not know how to do it. Here is the image showing the listview enter image description here

public class MainActivity extends AppCompatActivity {

    DatabaseReference databaseReference;
    List<pdfClass> uploads;
    ListView listview;
    FloatingActionButton floatingActionButton;
    protected void onCreate(Bundle savedInstanceState) {

        listview = findViewById(R.id.listview);
        floatingActionButton = findViewById(R.id.floatingActionButton);
        uploads = new ArrayList<>();


        listview.setOnItemClickListener((parent, view, position, id) -> {
            pdfClass pdfupload = uploads.get(position);
            Intent intent = new Intent(Intent.ACTION_VIEW);

            Intent intent = new Intent(getApplicationContext(),UploadPDF.class);


    private void viewAllFiles() {

        databaseReference = FirebaseDatabase.getInstance().getReference("Uploads");
        databaseReference.addValueEventListener(new ValueEventListener() {
            public void onDataChange(@NonNull DataSnapshot snapshot) {
                for (DataSnapshot postsnapshot : snapshot.getChildren()){
                    pdfClass pdfClass = postsnapshot.getValue(furkan.demirel.myapplication.pdfClass.class);

                String[] Uploads = new String[uploads.size()];
                for (int i =0;i<Uploads.length;i++){

                ArrayAdapter<String> adapter= new ArrayAdapter<String>(getApplicationContext(),

                    public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent){
                        View view = super.getView(position,convertView,parent);
                        TextView text =(TextView) view.findViewById(android.R.id.text1);
                        return view;


            public void onCancelled(@NonNull DatabaseError error) {


My Java is much too rusty for any proper advice. One thing I remember from yore that I had to use a custom renderer to change the color of specific table cells. Maybe that would apply here too ?

New Threads

Latest posts

Buy us a coffee!

Top Bottom