小编Nev*_*aeh的帖子

TortoiseGit-git没有干净地退出(退出代码1)

当我尝试使用Git克隆创建存储库时,我收到此消息.

git did not exit cleanly (exit code 1)
Run Code Online (Sandbox Code Playgroud)

如何解决这个问题?

git tortoisegit

37
推荐指数
5
解决办法
9万
查看次数

shouldoverrideurlloading和shouldinterceptrequest之间的区别?

任何人请告诉我方法public WebResourceResponse shouldInterceptRequest (WebView view, WebResourceRequest request)和方法之间的区别public boolean shouldOverrideUrlLoading(WebView view, String url).

我正在创建一个Android应用程序,其中获取一个字符串作为我的WebView.I 中的点击事件的响应.我想存储此字符串并显示它.我看到了这两种方法.我尝试使用shouldOverrideUrlLoading哪个返回重定向网址当我检查创建一个示例应用程序使用google.com作为我加载的网址WebView并单击菜单.

谁能告诉我两种方法之间的区别以及我应该使用哪种方法?

android webclient webview intercept

28
推荐指数
2
解决办法
3万
查看次数

如果EditText为空,如何禁用Button?

我的应用程序中有一个EditText和一个Button.

单击该按钮时,EditText中输入的文本将添加到ListView.

如果EditText为空,我想禁用Button.如何做到这一点?

这是我点击按钮的代码

ImageButton imb=(ImageButton)findViewById(R.id.btn_send);
            imb.setOnClickListener(new OnClickListener()
            {
             @Override
             public void onClick(View arg0) 
             { 
                 EditText et = (EditText)findViewById(R.id.EditText1);

                  String str = et.getText().toString();
                  web1.add(str);
                  Toast.makeText(ShoutSingleProgram.this, "You entered...."+str, Toast.LENGTH_SHORT).show();
                  adapter1.notifyDataSetChanged();
                  et.setText("");

                    }
            });
            }
Run Code Online (Sandbox Code Playgroud)

我怎样才能做到这一点 ?

android button

14
推荐指数
5
解决办法
3万
查看次数

任何人都可以帮我从png图像创建9个补丁图像吗?

我正在创建一个聊天应用程序.我希望将我的png图像转换为9patch图像.我使用此链接.... http://android-ui-utils.googlecode.com/hg/asset-studio /dist/nine-patches.html

但问题是聊天气泡总是保持最小宽度,即使对于小消息也是如此.例如,如果我输入类似"hello"的文本,它会显示在宽度大于消息的气泡中.如何创建9patch形象好吗?

这是我的png图像

在此输入图像描述

android nine-patch

5
推荐指数
1
解决办法
1万
查看次数

如何使用适配器在按钮单击上添加ListView项目

如何获取在EditText中输入的数据并在该窗口中单击"提交"应该将其添加到以前的活动列表视图项?我需要做的是:

  1. 创建EditText并提交按钮
  2. 在同一个Activity中创建listview
  3. 通过单击提交按钮,它应该在列表视图中显示.

我在这里看到了类似的问题:向listview动态添加项目android

但我无法理解答案.有人请解释如何做到这一点.

android android-listview

3
推荐指数
1
解决办法
3万
查看次数

如何在特定位置显示自定义对话框?

我有一个按钮,其弹出一个对话框.对话框显示在中心.但我想在按钮下方显示它.如何做到这一点?

我也尝试使用弹出窗口.这是代码

private void showPopup(final Activity context, Point p)
    {
        Display display = getWindowManager().getDefaultDisplay(); 
        width = display.getWidth();  // deprecated
        height = display.getHeight();  // deprecated

        int popupWidth =width;
        int popupHeight =height;

       // Inflate the popup_layout.xml
       LinearLayout viewGroup = (LinearLayout) context.findViewById(R.id.popup);
       LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
       View layout = layoutInflater.inflate(R.layout.datepicker_popup, viewGroup);

       // Creating the PopupWindow
       final PopupWindow popup = new PopupWindow(context);
       popup.setContentView(layout);
       popup.setWidth(popupWidth+p.x);
       popup.setHeight(popupHeight+p.y);
       popup.setFocusable(true);

       // Some offset to align the popup a bit to the right, and a bit down, relative …
Run Code Online (Sandbox Code Playgroud)

android dialog popupwindow

2
推荐指数
1
解决办法
7399
查看次数

0
推荐指数
1
解决办法
3万
查看次数