Skip to content

Commit 572e84f

Browse files
committed
Merge pull request #107 from ParsePlatform/wangmengyan.replace_deprecated_onAttach
Replace deprecated onAttach method
2 parents f4c605d + 5acdced commit 572e84f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ParseUI-Login/src/main/java/com/parse/ui/ParseLoginFragment.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
package com.parse.ui;
2323

2424
import android.app.Activity;
25+
import android.content.Context;
2526
import android.os.Bundle;
2627
import android.text.InputType;
2728
import android.view.LayoutInflater;
@@ -119,9 +120,10 @@ public View onCreateView(LayoutInflater inflater, ViewGroup parent,
119120
}
120121

121122
@Override
122-
public void onAttach(Activity activity) {
123-
super.onAttach(activity);
123+
public void onAttach(Context context) {
124+
super.onAttach(context);
124125

126+
final Activity activity = getActivity();
125127
if (activity instanceof ParseLoginFragmentListener) {
126128
loginFragmentListener = (ParseLoginFragmentListener) activity;
127129
} else {

0 commit comments

Comments
 (0)