Rear View mirror

well i broke my rear view mirror, it looks like it held by screws and a black rubber piece that holds it into the windshield glass. Does anyone know how to put it back together? i kinda pulled on it tryin to fix the mirror, Don’t ask why i was doing it. can anyone help or has been through this?

From what I remembered, I had to go to the junkyard and buy that new metal piece that connects to the car ceiling.

yeah i fixed it but my mirror is still messed up, i cant adjust it. i had to put the scerw over the metal piece and now it holds up, what kind of liquid or sticky stuff can i use to put in the mirror so i can adjust it again