Advertisement
minafaw3

SettingsFragment

Feb 5th, 2016
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.35 KB | None | 0 0
  1. package org.aidmaid.settings;
  2.  
  3. import android.app.Activity;
  4. import android.app.AlertDialog;
  5. import android.content.DialogInterface;
  6. import android.content.Intent;
  7. import android.database.Cursor;
  8. import android.graphics.drawable.Drawable;
  9. import android.net.Uri;
  10. import android.os.Bundle;
  11. import android.provider.MediaStore;
  12. import android.support.v4.app.Fragment;
  13. import android.view.LayoutInflater;
  14. import android.view.View;
  15. import android.view.ViewGroup;
  16. import android.widget.Button;
  17. import android.widget.CheckBox;
  18. import android.widget.EditText;
  19. import android.widget.ImageButton;
  20. import android.widget.LinearLayout;
  21. import android.widget.TextView;
  22.  
  23. import com.android.volley.RequestQueue;
  24. import com.android.volley.Response;
  25. import com.android.volley.VolleyError;
  26. import com.android.volley.toolbox.Volley;
  27. import com.octo.android.robospice.JacksonSpringAndroidSpiceService;
  28. import com.octo.android.robospice.SpiceManager;
  29.  
  30. import org.aidmaid.ChangePasswordActivity;
  31. import org.aidmaid.ChooseAlarmSoundActivity;
  32. import org.aidmaid.ContactUsActivity;
  33. import org.aidmaid.DefineMessageActivity;
  34. import org.aidmaid.EditProfileActivity;
  35. import org.aidmaid.LinkedAccountsActivity;
  36. import org.aidmaid.PoliceNumberActivity;
  37. import org.aidmaid.R;
  38. import org.aidmaid.TermsOfUseActivity;
  39. import org.aidmaid.contacts.ContactsFragment;
  40. import org.aidmaid.countryChoosing.CountryChoosingActivity;
  41.  
  42. import java.io.File;
  43. import java.io.FileNotFoundException;
  44. import java.io.FileOutputStream;
  45. import java.io.IOException;
  46.  
  47. import de.hdodenhof.circleimageview.CircleImageView;
  48.  
  49.  
  50. /**
  51. * A simple {@link Fragment} subclass.
  52. * Use the {@link SettingsFragment#newInstance} factory method to
  53. * create an instance of this fragment.
  54. */
  55. public class SettingsFragment extends Fragment {
  56. public static SettingsFragment newInstance() {
  57. SettingsFragment fragment = new SettingsFragment();
  58. return fragment;
  59. }
  60.  
  61. @Override
  62. public void onResume() {
  63. super.onResume();
  64. }
  65.  
  66. public SettingsFragment() {
  67. // Required empty public constructor
  68. }
  69.  
  70. @Override
  71. public void onCreate(Bundle savedInstanceState) {
  72. super.onCreate(savedInstanceState);
  73.  
  74. //setUpMapIfNeeded();
  75. }
  76.  
  77.  
  78. @Override
  79. public View onCreateView(LayoutInflater inflater, ViewGroup container,
  80. Bundle savedInstanceState) {
  81. // Inflate the layout for this fragment
  82. View view = inflater.inflate(R.layout.activity_settings_new, container,
  83. false);
  84.  
  85.  
  86. return view;
  87. }
  88.  
  89.  
  90. @Override
  91. public void onViewCreated(View view, Bundle savedInstanceState) {
  92. loadAccountLayout();
  93. loadAlertLayout();
  94. loadSettings();
  95. //loginInitialize();
  96. doneButtonInitialize();
  97.  
  98. //chooseCountryInitialize();
  99. //sirenButtonInitialize();
  100. //rateButtonInitialize();
  101. //contactUsButtonInitialize();
  102. //termsOfUseButtonInitialize();
  103. //privacyPolicyButtonInitialize();
  104. }
  105.  
  106.  
  107. private void sirenButtonInitialize() {
  108. Button alertSoundButton = (Button) getView().findViewById(R.id.alertSoundButton);
  109. alertSoundButton.setOnClickListener(new View.OnClickListener() {
  110. @Override
  111. public void onClick(View v) {
  112. Intent chooseAlarmSoundListener = new Intent(getActivity(), ChooseAlarmSoundActivity.class);
  113. startActivity(chooseAlarmSoundListener);
  114. }
  115. });
  116. }
  117.  
  118. @Override
  119. public void onAttach(Activity activity) {
  120. super.onAttach(activity);
  121. mSpiceManager.start(this.getActivity());
  122. }
  123.  
  124. @Override
  125. public void onDetach() {
  126. mSpiceManager.shouldStop();
  127. super.onDetach();
  128. }
  129.  
  130.  
  131.  
  132. //private SeekBar mDelayBeforeAlarmSeekBar;
  133. //private TextView mDelayBeforeAlarmTextView;
  134.  
  135. private CheckBox SendGPSCoordsCheckBox;
  136. private CheckBox PostToSocialNetworksCheckBox;
  137.  
  138. private TextView CountryTextView;
  139. private TextView PolicePhoneTextView;
  140. private EditText AmbulancePhoneTexView;
  141.  
  142. private CheckBox FlashlightBlinkingCheckBox;
  143. private CheckBox ScreenFlashingCheckBox;
  144. private CheckBox mShakingCheckBox;
  145. private CheckBox MaximizeVolumeCheckBox;
  146. private ContactsFragment mContactFragment;
  147.  
  148. private ImageButton mChangePassword, mLinkedAccounts;
  149. private ImageButton mNotifiyContact;
  150. private TextView mEditProfile;
  151. private ImageButton defineMessageButton;
  152. private void loadAccountLayout() {
  153.  
  154. // implement account layout
  155. mChangePassword = (ImageButton) getView().findViewById(R.id.account_layout).findViewById(R.id.imgbtn_changepass);
  156. mLinkedAccounts = (ImageButton) getView().findViewById(R.id.account_layout).findViewById(R.id.img_linkedAcounts);
  157. mEditProfile = (TextView) getView().findViewById(R.id.account_layout).findViewById(R.id.editprofile2);
  158.  
  159. mChangePassword.setOnClickListener(new View.OnClickListener() {
  160. @Override
  161. public void onClick(View v) {
  162. NavigateChangePasswordActivity();
  163. }
  164. });
  165. mEditProfile.setOnClickListener(new View.OnClickListener() {
  166. @Override
  167. public void onClick(View v) {
  168. NavigateToEditProfileAcivity();
  169. }
  170. });
  171. mLinkedAccounts.setOnClickListener(new View.OnClickListener() {
  172. @Override
  173. public void onClick(View v) {
  174. NavigateLinkedAccountsActivity();
  175. }
  176. });
  177. }
  178. private void loadAlertLayout() {
  179.  
  180. // implement of alert layout
  181. mNotifiyContact = (ImageButton) getView().findViewById(R.id.alert_setting).findViewById(R.id.img_contactstonotify);
  182. mNotifiyContact.setOnClickListener(new View.OnClickListener() {
  183. @Override
  184. public void onClick(View v) {
  185.  
  186. }
  187. });
  188. SendGPSCoordsCheckBox = (CheckBox) getView().findViewById(R.id.alert_setting).findViewById(R.id.sendGpsCheckBox);
  189. SendGPSCoordsCheckBox.setChecked(ApplicationSettings.getSendGPSCoords(getActivity().getApplicationContext()));
  190. PostToSocialNetworksCheckBox = (CheckBox) getView().findViewById(R.id.alert_setting).findViewById(R.id.postToSocialCheckBox);
  191. PostToSocialNetworksCheckBox.setChecked(ApplicationSettings.getPostToSocialNetworks(getActivity().getApplicationContext()));
  192.  
  193.  
  194. defineMessageButton = (ImageButton) getView().findViewById(R.id.alert_setting).findViewById(R.id.defineMessageButton);
  195. defineMessageButton.setOnClickListener(new View.OnClickListener() {
  196. @Override
  197. public void onClick(View v) {
  198. NavigateDefineMessage();
  199. }
  200. });
  201.  
  202. PolicePhoneTextView = (TextView) getView().findViewById(R.id.alert_setting).findViewById(R.id.policePhoneEditText);
  203. PolicePhoneTextView.setText(ApplicationSettings.getPolicePhone(getActivity().getApplicationContext()));
  204. PolicePhoneTextView.setOnClickListener(new View.OnClickListener() {
  205. @Override
  206. public void onClick(View v) {
  207. NavigatePolicePhoneActivity();
  208. }
  209. });
  210.  
  211. }
  212.  
  213. private void NavigateDefineMessage() {
  214. Intent intent = new Intent(getActivity().getApplicationContext(), DefineMessageActivity.class);
  215. startActivity(intent);
  216. }
  217.  
  218.  
  219. private void loadSettings() {
  220.  
  221. //mDelayBeforeAlarmSeekBar = (SeekBar)getView().findViewById(R.id.delayBeforeAlarmSeekBar);
  222. //mDelayBeforeAlarmSeekBar.setProgress(ApplicationSettings.getDelayBeforeAlarm(getActivity().getApplicationContext())*10);
  223. //mDelayBeforeAlarmTextView = (TextView)getView().findViewById(R.id.delayBeforeAlarmTextView);
  224. //mDelayBeforeAlarmTextView.setText(Integer.toString(ApplicationSettings.getDelayBeforeAlarm(getActivity().getApplicationContext())) + " seconds");
  225.  
  226.  
  227. // CountryTextView = (TextView) getView().findViewById(R.id.countryNameTextView);
  228. // CountryTextView.setText(ApplicationSettings.getCountryList()[ApplicationSettings.getCountryId(getActivity().getApplicationContext())][0]);
  229.  
  230.  
  231. //AmbulancePhoneTexView = (EditText) getView().findViewById(R.id.ambulancePhoneEditText);
  232. //AmbulancePhoneTexView.setText(ApplicationSettings.getAmbulancePhone(getActivity().getApplicationContext()));
  233.  
  234. // FlashlightBlinkingCheckBox = (CheckBox) getView().findViewById(R.id.flashingBlinkingCheckBox);
  235. // FlashlightBlinkingCheckBox.setChecked(ApplicationSettings.getFlashlightBlinking(getActivity().getApplicationContext()));
  236. // ScreenFlashingCheckBox = (CheckBox) getView().findViewById(R.id.screenFlashingCheckBox);
  237. // ScreenFlashingCheckBox.setChecked(ApplicationSettings.getScreenFlashing(getActivity().getApplicationContext()));
  238. // MaximizeVolumeCheckBox = (CheckBox) getView().findViewById(R.id.maximizeVolumeCheckBox);
  239. // MaximizeVolumeCheckBox.setChecked(ApplicationSettings.getMaximizeVolume(getActivity().getApplicationContext()));
  240. // mShakingCheckBox = (CheckBox) getView().findViewById(R.id.shakingCheckBox);
  241. // mShakingCheckBox.setChecked(ApplicationSettings.getIsShaking(getActivity().getApplicationContext()));
  242.  
  243. // Button myContactsButton = (Button) getView().findViewById(R.id.myContactsButton);
  244. // myContactsButton.setOnClickListener(new View.OnClickListener() {
  245. // @Override
  246. // public void onClick(View v) {
  247. // //FrameLayout fragmentContainer = (FrameLayout)getView().findViewById(R.id.fragmentContainer);
  248. //// Intent contactsIntent = new Intent(SettingsFragment.this.getActivity(), ContactsFragment.class);
  249. //// startActivity(contactsIntent);
  250. //
  251. //// FragmentManager childFragMan = getFragmentManager();
  252. //// FragmentTransaction childFragTrans = childFragMan.beginTransaction();
  253. //// mContactFragment = ContactsFragment.newInstance();
  254. //// childFragTrans.replace(R.id.fragmentContainer, mContactFragment);
  255. //// childFragTrans.commit();
  256. // }
  257. // });
  258. }
  259.  
  260. public static final int PICK_IMAGE_RESULT_CODE = 111;
  261.  
  262. private void loginInitialize() {
  263. Uri data = getActivity().getIntent().getData();
  264.  
  265. // if(data != null && data.getScheme().equals("aidmaidlogin")){
  266. // String userId = data.getQueryParameter("userid");
  267. // String username = data.getQueryParameter("username");
  268. // String fullname = data.getQueryParameter("fullname");
  269. // String phone = data.getQueryParameter("phone");
  270. // String email = data.getQueryParameter("email");
  271. //
  272. // ApplicationSettings.setUserId(getActivity().getApplicationContext(), userId);
  273. // ApplicationSettings.setUsername(getActivity().getApplicationContext(), username);
  274. // ApplicationSettings.setFullname(getActivity().getApplicationContext(), fullname);
  275. // ApplicationSettings.setTelephone(getActivity().getApplicationContext(), phone);
  276. // ApplicationSettings.setEmail(getActivity().getApplicationContext(), email);
  277. //
  278. // ApplicationSettings.setIsLogin(getActivity().getApplicationContext(), true);
  279. //
  280. // LoadAvatar(userId);
  281. // }
  282.  
  283. // mDelayBeforeAlarmSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
  284.  
  285. // @Override
  286. // public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
  287. //mDelayBeforeAlarmSeekBar.setProgress(progress / 100);
  288. // mDelayBeforeAlarmTextView.setText(Integer.toString(progress / 10) + " seconds");
  289. //}
  290.  
  291. // @Override
  292. // public void onStartTrackingTouch(SeekBar seekBar) {
  293. //
  294. // }
  295. //
  296. // @Override
  297. // public void onStopTrackingTouch(SeekBar seekBar) {
  298. //
  299. // }
  300. // });
  301.  
  302. LinearLayout loginInfoContainer = (LinearLayout) getView().findViewById(R.id.loginInfoContainer);
  303. Button logoutButton = (Button) getView().findViewById(R.id.logoutButton);
  304.  
  305. if (ApplicationSettings.getIsLogin(getActivity().getApplicationContext())) {
  306. loginInfoContainer.setVisibility(View.VISIBLE);
  307.  
  308.  
  309.  
  310. //logoutButton.setVisibility(View.VISIBLE);
  311. // logoutButton.setOnClickListener(new View.OnClickListener() {
  312. // @Override
  313. // public void onClick(View view) {
  314. //
  315. // }
  316. // });
  317.  
  318.  
  319. CircleImageView loadImageButton = (CircleImageView) getView().findViewById(R.id.avatarImageView);
  320. loadImageButton.setOnClickListener(new View.OnClickListener() {
  321. @Override
  322. public void onClick(View view) {
  323. Intent intent = new Intent();
  324. intent.setType("image/*");
  325. intent.setAction(Intent.ACTION_GET_CONTENT);
  326. startActivityForResult(Intent.createChooser(intent, "Select Picture"), PICK_IMAGE_RESULT_CODE);
  327. }
  328. });
  329.  
  330. updateAvatarImage();
  331. }
  332. }
  333.  
  334. private void doneButtonInitialize() {
  335. ImageButton doneButton = (ImageButton) getView().findViewById(R.id.doneButton);
  336. doneButton.setOnClickListener(new View.OnClickListener() {
  337. @Override
  338. public void onClick(View v) {
  339. saveSettings();
  340. new AlertDialog.Builder(getActivity())
  341. .setTitle("Success")
  342. .setMessage("Settings successfully saved")
  343. .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
  344. public void onClick(DialogInterface dialog, int which) {
  345.  
  346. }
  347. })
  348. .setIcon(android.R.drawable.ic_dialog_info)
  349. .show();
  350. }
  351. });
  352. }
  353.  
  354. private void saveSettings() {
  355.  
  356. //ApplicationSettings.setDelayBeforeAlarm(getActivity().getApplicationContext(), mDelayBeforeAlarmSeekBar.getProgress() / 10);
  357.  
  358. ApplicationSettings.setSendGPSCoords(getActivity().getApplicationContext(), SendGPSCoordsCheckBox.isChecked());
  359. ApplicationSettings.setPostToSocialNetworks(getActivity().getApplicationContext(), PostToSocialNetworksCheckBox.isChecked());
  360.  
  361. // ApplicationSettings.setPolicePhone(getActivity().getApplicationContext(), PolicePhoneTextView.getText().toString());
  362. // ApplicationSettings.setAmbulancePhone(getActivity().getApplicationContext(), AmbulancePhoneTexView.getText().toString());
  363.  
  364. ApplicationSettings.setFlashlightBlinking(getActivity().getApplicationContext(), FlashlightBlinkingCheckBox.isChecked());
  365. ApplicationSettings.setScreenFlashing(getActivity().getApplicationContext(), ScreenFlashingCheckBox.isChecked());
  366. ApplicationSettings.setMaximizeVolume(getActivity().getApplicationContext(), MaximizeVolumeCheckBox.isChecked());
  367. ApplicationSettings.setIsShaking(getActivity().getApplicationContext(), mShakingCheckBox.isChecked());
  368. }
  369.  
  370.  
  371.  
  372. private final int CHOOSE_COUNTRY_REQUEST_CODE = 111;
  373.  
  374. private void chooseCountryInitialize() {
  375. LinearLayout countryContainer = (LinearLayout) getView().findViewById(R.id.countryContainer);
  376. countryContainer.setOnClickListener(new View.OnClickListener() {
  377. @Override
  378. public void onClick(View v) {
  379. Intent intent = new Intent(getActivity().getApplicationContext(), CountryChoosingActivity.class);
  380. startActivityForResult(intent, CHOOSE_COUNTRY_REQUEST_CODE);
  381. }
  382. });
  383. }
  384.  
  385. @Override
  386. public void onActivityResult(int requestCode, int resultCode, Intent data) {
  387. super.onActivityResult(requestCode, resultCode, data);
  388.  
  389. if (requestCode == CHOOSE_COUNTRY_REQUEST_CODE) {
  390. CountryTextView = (TextView) getView().findViewById(R.id.countryNameTextView);
  391. CountryTextView.setText(ApplicationSettings.getCountryList()[ApplicationSettings.getCountryId(getActivity().getApplicationContext())][0]);
  392. }
  393. if (resultCode == Activity.RESULT_OK && requestCode == PICK_IMAGE_RESULT_CODE) {
  394. Uri selectedImage = data.getData();
  395. String[] filePathColumn = {MediaStore.Images.Media.DATA};
  396.  
  397. Cursor cursor = getActivity().getContentResolver().query(
  398. selectedImage, filePathColumn, null, null, null);
  399. cursor.moveToFirst();
  400.  
  401. int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
  402. String filePath = cursor.getString(columnIndex);
  403. cursor.close();
  404. UploadPhoto(ApplicationSettings.getUserId(getActivity().getApplicationContext()), new File(filePath));
  405. }
  406. }
  407.  
  408. private void rateButtonInitialize() {
  409. Button rateButton = (Button) getView().findViewById(R.id.rateButton);
  410. rateButton.setOnClickListener(new View.OnClickListener() {
  411. @Override
  412. public void onClick(View v) {
  413. final String appPackageName = getActivity().getPackageName(); // Can also use getPackageName(), as below
  414. startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
  415. }
  416. });
  417. }
  418.  
  419. private void contactUsButtonInitialize() {
  420. Button contactUsButton = (Button) getView().findViewById(R.id.contactUsButton);
  421. contactUsButton.setOnClickListener(new View.OnClickListener() {
  422. @Override
  423. public void onClick(View v) {
  424. // String url = "http://www.aidmaid.net/contact.html";
  425. // Intent browserIntent = new Intent(Intent.ACTION_VIEW);
  426. // browserIntent.setData(Uri.parse(url));
  427. // startActivity(browserIntent);
  428.  
  429. Intent contactUsIntent = new Intent(SettingsFragment.this.getActivity().getApplicationContext(), ContactUsActivity.class);
  430. startActivity(contactUsIntent);
  431. }
  432. });
  433. }
  434.  
  435. private void termsOfUseButtonInitialize() {
  436. Button termsOfUseButton = (Button) getView().findViewById(R.id.termsOfUseButton);
  437. termsOfUseButton.setOnClickListener(new View.OnClickListener() {
  438. @Override
  439. public void onClick(View v) {
  440. Intent intent = new Intent(getActivity().getApplicationContext(), TermsOfUseActivity.class);
  441. Bundle parameters = new Bundle();
  442. parameters.putString("title", "Terms of use");
  443. intent.putExtras(parameters);
  444. startActivity(intent);
  445. }
  446. });
  447. }
  448.  
  449. private void privacyPolicyButtonInitialize() {
  450. Button privacyPolicyButton = (Button) getView().findViewById(R.id.privacyPolicyButton);
  451. privacyPolicyButton.setOnClickListener(new View.OnClickListener() {
  452. @Override
  453. public void onClick(View v) {
  454. Intent intent = new Intent(getActivity().getApplicationContext(), TermsOfUseActivity.class);
  455. Bundle parameters = new Bundle();
  456. parameters.putString("title", "Privacy policy");
  457. intent.putExtras(parameters);
  458. startActivity(intent);
  459. }
  460. });
  461. }
  462.  
  463. protected SpiceManager mSpiceManager = new SpiceManager(JacksonSpringAndroidSpiceService.class);
  464.  
  465. private void UploadPhoto(final String userId, File avatarFile) {
  466. UploadAvatarRequest uploadAcatarRequest = new UploadAvatarRequest(getActivity().getApplicationContext(), userId, avatarFile, new Response.Listener() {
  467. @Override
  468. public void onResponse(Object response) {
  469. loadAvatar(userId);
  470. }
  471. },
  472. new Response.ErrorListener() {
  473. @Override
  474. public void onErrorResponse(VolleyError error) {
  475.  
  476. }
  477. });
  478.  
  479. RequestQueue queue = Volley.newRequestQueue(getActivity().getApplicationContext());
  480. queue.add(uploadAcatarRequest);
  481. }
  482.  
  483. private String PATH_TO_IMAGE = "avatar.jpg";
  484.  
  485. private void updateAvatarImage() {
  486. String pathToImage = getActivity().getFilesDir() + "/" + PATH_TO_IMAGE;
  487. File file = new File(pathToImage);
  488. CircleImageView avatarImageView = (CircleImageView) getView().findViewById(R.id.avatarImageView);
  489. if (!file.exists()) {
  490. avatarImageView.setImageResource(R.drawable.avatar);
  491. loadAvatar(ApplicationSettings.getUserId(getActivity().getApplicationContext()));
  492. return;
  493. }
  494.  
  495. if (file.length() > 100)
  496. ApplicationSettings.setHasAvatar(getActivity().getApplicationContext(), true);
  497. else {
  498. ApplicationSettings.setHasAvatar(getActivity().getApplicationContext(), false);
  499. return;
  500. }
  501.  
  502. Drawable avatar = Drawable.createFromPath(pathToImage);
  503. if (avatar != null)
  504. avatarImageView.setImageDrawable(avatar);
  505. }
  506.  
  507. private void loadAvatar(String userId) {
  508. LoadAvatarRequest loadAcatarRequest = new LoadAvatarRequest(getActivity().getApplicationContext(), userId, new Response.Listener<byte[]>() {
  509. @Override
  510. public void onResponse(byte[] response) {
  511. try {
  512. String content = new String(response);
  513. String pathToImage = getActivity().getFilesDir() + "/" + PATH_TO_IMAGE;
  514. FileOutputStream stream = new FileOutputStream(pathToImage);
  515. stream.write(response);
  516. stream.close();
  517.  
  518. getActivity().runOnUiThread(new Runnable() {
  519. @Override
  520. public void run() {
  521. updateAvatarImage();
  522. }
  523. });
  524.  
  525. } catch (FileNotFoundException e) {
  526. e.printStackTrace();
  527. } catch (IOException e) {
  528. e.printStackTrace();
  529. }
  530. }
  531. }
  532. , new Response.ErrorListener() {
  533. @Override
  534. public void onErrorResponse(VolleyError error) {
  535.  
  536. }
  537. });
  538.  
  539. RequestQueue queue = Volley.newRequestQueue(getActivity().getApplicationContext());
  540. queue.add(loadAcatarRequest);
  541. }
  542.  
  543.  
  544. // navigate methods
  545.  
  546. private void NavigateChangePasswordActivity() {
  547. Intent EditProfileIntent = new Intent(getActivity(), ChangePasswordActivity.class);
  548. startActivity(EditProfileIntent);
  549. }
  550.  
  551. private void NavigateToEditProfileAcivity() {
  552. Intent EditProfileIntent = new Intent(getActivity(), EditProfileActivity.class);
  553. startActivity(EditProfileIntent);
  554. }
  555.  
  556. private void NavigateLinkedAccountsActivity() {
  557. Intent LinkedAccountIntent = new Intent(getActivity(), LinkedAccountsActivity.class);
  558. startActivity(LinkedAccountIntent);
  559. }
  560.  
  561. private void NavigatePolicePhoneActivity() {
  562. Intent PolicePhoneIntent = new Intent(getActivity(), PoliceNumberActivity.class);
  563. startActivity(PolicePhoneIntent);
  564. }
  565. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement