Project Blog 34

Map path display

The software can run smoothly after I try to finish the final part of the software, the map path is displayed. In Nbus’s existing app, there is a very important feature is “Map”. I tried to finish a similar or similar function. I searched a lot of information and learned some knowledge about the google API, and finally I found a very good way to help me complete the path display, that is, use the “Polylines and Polygons to Represent Routes and Areas”.QQ图片20171025000337

https://developers.google.com/maps/documentation/android-api/polygon-tutorial

Until now, I finally completed all the features, my oposject procedures have been basically completed, the rest is needed to beautify the program and find people to test the program function.

Advertisements

Project Blog 33

Solution

I and my mentor and my friends tried a lot of ways to help me fix the problem. First of all, we try to completely uninstall Android Studio again, and then re-install JAVA JDK, SDK, NDK and other necessary procedures. But that does not help anymore. Second, we retrieve the files in windows / user / .gread and rebuild it according to the suggestions retrieved by the web. But this did not solve the trouble I encountered. My friend tried to help me start with the Android Environment path. He tried to change the file’s environment path, directly connected to the existing file, but because windows error, and can not run smoothly. Eventually, my tutor tried to let me re-create the user. He thinks my path error is probably because my path exists in Chinese characters, resulting in Android Studio can not understand. I followed the advice of the instructor to re-create a digital system users, and then re-install a lot of plug-ins, my project can run smoothly. I feel very strange, because in the past my path exists in Chinese, Android Stuido can understand, but after the re-update the system but not.
In addition, I found that I did not completely reinstall the system caused me to lose some very important system files, these system files so that I can not run the individual procedures, and the system language pack is lost. I can not enter the Chinese language in the TEXT file and save it. I will reinstall the system again after completing the entire project.

Project Blog 32

Big Trouble 2

After I reinstalled the system and the necessary procedures, I started checking all my important documents. I am so lucky that my Project file still exists. After I reinstall Android Studio, I found that I could not run my program. The compiler encountered some mistakes, causing me to run smoothly.

QQ图片20171024234801

Project Blog 31

Big Trouble

This time I met a lot of trouble, causing me to be unable to update my blog and my program for a long time. My computer has a very serious problem. When I last used the computer, the system reminded me that the closure will automatically prepare to update the system. When I start the computer again the next day, the computer starts automatically updating the system. On the windows10 automatic update, I encountered some problems. windows system updates to 76% each time will continue to stop the update and then automatically restart the system. I started to think that windows updates just took a little time, so I did not go too much to pay attention to this problem. After a day, the system still can not open, windows maintained a continuous update and unlimited restart the state, I realized the seriousness of the problem. I checked some information and learned that it was a bug in Windows system updates. So I asked many people for help and solution, such as Todd, Sam and others. Sam through the open windows background, through the CMD to force the system to stop the update, and remove the update patch. This does solve the system constantly updated BUG, ​​and stopped the infinite restart. But because of the reasons for the decision, forced to stop the update and remove the update patch so that I can not successfully log on the user, only through the safe mode to open the system. My classmate Dean that the system has been unable to repair, I suggest I reinstall the system. With the help of Dean, I re-covered the old windows system, but always can not be used smoothly. In the last resort I chose to reinstall the system. This is not a complete re-installation of the system, this way will retain all the files, but will automatically remove the computer has been installed procedures, I only need to re-install the software.

This slideshow requires JavaScript.

Project Blog 30

Weekly Check

Last week successfully completed some of the features, but because the passport problem wasted me a lot of time, so I did not complete all the tasks.

  • Continue to find information about the google API.

Did not get a lot of help, still in the study area display function.

  • Do a similar to the timetable function of the button group and sub-screen switching function to the Fare Calculator function.

In the radio button group with the help of very smooth to achieve the desired software needs.

  • Try to complete the Fare calculation function.

Smooth completion of the calculation function, and in different screen size test, can be used successfully.

  • Think and prepare the report

I can not finish this task, but I will put this task together with the remaining features as the next week to complete the target.

Project Blog 29

I am looking for a lot of information, but also try to set a value to the radio button to calculate, but eventually failed. I chose to use a very cumbersome approach to set the conditions for each button ID to the Adult fare assignment.

This slideshow requires JavaScript.

Project Blog 28

About the most important Fare calculations. I plan to give each button a fixed value and set a specific calculation. So I found some information, to find a way to give RadioButton assignment.

Link:

https://www.w3schools.com/jsref/prop_radio_value.asp

https://stackoverflow.com/questions/5592345/how-to-select-a-radio-button-by-default

https://stackoverflow.com/questions/4711036/assign-an-initial-value-to-radio-button-as-checked

Project Blog 27

Like the Timetable feature, I added viewFlipper to the Fare calculator feature to help me implement sub-screen switching.

QQ图片20171005155032

public void showgroup (int PID)
{
    ViewFlipper sg = (ViewFlipper) findViewById(R.id.nextgroup);
    sg.setDisplayedChild(PID);
}


public void onRadioButtonClicked(View view) {
    boolean checked = ((RadioButton) view).isChecked();

    switch(view.getId()) {
        case R.id.Rnelson:
            if (checked)
                showgroup(0);
                break;

        case R.id.Rrichmond:
            if (checked)
                showgroup(1);
                break;
        case R.id.Rstoke:
            if (checked)
                showgroup(2);
                break;
        case R.id.Rbishopdale:
            if (checked)
                showgroup(3);
                break;
        case R.id.Rtahunanui:
            if (checked)
                showgroup(4);
                break;
    }
}

Project Blog 26

Button Group

In the Fare Calculator function of NBUS IOS APP, the user can calculate the fare based on the choice of different starting points and end points. I plan to do two parts, the first part is to do a button group to represent the starting point. The second part of a sub-screen to do a switch, according to the different starting point display different button group to select the end point.

Fare Calculator function need to select two buttons at the same time, so there is no like timetable function to add a simple button group, I chose to use the radio button to achieve.

QQ图片20171005154258

Project Blog 25

Weekly Tasks

Last week I completed the entire timetab function and I needed to continue learning about the google API just and complete the fare calculation function.

  • Continue to find information about the google API.
  • Do a similar to the timetable function of the button group and sub-screen switching function to the Fare Calculator function.
  • Try to complete the Fare calculation function.
  • Think and prepare the report