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.

Advertisements

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

Project Blog 24

Weekly check

Last week I finished the task more smoothly, and I needed to finish my project faster.

  • Solve button problem

I finally chose to use the button group to achieve the button display and use.

  • How to complete sub-screen switching

I use ViewFlipper to complete the child window switch, and ViewFlipper to meet the basic needs of the entire app.

  • Try to complete the Timetable feature

Although in the process of completing the many problems encountered, but still successfully completed, and can be displayed on different sizes of the screen.

  • Learn about Google API knowledge

I only have a simple look at some of the API information, but did not find a satisfactory example to help me.

Project Blog 23

Timetable:

For me Timetable details, I gave up using the GridView tool because the final display of the results can not be made to me, and my time will change as the screen size changes. So I finally use the LinearLayout and TextView to help me achieve the timetable.

I also tried to show the results of different models, the basic can meet the needs of most models.

This slideshow requires JavaScript.

Timetable function is basically completed, the rest of the details will be modified during the test period.

 

Project Blog 22

Today I have some strange problems, these problems are very troubled me.
Question 1:
My computer does not know why the crash, when I restart the time I can not read the data before I completed.
Solution:
I restart the system, I do not know why this error occurs. Fortunately, after the restart Android Studio can run normally, but the program can not run.

Question 2:
All my Java files are displayed that can not understand code R, but this is the default code for the compiler and displays an error. Error: null value in entry: blameLogFolder = null.
Solution:
I found some information, this is gradle a bug, just delete the project root directory. Grale directory, and then re-compile once.

Question 3:

QQ图片20170927003046

This problem does not affect the operation of the program and I have not found a solution, this problem is not resolved.