Skip to content

Instantly share code, notes, and snippets.

View meditat's full-sized avatar
🏠
Working from home

Shivam Singh meditat

🏠
Working from home
View GitHub Profile
//using recyclevieew
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
//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();
}
@meditat
meditat / MainActivity.java
Created March 3, 2017 14:10
how to directy use on click option in xml on android studio
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;