| Line 9... |
Line 9... |
| 9 |
import android.content.SharedPreferences;
|
9 |
import android.content.SharedPreferences;
|
| 10 |
import android.graphics.Paint;
|
10 |
import android.graphics.Paint;
|
| 11 |
import android.net.Uri;
|
11 |
import android.net.Uri;
|
| 12 |
import android.os.AsyncTask;
|
12 |
import android.os.AsyncTask;
|
| 13 |
import android.os.Bundle;
|
13 |
import android.os.Bundle;
|
| - |
|
14 |
import android.text.Spannable;
|
| - |
|
15 |
import android.text.SpannableString;
|
| 14 |
import android.text.TextUtils;
|
16 |
import android.text.TextUtils;
|
| - |
|
17 |
import android.text.style.UnderlineSpan;
|
| 15 |
import android.view.KeyEvent;
|
18 |
import android.view.KeyEvent;
|
| 16 |
import android.view.LayoutInflater;
|
19 |
import android.view.LayoutInflater;
|
| 17 |
import android.view.View;
|
20 |
import android.view.View;
|
| 18 |
import android.view.ViewGroup;
|
21 |
import android.view.ViewGroup;
|
| 19 |
import android.widget.AdapterView;
|
22 |
import android.widget.AdapterView;
|
| Line 57... |
Line 60... |
| 57 |
SharedPreferences apiData;
|
60 |
SharedPreferences apiData;
|
| 58 |
SharedPreferences.Editor userDataEditor;
|
61 |
SharedPreferences.Editor userDataEditor;
|
| 59 |
SharedPreferences.Editor apiSettingsEditor;
|
62 |
SharedPreferences.Editor apiSettingsEditor;
|
| 60 |
EditText emailId,content;
|
63 |
EditText emailId,content;
|
| 61 |
Button submit;
|
64 |
Button submit;
|
| 62 |
TextView contactUsNumber,tapToCall;
|
65 |
TextView contactUsNumber,tapToFAQ;
|
| 63 |
String subject="";
|
66 |
String subject="";
|
| 64 |
EditText otherContent;
|
67 |
EditText otherContent;
|
| 65 |
@Override
|
68 |
@Override
|
| 66 |
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
69 |
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
| 67 |
Bundle savedInstanceState) {
|
70 |
Bundle savedInstanceState) {
|
| Line 83... |
Line 86... |
| 83 |
issueList.add("---Select Issue---");
|
86 |
issueList.add("---Select Issue---");
|
| 84 |
while (st2.hasMoreElements()) {
|
87 |
while (st2.hasMoreElements()) {
|
| 85 |
issueList.add(st2.nextToken());
|
88 |
issueList.add(st2.nextToken());
|
| 86 |
}
|
89 |
}
|
| 87 |
ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity(),
|
90 |
ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity(),
|
| 88 |
android.R.layout.simple_spinner_item, issueList);
|
91 |
R.layout.spinner_text, issueList);
|
| 89 |
|
92 |
|
| 90 |
final Spinner spinYear = (Spinner)rootView.findViewById(R.id.contactUsSubject);
|
93 |
final Spinner spinYear = (Spinner)rootView.findViewById(R.id.contactUsSubject);
|
| 91 |
adapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);
|
94 |
//adapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);
|
| - |
|
95 |
//adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
| 92 |
spinYear.setAdapter(adapter);
|
96 |
spinYear.setAdapter(adapter);
|
| 93 |
content =(EditText) rootView.findViewById(R.id.contactUsContent);
|
97 |
content =(EditText) rootView.findViewById(R.id.contactUsContent);
|
| 94 |
submit = (Button) rootView.findViewById(R.id.contactUsButton);
|
98 |
submit = (Button) rootView.findViewById(R.id.contactUsButton);
|
| 95 |
contactUsNumber = (TextView) rootView.findViewById(R.id.contactUsNumber);
|
99 |
contactUsNumber = (TextView) rootView.findViewById(R.id.contactUsNumber);
|
| - |
|
100 |
tapToFAQ = (TextView) rootView.findViewById(R.id.getInTouch);
|
| 96 |
contactUsNumber.setText("Call Us at " +apiData.getString("contactus.number","") + " >");
|
101 |
contactUsNumber.setText("Call Us at " +apiData.getString("contactus.number","") + " >");
|
| 97 |
contactUsNumber.setPaintFlags(Paint.UNDERLINE_TEXT_FLAG);
|
102 |
contactUsNumber.setPaintFlags(Paint.UNDERLINE_TEXT_FLAG);
|
| 98 |
if(!(userData.getString("id", "").isEmpty())) {
|
103 |
if(!(userData.getString("id", "").isEmpty())) {
|
| 99 |
new Analytics(ProfitTillConstants.ANALYTICS_URL,
|
104 |
new Analytics(ProfitTillConstants.ANALYTICS_URL,
|
| 100 |
AnalyticsUtility.getAnalyticsRequest(getActivity(), userData.getString("id", ""), "Screen", "Contact Us", "Contact Us Screen"),
|
105 |
AnalyticsUtility.getAnalyticsRequest(getActivity(), userData.getString("id", ""), "Screen", "Contact Us", "Contact Us Screen"),
|
| 101 |
AnalyticsJsonResponse.getAnalyticsRequestInstance(),
|
106 |
AnalyticsJsonResponse.getAnalyticsRequestInstance(),
|
| 102 |
AnalyticsErrorResponse.getAnalyitcsResponseInstance()).anlyticsRequest(getActivity());
|
107 |
AnalyticsErrorResponse.getAnalyitcsResponseInstance()).anlyticsRequest(getActivity());
|
| 103 |
}
|
108 |
}
|
| - |
|
109 |
|
| - |
|
110 |
Spannable spannable=new SpannableString(tapToFAQ.getText().toString());
|
| - |
|
111 |
spannable.setSpan(new UnderlineSpan(), 0, tapToFAQ.length(), 0);
|
| - |
|
112 |
tapToFAQ.setText(spannable);
|
| - |
|
113 |
|
| - |
|
114 |
tapToFAQ.setOnClickListener(new View.OnClickListener() {
|
| - |
|
115 |
@Override
|
| - |
|
116 |
public void onClick(View v) {
|
| - |
|
117 |
//getActivity().getSupportActionBar().setCustomView(R.layout.actionbaraboutus);
|
| - |
|
118 |
/*AboutUsFragment myProfile = new AboutUsFragment();
|
| - |
|
119 |
getActivity().getFragmentManager().beginTransaction()
|
| - |
|
120 |
.replace(R.id.frame_container, myProfile, "Mike")
|
| - |
|
121 |
.addToBackStack(null)
|
| - |
|
122 |
.commit();*/
|
| - |
|
123 |
|
| - |
|
124 |
Intent resultIntent = new Intent(getActivity(), MainActivity.class);
|
| - |
|
125 |
resultIntent.setAction("11");
|
| - |
|
126 |
startActivity(resultIntent);
|
| - |
|
127 |
}
|
| - |
|
128 |
});
|
| 104 |
spinYear.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
129 |
spinYear.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
| 105 |
@Override
|
130 |
@Override
|
| 106 |
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
131 |
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
| 107 |
subject=spinYear.getSelectedItem().toString();
|
132 |
subject=spinYear.getSelectedItem().toString();
|
| 108 |
|
133 |
|
| 109 |
if(position==(issueList.size()-1)){
|
134 |
if(position==(issueList.size()-1)){
|
| 110 |
otherContent.setVisibility(View.VISIBLE);
|
135 |
otherContent.setVisibility(View.VISIBLE);
|
| 111 |
|
136 |
|
| 112 |
}
|
137 |
}
|
| 113 |
else{
|
138 |
else{
|
| 114 |
otherContent.setVisibility(View.GONE);
|
139 |
otherContent.setVisibility(View.GONE);
|
| 115 |
}
|
140 |
}
|
| 116 |
|
141 |
|
| 117 |
}
|
142 |
}
|
| 118 |
|
143 |
|
| 119 |
@Override
|
144 |
@Override
|
| 120 |
public void onNothingSelected(AdapterView<?> parent) {
|
145 |
public void onNothingSelected(AdapterView<?> parent) {
|