This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//using recyclevieew | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.TextView; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//udacity quiz | |
public static URL buildUrl(String udacityUrl) { | |
Uri builtUri = Uri.parse(udacityUrl).buildUpon().build(); | |
URL url = null; | |
try { | |
url = new URL(builtUri.toString()); | |
} catch (MalformedURLException e) { | |
e.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public int counter=0 ; | |
public void submitOrder(View view){ | |
counter++; | |
displayPri(counter); | |
displayQty(counter); | |
} | |
public void displayPri(int counter){ | |
int coff=5; | |
TextView pri=(TextView)findViewById(R.id.price_text_view); | |
counter=5*counter; |