-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
秋逸
committed
Dec 26, 2016
1 parent
5a672cd
commit 4bc9d4d
Showing
3 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
VonTools/src/main/java/com/vondear/vontools/VonFragmentUtils.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,20 @@ | ||
package com.vondear.vontools; | ||
|
||
import android.support.v4.app.Fragment; | ||
import android.support.v4.app.FragmentActivity; | ||
import android.support.v4.app.FragmentManager; | ||
import android.support.v4.app.FragmentTransaction; | ||
|
||
/** | ||
* Created by vonde on 2016/12/26. | ||
*/ | ||
|
||
public class VonFragmentUtils { | ||
|
||
public static void initFragment(FragmentActivity fragmentActivity,Fragment fragment,int r_id_fragment) { | ||
FragmentManager fragmentManager = fragmentActivity.getSupportFragmentManager(); | ||
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); | ||
fragmentTransaction.replace(r_id_fragment, fragment); | ||
fragmentTransaction.commit(); | ||
} | ||
} |
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