Java Code Examples for com.gizwits.opensource.appkit.view.SlideListView2

The following examples show how to use com.gizwits.opensource.appkit.view.SlideListView2. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: GOpenSource_AppKit_Android_AS   Source File: mySharedFragment4.java    License: MIT License 6 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

	// 动态找到布局文件,再从这个布局中find出TextView对象
	View contextView = inflater.inflate(R.layout.activity_gos_shared_list, container, false);
	SlideListView2 mListView = (SlideListView2) contextView.findViewById(R.id.mysharedlist);
	mListView.initSlideMode(SlideListView2.MOD_RIGHT);
	// 如果是共享状态界面的话需要显示
	LinearLayout addshared = (LinearLayout) contextView.findViewById(R.id.addshared);

	shareddeviceproductname = (TextView) contextView.findViewById(R.id.shareddeviceproductname);
	Bundle arguments = getArguments();
	productname = arguments.getString("productname");

	if (GosConstant.mybindUsers.size() == 0) {
		shareddeviceproductname.setText(getResources().getString(R.string.have_no_bound_users));
	} else {
		shareddeviceproductname.setText(productname + getResources().getString(R.string.bounduser));
	}

	shareddeviceproductname.setVisibility(View.VISIBLE);
	myadapter = new myadapter();
	mListView.setAdapter(myadapter);
	initdata();
	return contextView;
}
 
Example 2
Source Project: GOpenSource_AppKit_Android_AS   Source File: mySharedFragment3.java    License: MIT License 5 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

	// 动态找到布局文件,再从这个布局中find出TextView对象
	View contextView = inflater.inflate(R.layout.activity_gos_shared_list, container, false);
	mListView = (SlideListView2) contextView.findViewById(R.id.mysharedlist);
	mListView.initSlideMode(SlideListView2.MOD_RIGHT);
	addshared = (LinearLayout) contextView.findViewById(R.id.addshared);

	addshared.setVisibility(View.VISIBLE);

	Bundle arguments = getArguments();
	shareddeviceproductname = (TextView) contextView.findViewById(R.id.shareddeviceproductname);
	productname = arguments.getString("productname");
	if (GosConstant.mydeviceSharingInfos.size() == 0) {
		shareddeviceproductname.setText(getResources().getString(R.string.have_not_been_shared));
	} else {
		shareddeviceproductname.setText(productname + " " + getResources().getString(R.string.sharedto));
	}

	shareddeviceproductname.setVisibility(View.VISIBLE);
	myadapter = new myadapter();
	mListView.setAdapter(myadapter);

	addshared.setOnClickListener(new OnClickListener() {

		@Override
		public void onClick(View arg0) {
			Intent tent = new Intent(getActivity(), addSharedActivity.class);
			tent.putExtra("productname", productname);
			tent.putExtra("did", deviceID);
			startActivity(tent);
		}
	});

	initData();
	return contextView;
}
 
Example 3
Source Project: Gizwits-SmartBuld_Android   Source File: GosDeviceListActivity.java    License: MIT License 5 votes vote down vote up
private void initView() {
	svListGroup = (ScrollView) findViewById(R.id.svListGroup);
	llNoDevice = (LinearLayout) findViewById(R.id.llNoDevice);
	imgNoDevice = (ImageView) findViewById(R.id.imgNoDevice);
	btnNoDevice = (Button) findViewById(R.id.btnNoDevice);

	icBoundDevices = findViewById(R.id.icBoundDevices);
	icFoundDevices = findViewById(R.id.icFoundDevices);
	icOfflineDevices = findViewById(R.id.icOfflineDevices);

	slvBoundDevices = (SlideListView2) icBoundDevices.findViewById(R.id.slideListView1);
	slvFoundDevices = (SlideListView2) icFoundDevices.findViewById(R.id.slideListView1);
	slvOfflineDevices = (SlideListView2) icOfflineDevices.findViewById(R.id.slideListView1);

	llNoBoundDevices = (LinearLayout) icBoundDevices.findViewById(R.id.llHaveNotDevice);
	llNoFoundDevices = (LinearLayout) icFoundDevices.findViewById(R.id.llHaveNotDevice);
	llNoOfflineDevices = (LinearLayout) icOfflineDevices.findViewById(R.id.llHaveNotDevice);

	tvBoundDevicesListTitle = (TextView) icBoundDevices.findViewById(R.id.tvListViewTitle);
	tvFoundDevicesListTitle = (TextView) icFoundDevices.findViewById(R.id.tvListViewTitle);
	tvOfflineDevicesListTitle = (TextView) icOfflineDevices.findViewById(R.id.tvListViewTitle);

	String boundDevicesListTitle = (String) getText(R.string.bound_divices);
	tvBoundDevicesListTitle.setText(boundDevicesListTitle);
	String foundDevicesListTitle = (String) getText(R.string.found_devices);
	tvFoundDevicesListTitle.setText(foundDevicesListTitle);
	String offlineDevicesListTitle = (String) getText(R.string.offline_devices);
	tvOfflineDevicesListTitle.setText(offlineDevicesListTitle);

}
 
