我已经制作了一个可以读取图像标记的增强现实应用程序,但我想知道我是否可以在没有标记的情况下制作增强现实.谁能告诉我怎么样?
unity-game-engine augmented-reality android-augmented-reality
我有带抽屉的带有片段的导航抽屉项目,其中有5个菜单,问题是当我转到菜单4时,我按了后退按钮,应用程序关闭了,但是我需要将应用程序返回到第一个菜单,这是片段中的所有菜单。
这是主要活动(导航抽屉)的代码
public class MainActivity extends AppCompatActivity{
DrawerLayout mDrawerLayout;
NavigationView mNavigationView;
FragmentManager mFragmentManager;
FragmentTransaction mFragmentTransaction;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
/**
*Setup the DrawerLayout and NavigationView
*/
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawerLayout);
mNavigationView = (NavigationView) findViewById(R.id.shitstuff) ;
/**
* Lets inflate the very first fragment
* Here , we are inflating the TabFragment as the first Fragment
*/
mFragmentManager = getSupportFragmentManager();
mFragmentTransaction = mFragmentManager.beginTransaction();
mFragmentTransaction.replace(R.id.containerView,new Recommendation()).commit();
/**
* Setup click events on the Navigation View Items.
*/
mNavigationView.setNavigationItemSelectedListener(new …Run Code Online (Sandbox Code Playgroud) 我正在尝试创建一个可以动态创建按钮的"添加"按钮,但我在以下问题:
Button mybutton = new Button (this);
我不知道为什么this可以申请OnClickListener.