adapter

MSTest exception: Unit Test Adapter threw exception: Type is not resolved for member

匿名 (未验证) 提交于 2019-12-03 08:41:19
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In my project I write tests using Microsoft's unit testing framework. All of my tests pass when I run them from Visual Studio but when I run the tests from MSBuild all of the tests fail with the following erorr message: Unit Test Adapter threw exception: Type is not resolved for member SomeType , SomeAssembly Version= assemblyVersion , Culture=neutral, PublicKeyToken=.. The assembly not found is a 3rd party assembly referenced by all of the projects. The build script is used by TFS so I've aded the following lines: <RunTest>true</RunTest>

How to set Spinner default value to null?

匿名 (未验证) 提交于 2019-12-03 08:33:39
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to get a Spinner to load up with no selected value. Once the user selects a value it then takes them to another page. This is proving to be a problem because at present, the page just loads straight away before the user gets a choice to choose. My spinner class is set up the same way as Google's: http://developer.android.com/resources/tutorials/views/hello-spinner.html So basically, is it possible have a spinner that loads with nothing selected because at present, it loads the first item in my string array. 回答1: is it possible

clear a custom adapter

匿名 (未验证) 提交于 2019-12-03 08:28:06
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: ive implented a searchbar into my ListView and so far it works correctly except that the adapter is acting weird. Everytime i call its clear function my listview still shows the "old" content. public abstract class MYLISTITEM extends BaseAdapter { private Context activity; private List<String> data; private static LayoutInflater inflater=null; private int ItemIcon; private boolean moreVis; public MYISTITEM(Context a, int IconID,boolean vis) { activity = a; data = new ArrayList<String>(); inflater = (LayoutInflater)activity.getSystemService

How to create and install test adapter in Visual Studio

匿名 (未验证) 提交于 2019-12-03 08:28:06
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I want' to create a protractor test adapter for Visual Studio. I have found I can create it with implementing ITestExecutor and ITestDiscoverer. I follow the Marcel De Vries documentation ( https://xpirit.com/wp-content/uploads/2016/03/Xpirit-magazine-2-Protractor-UI-testing.pdf ) but I can't found how to add my extension in Visual Studio. I have tried to add my assembly directly in the \Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions folder. I have tried to create a Vsix and install it. (with UnitTestExtension as

ViewPage Fragment disappear when reload again

匿名 (未验证) 提交于 2019-12-03 07:36:14
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: The following is layout test.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click" android:id="@+id/button" /> <!-- Framelayout to display Fragments --> <FrameLayout android:id="@+id/frame_container" android:layout_width="match_parent" android:layout_height="match_parent" /> <

How to open Menu Context Android with click button in listview adapter?

风格不统一 提交于 2019-12-03 04:10:57
How to open Menu Context Android with click button in listview adapter ? I tried with my code, but not show the menu context, code public View getView(int position, View convertView, ViewGroup parent) { vi=convertView; if(convertView==null) vi = inflater.inflate(R.layout.tulisan_komentar_list_item,parent, false); LinearLayout content_favorite= (LinearLayout)vi.findViewById(R.id.content_favorite); final TextView date_komentar = (TextView)vi.findViewById(R.id.date_komentar); // artist name final TextView isi_komentar = (TextView)vi.findViewById(R.id.isi_komentar); // duration final TextView nama

Custom SimpleCursorAdapter, database query and NullPointerException

梦想的初衷 提交于 2019-12-03 03:55:40
I'm trying to make ListView populated from database, and spice each row with fancy delete button. So I made list Activity and custom SimpleCursorAdapter. This is main ListView activity: public class EditEntries extends ListActivity { Cursor cursor; DBAdapter db = new DBAdapter(this); private static String[] FROM = { _ID, SCORE_COLUMN, "date(time, 'localtime')", }; private static int[] TO = { R.id.rowid, R.id.title, R.id.time, }; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.entries_list); try { cursor = getEvents(); showEvents

Android Adapter “java.lang.IndexOutOfBoundsException: Invalid index 4, size is 4”

匿名 (未验证) 提交于 2019-12-03 03:10:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have problem with deleting item's from ArrayList and synchronising Adapter . I have my RecyclerView adapter with some ArrayList inside it called items . I download some list from the server and dispaly inside it. Whenever I click on some of list items I would like to delete it from server, from local ArrayList and notify the adapter about it. The problem is that when I delete everything from down to up from the list everything is ok, but when f.e. I delete 1st element from the list and then randomly some of the elements it deletes element

Adapter as Presenter? Or talking with a Presenter? Android and MVP

匿名 (未验证) 提交于 2019-12-03 03:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to follow the MVP pattern. However, I have some doubts on how to handle adapters and view holders on this pattern. Should I use the adapter as a presenter? Having the business logic? Or should I pass a instance of the presenter that handles the list logic and then call methods of the presenter when there is any interaction with the adapter elements? Thank you 回答1: There is no exact/correct definition of implementing MVP in Android To answer your question, in my view the Presenter should not have any Android logic. As such, the

How to control ListView with MVP Pattern for Android

匿名 (未验证) 提交于 2019-12-03 03:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm currently developing an android app using MVP Pattern. When I try to develop an Activity, I should use a ListView. So I'm using Adapter for ListView. But I heard Adapter is similar to Presenter on MVP Pattern. I think if Apdater is smiliar to Presenter, then I should make Presenter for updating ListView instead of Adapter. When this situation, how to develop ListView? Just use Adapter and keep using MVP Pattern? Thanks for your reading. 回答1: Yes, the Adapter should be the P component in an MVP pattern. In fact ListViews are pretty much