July work experience miscellaneous notes

In android, CustomListView is often used as a pull-up to load more and pull-down to refresh components. However, if adding a head view to the CustomListView will cause the head view to have a certain gap from the top of the list, you can set the dividerHeight of the CustomListView to 0 in the layout file.

 

When copying desktop files, be sure to use ctrl+C or right-click to copy, instead of dragging to copy, otherwise, the file cannot be copied, only a shortcut will be obtained.

 

The chrome browser cannot download files. This problem is most likely caused by third-party plug-ins. If the browser does not install third-party download plug-ins, it may be a problem with downloading software, such as Xunlei, which can be uninstalled by uninstalling Xunlei.

 

When android sets the gravity attribute of a component, it can either set the gravity of the parent component or the layout_gravity of the child component to determine the positioning of the component in the LinearLayout.

 

The console.log of node.js cannot print Chinese

 

Eclipse version update address

http://www.eclipse.org/downloads/packages/   

 

 

A push needs to be sent using transparent messages, so that H5+ can monitor various events on the client side, such as receiving and clicking

 

Use the html5-based app developed by mui to solve the idea of ​​running in the background:

The code executed by js will not be executed when the page is closed. When a task that needs to be executed for a long time in the background is triggered on a certain page, the task needs to continue to be executed on the desktop returned by the mobile phone.

Taking periodic reporting of longitude and latitude as an example, the solution steps are as follows:

1. Define the timer object on the home page

2. Define a function for reporting latitude and longitude on the home page, create a timer object in this function, perform periodic reporting of latitude and longitude, and assign this timer object to the timer initially defined on the home page

3. Call the function of reporting latitude and longitude on the first page on the target interface

4. The first interface monitors the return key event. When the return key is clicked, the following code is called:

var main = plus.android.runtimeMainActivity();

main.moveTaskToBack(false);

5. When the app enters again, you only need to judge whether the timer is empty, judge whether the latitude and longitude is still being reported, and you can call stop or other business methods.

(In the later stage, you can expand more business parameters according to the business to determine whether the background task is executed and the status of execution, so that it is convenient to enter the app again to perform other operations on the background task)

 

The android pop-up box is generally implemented using PopupWindow, which is simpler than using ListView code, but the problem is that PopupWindow gets the focus, but the interface behind him cannot get the focus. If you want to click outside the pop-up box or click the return key, To make PopupWindow disappear, you need to use the following method:

Click on other areas of the screen and the popupWindow disappears

popupWindow.setBackgroundDrawable(new PaintDrawable());  

Click the return button to disappear, you need to use the following method:

View layout = inflater.inflate(R.layout.account_dialog,  

        (ViewGroup) activity.findViewById(R.id.account_dialog));  

layout.setFocusable(true); // this is important  

layout.setFocusableInTouchMode(true);  

  

popupWindow = new PopupWindow(layout);  

popupWindow.setFocusable(true);  

  

// Override onKeyListener  

layout.setOnKeyListener(new OnKeyListener() {  

    @Override  

    public boolean onKey(View v, int keyCode, KeyEvent event) {  

        if (keyCode == KeyEvent.KEYCODE_BACK) {  

            accountDialog.dismiss();  

            accountDialog = null;  

            return true;  

        }  

        return false;  

    }  

});  

 

Fragments need to implement the OnKeyListener interface to monitor the return key, and then implement the following methods

@Override

public boolean onKey(View v, int keyCode, KeyEvent event) {

if(keyCode==KeyEvent.KEYCODE_BACK){

}

}

 

In one project, the sdk of Baidu map and Gaode map are included at the same time, and the error "Found duplicate file for APK: assets/lineDashTexture.png" is reported when compiling.

This is because the sdk of Baidu and Gaode have the same name file "assets/lineDashTexture.png" in their jar packages, so they cannot be compiled. That is, Baidu SDK and AutoNavi SDK are mutually exclusive and cannot exist in the same project at the same time, and must be used separately.

 

When HBuilder is packaged locally, the appid value of assets/data/control.xml should be the same as the id value of mainfest.json and the parent directory name of www under the assets\apps\ directory.

 

In the multi-table joint query, if there are both outer joins and ordinary multi-table associations, put the outer join clause before the ordinary join, and separate multiple left join clauses with spaces

 

After WeChat sharing is completed, WXEntryActivity should be finished in onResp, otherwise, the interface will still stay in WXEntryActivity

 

When inheriting the View that comes with a system in android, you need to implement the construction method (Context context, AttributeSet attrs) in it, otherwise the View in the xml layout file, using findViewById in the java code to get the return is empty

 

Configure the click of View in the layout of android. Only Button and ImageButton do not need to add android:clickable="true", and the rest of the components need to be added. If you set the click listener event in the code, you don't need to add this property.

 

In the android list, the adapter writes the listener corresponding to the button on each row. It is necessary to create a new listener and set the button of each row.

 

HBuilder real machine ios debugging needs to download and install ituns

 

Mobile UnionPay payment interface address

https://open.unionpay.com/ajweb/help/search

 

Under the mixed development using HBuilder, you can use Eclipse to develop the java part, and then put the files in the Hbuilder project directory under the www directory. In this way, you can develop the java part in Eclipse and develop H5 in HBuilder, unified by Ec , Lipse is packaged locally.

 

Xiaomi Set VPN Click Settings - "Click Other Connection Methods - "VPN

 

The mobile phone turns on the GPS but the App cannot locate the problem:

The reason may be that the mobile phone has set the address of the app and the service request has been rejected. The solution is as follows (take Xiaomi as an example),

1. Settings-"Advanced Settings-"Security and Privacy-"Location Information-"Location Service Request-"Authorization Management-"Select the app to use positioning-"Check the positioning

 

When using Baidu positioning, if the latitude and longitude always returns to 0, you need to check whether the key is correct. If the key is correct, you need to check whether the so package, especially liblocSDK6a.so, is added.

When using GPS positioning, the latitude and longitude can be obtained correctly only when you go to an open space outdoors.

 

List in java has a remove method, which removes elements from the previous position. The parameter passed in for this position must be int, not other digital types, such as long. Otherwise, it cannot be deleted.

 

Free bug tracking system, bugclose

 

Use the following code to display the absolute address of the commonly used constant directory of HBuilder:

plus.io.requestFileSystem( plus.io.PUBLIC_DOCUMENTS, function(fs){

console.log(fs.root.fullPath);

}

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326612256&siteId=291194637