navigation-drawer

How to add image to a framelayout in android app ?

妖精的绣舞 提交于 2020-01-03 04:38:10
问题 I am building a left slide menu in my app, in which I am using a framelayout. And a listview is called inside this framelayout. In this frame layout, I want to call a imageView which will display user profile picture. Here is the code for my navigation drawer, where I am initializing framelayout and calling its listview. Here is my navigation drawer code - public class NavigationDrawerFragment extends Fragment { Context context; ArrayList prgmName; public static int [] prgmImages={R.drawable

Disabling items in a Navigation Drawer in Android

余生颓废 提交于 2020-01-03 02:45:13
问题 I'm using the Navigation Drawer Example downloadable here. I'd like to extend this example to disable the selection of one of the planets. For simplicity, lets say I want to permanently disable the selection of Saturn, and change the text of Saturn to dark gray, and have it not highlight when a user selects it. (in reality, I would like to disable navigation programmatically when a user has changed certain values on the screen not yet saved to the device). The closest thing I've gotten to

SwipeRefreshLayout gesture detection in drawer

风格不统一 提交于 2020-01-03 00:52:29
问题 I'm using SwipeRefreshLayout in drawer. When I stat scrolling up and down in the listview the gesture should be straight up and down, If the finger moves just a little bit a side without lifting it up, the scroll gesture stops and starts the gesture for open close the drawer. If I'm not using SwipeRefreshLayout, the scroll gesture dose not stops until I lift my finger up. This is the layout: <android.support.v4.widget.SwipeRefreshLayout android:id="@+id/swipe_to_refresh_lisview_container"

Set bold text in navigation drawer just after creating it (before any selection)

自闭症网瘾萝莉.ら 提交于 2020-01-02 17:48:30
问题 I have a navigation drawer like those from Google apps(Play Music, Play Movies etc..) Everything works just fine; my only problem is: I can't figure out how to set the text to BOLD , just after creating the drawer and before any selection or click is done! I have no problem setting bold after the onItemClick is performed, but how to do it just after creating the drawer? I've tried to get the View reference from the list inside the drawer, but it doesn't work. Can someone help me? that's my

Set bold text in navigation drawer just after creating it (before any selection)

心已入冬 提交于 2020-01-02 17:47:13
问题 I have a navigation drawer like those from Google apps(Play Music, Play Movies etc..) Everything works just fine; my only problem is: I can't figure out how to set the text to BOLD , just after creating the drawer and before any selection or click is done! I have no problem setting bold after the onItemClick is performed, but how to do it just after creating the drawer? I've tried to get the View reference from the list inside the drawer, but it doesn't work. Can someone help me? that's my

Navigation Drawer and with Activity in Android

▼魔方 西西 提交于 2020-01-02 07:04:42
问题 I am trying out the navigation drawer (slide menu) given in this tutorial. The difference with above link and mine is that instead of calling fragments I am trying to call the activity. When the app opens I am not able to see the Navigation drawer menu I can see only the action bar with HOME activity opened. Here is the code that I changed: (Is it necessary to have a fragment or can I use activity for my first screen in Navigation Drawer?) mTitle = mDrawerTitle = getTitle(); navMenuTitles =

Fragment in FrameLayout not showing in CoordinatorLayout

怎甘沉沦 提交于 2020-01-02 05:01:09
问题 I opened the default Android Studio App with a NavigationDrawer. The default content-view is not very useful, therefore I tried to replace it with a FrameLayout so I can add Fragments. If I just replace content_main with the FrameLayout the Fragment will not be shown at all. If I pull out the FrameLayout out of app_bar_main.xml into activity_main.xml it is shown but it overlaps with the Toolbar. MainActivity.java public class MainActivity extends AppCompatActivity implements NavigationView

toolbar not appearing in pre lollipop devices

不问归期 提交于 2020-01-01 12:25:27
问题 Toolbar is not appearing on pre lollipop devices. I'm using drawer layout with toolbar. The same toolbar works on other activities but not when used along with drawer layout. Activity with drawer layout and toolbar @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_home_screen); { /*supportChatImageButton = (ImageButton) findViewById(R.id.homeSupportChatImageButton); orderImageButton = (ImageButton) findViewById

Floating Action Button appears over Navigation Drawer

感情迁移 提交于 2020-01-01 09:42:08
问题 So I am using https://github.com/neokree/MaterialNavigationDrawer for my navigation drawer and https://gist.github.com/Jogan/9def6110edf3247825c9 as my FAB implementation. When I open the navigation drawer, it does not cover the FAB, and the button appears on top of it. I would like to avoid hiding the button and showing it on drawer open/close as that is rather distracting. Any ideas on how to fix this? Edit: I am adding the FAB programmatically doing the following: fabButton = new

Floating Action Button appears over Navigation Drawer

最后都变了- 提交于 2020-01-01 09:42:05
问题 So I am using https://github.com/neokree/MaterialNavigationDrawer for my navigation drawer and https://gist.github.com/Jogan/9def6110edf3247825c9 as my FAB implementation. When I open the navigation drawer, it does not cover the FAB, and the button appears on top of it. I would like to avoid hiding the button and showing it on drawer open/close as that is rather distracting. Any ideas on how to fix this? Edit: I am adding the FAB programmatically doing the following: fabButton = new