-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f148695
commit 54c0622
Showing
5 changed files
with
185 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
app/src/main/java/io/treehouses/remote/HotspotDialogFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package io.treehouses.remote; | ||
|
||
import android.app.Activity; | ||
import android.app.AlertDialog; | ||
import android.app.Dialog; | ||
import android.content.DialogInterface; | ||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.support.annotation.NonNull; | ||
import android.util.Log; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
|
||
/** | ||
* Created by Terrence on 3/12/2018. | ||
*/ | ||
|
||
public class HotspotDialogFragment extends WifiDialogFragment { | ||
|
||
private static final String TAG = "HotspotDialogFragment"; | ||
|
||
|
||
public static HotspotDialogFragment newInstance(int num) { | ||
HotspotDialogFragment hDialogFragment = new HotspotDialogFragment(); | ||
// Bundle bundle = new Bundle(); | ||
// bundle.putInt("num", num); | ||
// dialogFragment.setArguments(bundle); | ||
|
||
return hDialogFragment; | ||
} | ||
|
||
@NonNull | ||
@Override | ||
public Dialog onCreateDialog(Bundle savedInstanceState) { | ||
Log.d(TAG,"In onCreateDialog()"); | ||
|
||
// Build the dialog and set up the button click handlers | ||
LayoutInflater inflater = getActivity().getLayoutInflater(); | ||
View mView = inflater.inflate(R.layout.dialog_design,null); | ||
initLayoutView(mView); | ||
|
||
final AlertDialog mDialog = getAlertDialog(mView); | ||
mDialog.setTitle(R.string.dialog_message_hotspot); | ||
|
||
//initially disable button click | ||
getListener(mDialog); | ||
setTextChangeListener(mDialog); | ||
|
||
return mDialog; | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters