I can't see the three vertical dots in my emulator action bar on android studio

  • Replies:2
  • OpenNot stickiedUnanswered
  • Forum posts: 1

Dec 18, 2016 10:20:21 PM via Website

Hi everyone so I'm kind of new to all of this, and my instructor has some extra code inside of the home class as well as three vertical dots inside of the action bar. He is doing stuff with it and I am not able to catch up because all I have in the action bar is the name of my project. Any help would be appreciated. Here is my code:

package com.example.gamee.taskit;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_task_list);

mItems[0] = new Task();
mItems[0].setName("Task 1");
mItems[0].setUpdatedDate("NULL");
mItems[1] = new Task();
mItems[1].setName("Task 2");
mItems[1].setUpdatedDate("NULL");
mItems[2] = new Task();
mItems[2].setName("Task 3");
mItems[2].setUpdatedDate("NULL");
mItems[3] = new Task();
mItems[3].setName("Task 4");
mItems[3].setUpdatedDate("NULL");
for (Task items : mItems) {
    items.setDate(new Date());
}
mAdapter = new TaskAdapter(mItems);

ListView list = (ListView) findViewById(R.id.list);
list.setAdapter(mAdapter);
list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
    @Override
    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
        mTaskLocation = position;
        Task task = mItems[position];
        task.setPosition(position);
        Intent i = new Intent(TaskListActivity.this, SetTaskActivity.class);
        i.putExtra(EXTRA, task);
        startActivityForResult(i, REQUEST_CODE);

    }


});

Also here is my android manifest. Not exactly sure what an android manifest is to be honest, but when I looked at an error it mentioned it. So if someone could explain what an android manifest is that would be great!


android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">


        <category android:name="android.intent.category.LAUNCHER"/>
    </intent-filter>
</activity>
<activity android:name=".SetTaskActivity">
</activity>

  • Forum posts: 12

Dec 19, 2016 1:59:13 AM via Website

Maybe the problem of operation,

  • Forum posts: 5

Dec 19, 2016 11:16:50 PM via Website

Hi Stephen!

It sounds like you want to create an Overflow Menu in the Action Bar? If you search around for this you'll find some great tutorials but you don't really need to look further than the menus topic in the android developer guide ( I'm unable to post a link but if you search the bolded here you should find it no worries )

It's very well laid out and in fact you could have what you need by skimming through and just copying the code into your program. I do encourage you to read through though.