-
Notifications
You must be signed in to change notification settings - Fork 20
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
lilei
committed
Feb 20, 2019
1 parent
af49ed6
commit c25fd01
Showing
6 changed files
with
109 additions
and
12 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
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
39 changes: 39 additions & 0 deletions
39
sample/src/main/java/me/hiten/jkcardlayout/sample/SettingDialogFragment.kt
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,39 @@ | ||
package me.hiten.jkcardlayout.sample | ||
|
||
import android.os.Bundle | ||
import android.support.v4.app.DialogFragment | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import kotlinx.android.synthetic.main.dialog_setting.* | ||
|
||
class SettingDialogFragment : DialogFragment(){ | ||
|
||
|
||
|
||
companion object { | ||
|
||
const val KEY_TITLE = "title" | ||
|
||
fun newInstance(title: String):SettingDialogFragment{ | ||
val settingDialogFragment = SettingDialogFragment() | ||
val bundle = Bundle() | ||
bundle.putString(KEY_TITLE,title) | ||
settingDialogFragment.arguments = bundle | ||
return settingDialogFragment | ||
} | ||
} | ||
|
||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { | ||
return inflater.inflate(R.layout.dialog_setting,container,false) | ||
} | ||
|
||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
super.onViewCreated(view, savedInstanceState) | ||
arguments?.let { | ||
val title = it.getString(KEY_TITLE) | ||
tv_title.text = title | ||
} | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:gravity="center" | ||
android:padding="30dp" | ||
android:orientation="vertical"> | ||
|
||
|
||
<TextView | ||
android:minWidth="200dp" | ||
android:id="@+id/tv_title" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center" | ||
android:textSize="30sp" /> | ||
|
||
<android.support.v7.widget.AppCompatSeekBar | ||
android:id="@+id/seek_bar" | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp" | ||
/> | ||
</LinearLayout> |