mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-15 18:28:47 +00:00
Added URL links to stores' official sites
This commit is contained in:
parent
95251d7115
commit
ef527aef42
@ -1,5 +1,8 @@
|
||||
package com.example.listify.ui.store;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.widget.TextView;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -13,7 +16,36 @@ import com.example.listify.R;
|
||||
public class StoreFragment extends Fragment {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View root = inflater.inflate(R.layout.fragment_stores, container, false);
|
||||
|
||||
|
||||
TextView krogerText = (TextView) root.findViewById(R.id.textView11);
|
||||
krogerText.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
gotoUrl("https://www.kroger.com/");
|
||||
}
|
||||
});
|
||||
|
||||
TextView kohlsText = (TextView) root.findViewById(R.id.textView12);
|
||||
krogerText.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
gotoUrl("https://www.kohls.com/");
|
||||
}
|
||||
});
|
||||
|
||||
TextView ebayText = (TextView) root.findViewById(R.id.textView13);
|
||||
krogerText.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
gotoUrl("https://www.ebay.com/");
|
||||
}
|
||||
});
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
private void gotoUrl(String url) {
|
||||
Uri u = Uri.parse(url);
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, u));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user