Cast shadow on top of LinearLayout using android:elevation

前端 未结 4 1001
轻奢々
轻奢々 2020-12-09 15:48

I have this LinearLayout that is going to be placed on the bottom of an activity layout. I want this LinearLayout to have a 4dp elevation, just lik

4条回答
  •  青春惊慌失措
    2020-12-09 16:37

    Try this i am unable to set background through xml then i tried the programmatic way to solve that and i work perfectly refer this if facing problem on show shadow in Linear Layout

    lprofile.setBackgroundResource(R.drawable.background_with_shadow);
    

    lprofile is my ref of Linear layout and background_with_shadow is xml for applying shadow i hope i will for ur requirmement...thank u..

提交回复
热议问题