mirror of https://github.com/ThmmyNoLife/mTHMMY
Ezerous
8 years ago
12 changed files with 146 additions and 21 deletions
@ -0,0 +1,48 @@ |
|||
package gr.thmmy.mthmmy.activities.board; |
|||
|
|||
import android.os.Bundle; |
|||
import android.support.v7.widget.Toolbar; |
|||
|
|||
import gr.thmmy.mthmmy.R; |
|||
import gr.thmmy.mthmmy.activities.base.BaseActivity; |
|||
import me.zhanghai.android.materialprogressbar.MaterialProgressBar; |
|||
|
|||
public class BoardActivity extends BaseActivity { |
|||
/** |
|||
* Debug Tag for logging debug output to LogCat |
|||
*/ |
|||
private static final String TAG = "BoardActivity"; |
|||
/** |
|||
* The key to use when putting board's url String to {@link BoardActivity}'s Bundle. |
|||
*/ |
|||
public static final String EXTRAS_BOARD_URL = "BOARD_URL"; |
|||
/** |
|||
* The key to use when putting board's title String to {@link BoardActivity}'s Bundle. |
|||
*/ |
|||
public static final String EXTRAS_BOARD_TITLE = "BOARD_TITLE"; |
|||
|
|||
private MaterialProgressBar progressBar; |
|||
private String boardTitle; |
|||
|
|||
@Override |
|||
protected void onCreate(Bundle savedInstanceState) { |
|||
super.onCreate(savedInstanceState); |
|||
setContentView(R.layout.activity_board); |
|||
|
|||
Bundle extras = getIntent().getExtras(); |
|||
boardTitle = extras.getString("BOARD_TITLE"); |
|||
|
|||
//Initializes graphics
|
|||
toolbar = (Toolbar) findViewById(R.id.toolbar); |
|||
toolbar.setTitle(boardTitle); |
|||
setSupportActionBar(toolbar); |
|||
if (getSupportActionBar() != null) { |
|||
getSupportActionBar().setDisplayHomeAsUpEnabled(true); |
|||
getSupportActionBar().setDisplayShowHomeEnabled(true); |
|||
} |
|||
|
|||
createDrawer(); |
|||
|
|||
progressBar = (MaterialProgressBar) findViewById(R.id.progressBar); |
|||
} |
|||
} |
@ -0,0 +1,40 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<android.support.design.widget.CoordinatorLayout |
|||
xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|||
xmlns:tools="http://schemas.android.com/tools" |
|||
android:id="@+id/main_content" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:fitsSystemWindows="true" |
|||
tools:context=".activities.board.BoardActivity"> |
|||
|
|||
<android.support.design.widget.AppBarLayout |
|||
android:id="@+id/appbar" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:paddingTop="@dimen/appbar_padding_top" |
|||
android:theme="@style/ToolbarTheme"> |
|||
|
|||
<android.support.v7.widget.Toolbar |
|||
android:id="@+id/toolbar" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="?attr/actionBarSize" |
|||
android:background="?attr/colorPrimary" |
|||
app:popupTheme="@style/ToolbarTheme"> |
|||
</android.support.v7.widget.Toolbar> |
|||
</android.support.design.widget.AppBarLayout> |
|||
|
|||
<me.zhanghai.android.materialprogressbar.MaterialProgressBar |
|||
android:id="@+id/progressBar" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
app:layout_anchor="@id/appbar" |
|||
app:layout_anchorGravity="bottom|center" |
|||
app:mpb_indeterminateTint="@color/accent" |
|||
android:visibility="invisible" |
|||
android:indeterminate="true" |
|||
app:mpb_progressStyle="horizontal" |
|||
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding" /> |
|||
|
|||
</android.support.design.widget.CoordinatorLayout> |
Loading…
Reference in new issue