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
lizhaotailang
committed
Dec 20, 2016
1 parent
4e6541b
commit 7c63ff3
Showing
17 changed files
with
234 additions
and
136 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
20 changes: 20 additions & 0 deletions
20
app/src/main/java/com/marktony/zhihudaily/bookmarks/BookmarksContract.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.marktony.zhihudaily.bookmarks; | ||
|
||
import com.marktony.zhihudaily.BasePresenter; | ||
import com.marktony.zhihudaily.BaseView; | ||
|
||
/** | ||
* Created by lizhaotailang on 2016/12/20. | ||
*/ | ||
|
||
public interface BookmarksContract { | ||
|
||
interface View extends BaseView<Presenter> { | ||
|
||
} | ||
|
||
interface Presenter extends BasePresenter { | ||
|
||
} | ||
|
||
} |
62 changes: 62 additions & 0 deletions
62
app/src/main/java/com/marktony/zhihudaily/bookmarks/BookmarksFragment.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,62 @@ | ||
package com.marktony.zhihudaily.bookmarks; | ||
|
||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
import android.support.v4.app.Fragment; | ||
import android.support.v7.widget.RecyclerView; | ||
import android.support.v7.widget.Toolbar; | ||
import android.view.LayoutInflater; | ||
import android.view.Menu; | ||
import android.view.MenuInflater; | ||
import android.view.MenuItem; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
import com.marktony.zhihudaily.R; | ||
|
||
/** | ||
* Created by lizhaotailang on 2016/12/20. | ||
*/ | ||
|
||
public class BookmarksFragment extends Fragment { | ||
|
||
private RecyclerView recyclerView; | ||
|
||
public BookmarksFragment() {} | ||
|
||
public static BookmarksFragment newInstance() { | ||
return new BookmarksFragment(); | ||
} | ||
|
||
@Override | ||
public void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { | ||
View view = inflater.inflate(R.layout.fragment_bookmarks, container, false); | ||
|
||
setHasOptionsMenu(true); | ||
|
||
initViews(view); | ||
|
||
return view; | ||
} | ||
|
||
private void initViews(View view) { | ||
Toolbar toolbar = (Toolbar) getActivity().findViewById(R.id.toolbar); | ||
} | ||
|
||
@Override | ||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { | ||
inflater.inflate(R.menu.menu_read, menu); | ||
super.onCreateOptionsMenu(menu, inflater); | ||
} | ||
|
||
@Override | ||
public boolean onOptionsItemSelected(MenuItem item) { | ||
return true; | ||
} | ||
} |
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
Oops, something went wrong.