Example 4
Source Project: gokit-android   Source File: GosDeviceListActivity.java    License: MIT License 5 votes vote down vote up
private void initView() {
	svListGroup = (ScrollView) findViewById(R.id.svListGroup);
	llNoDevice = (LinearLayout) findViewById(R.id.llNoDevice);
	imgNoDevice = (ImageView) findViewById(R.id.imgNoDevice);
	btnNoDevice = (Button) findViewById(R.id.btnNoDevice);

	icBoundDevices = findViewById(R.id.icBoundDevices);
	icFoundDevices = findViewById(R.id.icFoundDevices);
	icOfflineDevices = findViewById(R.id.icOfflineDevices);

	slvBoundDevices = (SlideListView2) icBoundDevices.findViewById(R.id.slideListView1);
	slvFoundDevices = (SlideListView2) icFoundDevices.findViewById(R.id.slideListView1);
	slvOfflineDevices = (SlideListView2) icOfflineDevices.findViewById(R.id.slideListView1);

	llNoBoundDevices = (LinearLayout) icBoundDevices.findViewById(R.id.llHaveNotDevice);
	llNoFoundDevices = (LinearLayout) icFoundDevices.findViewById(R.id.llHaveNotDevice);
	llNoOfflineDevices = (LinearLayout) icOfflineDevices.findViewById(R.id.llHaveNotDevice);

	tvBoundDevicesListTitle = (TextView) icBoundDevices.findViewById(R.id.tvListViewTitle);
	tvFoundDevicesListTitle = (TextView) icFoundDevices.findViewById(R.id.tvListViewTitle);
	tvOfflineDevicesListTitle = (TextView) icOfflineDevices.findViewById(R.id.tvListViewTitle);

	String boundDevicesListTitle = (String) getText(R.string.bound_divices);
	tvBoundDevicesListTitle.setText(boundDevicesListTitle);
	String foundDevicesListTitle = (String) getText(R.string.found_devices);
	tvFoundDevicesListTitle.setText(foundDevicesListTitle);
	String offlineDevicesListTitle = (String) getText(R.string.offline_devices);
	tvOfflineDevicesListTitle.setText(offlineDevicesListTitle);

}
 
Example 5
private void initView() {
	svListGroup = (ScrollView) findViewById(R.id.svListGroup);
	llNoDevice = (ScrollView) findViewById(R.id.llNoDevice);
	imgNoDevice = (ImageView) findViewById(R.id.imgNoDevice);
	btnNoDevice = (Button) findViewById(R.id.btnNoDevice);

	icBoundDevices = findViewById(R.id.icBoundDevices);
	icFoundDevices = findViewById(R.id.icFoundDevices);
	icOfflineDevices = findViewById(R.id.icOfflineDevices);

	slvBoundDevices = (SlideListView2) icBoundDevices.findViewById(R.id.slideListView1);
	slvFoundDevices = (SlideListView2) icFoundDevices.findViewById(R.id.slideListView1);
	slvOfflineDevices = (SlideListView2) icOfflineDevices.findViewById(R.id.slideListView1);

	llNoBoundDevices = (LinearLayout) icBoundDevices.findViewById(R.id.llHaveNotDevice);
	llNoFoundDevices = (LinearLayout) icFoundDevices.findViewById(R.id.llHaveNotDevice);
	llNoOfflineDevices = (LinearLayout) icOfflineDevices.findViewById(R.id.llHaveNotDevice);

	tvBoundDevicesListTitle = (TextView) icBoundDevices.findViewById(R.id.tvListViewTitle);
	tvFoundDevicesListTitle = (TextView) icFoundDevices.findViewById(R.id.tvListViewTitle);
	tvOfflineDevicesListTitle = (TextView) icOfflineDevices.findViewById(R.id.tvListViewTitle);

	String boundDevicesListTitle = (String) getText(R.string.bound_divices);
	tvBoundDevicesListTitle.setText(boundDevicesListTitle);
	String foundDevicesListTitle = (String) getText(R.string.found_devices);
	tvFoundDevicesListTitle.setText(foundDevicesListTitle);
	String offlineDevicesListTitle = (String) getText(R.string.offline_devices);
	tvOfflineDevicesListTitle.setText(offlineDevicesListTitle);

	// 下拉刷新

	mSwipeLayout = (VerticalSwipeRefreshLayout) findViewById(R.id.id_swipe_ly);

	mSwipeLayout.setOnRefreshListener(this);
	mSwipeLayout.setColorScheme(android.R.color.holo_blue_bright, android.R.color.holo_green_light,
			android.R.color.holo_orange_light, android.R.color.holo_red_light);

	mSwipeLayout1 = (VerticalSwipeRefreshLayout) findViewById(R.id.id_swipe_ly1);
	mSwipeLayout1.setOnRefreshListener(this);
	mSwipeLayout1.setColorScheme(android.R.color.holo_blue_bright, android.R.color.holo_green_light,
			android.R.color.holo_orange_light, android.R.color.holo_red_light);

}
 
Example 6
private void initView() {

		SlideListView2 devicelist = (SlideListView2) findViewById(R.id.devicelist);

		devicelist.initSlideMode(SlideListView2.MOD_RIGHT);
		myadapter = new myadapter();
		devicelist.setAdapter(myadapter);

		devicelist.setOnItemClickListener(new OnItemClickListener() {

			@Override
			public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {

				View redpoint = arg1.findViewById(R.id.redpoint);

				if (redpoint.getVisibility() == 0) {
					redpoint.setVisibility(View.GONE);
					GizMessage gizMessage = mymessageList.get(arg2);

					GizDeviceSharing.markMessageStatus(token, gizMessage.getId(), GizMessageStatus.GizMessageRead);
				}

			}
		});

	}
 
Example 7
Source Project: GOpenSource_AppKit_Android_AS   Source File: mySharedFragment3.java    License: MIT License 4 votes vote down vote up
public SlideListView2 getListview() {
	return mListView;
}