|
28 | 28 | import android.os.Build; |
29 | 29 | import android.os.Bundle; |
30 | 30 | import android.os.Handler; |
| 31 | +import android.support.design.widget.CollapsingToolbarLayout; |
31 | 32 | import android.support.annotation.NonNull; |
32 | 33 | import android.support.v4.app.FragmentTransaction; |
33 | 34 | import android.support.v4.content.LocalBroadcastManager; |
34 | 35 | import android.support.v7.app.ActionBarActivity; |
| 36 | +import android.support.v7.app.AppCompatActivity; |
35 | 37 | import android.util.Log; |
36 | 38 | import android.view.*; |
37 | 39 | import android.widget.EditText; |
|
49 | 51 | import java.util.List; |
50 | 52 |
|
51 | 53 | @SuppressLint("Registered") |
52 | | -public class BaseActivity extends ActionBarActivity { |
| 54 | +public class BaseActivity extends AppCompatActivity { |
53 | 55 |
|
54 | 56 | protected final int TRANSITION_VERTICAL = 0; |
55 | 57 | protected final int TRANSITION_HORIZONTAL = 1; |
56 | 58 |
|
57 | | - protected SharedPreferences prefs; |
| 59 | + public SharedPreferences prefs; |
58 | 60 |
|
59 | 61 | protected String navigation; |
60 | 62 | protected String navigationTmp; // used for widget navigation |
@@ -186,13 +188,19 @@ protected void setActionBarTitle(String title) { |
186 | 188 | int actionBarTitle = Resources.getSystem().getIdentifier("action_bar_title", "id", "android"); |
187 | 189 | android.widget.TextView actionBarTitleView = (android.widget.TextView) getWindow().findViewById(actionBarTitle); |
188 | 190 | Typeface font = Typeface.createFromAsset(getAssets(), "fonts/Roboto-Regular.ttf"); |
189 | | - if (actionBarTitleView != null) { |
190 | | - actionBarTitleView.setTypeface(font); |
191 | | - } |
| 191 | + //if (actionBarTitleView != null) { |
| 192 | + // actionBarTitleView.setTypeface(font); |
| 193 | + //} |
192 | 194 |
|
193 | | - if (getSupportActionBar() != null) { |
194 | | - getSupportActionBar().setTitle(title); |
195 | | - } |
| 195 | +// CollapsingToolbarLayout collapsingToolbar = |
| 196 | +// (CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar); |
| 197 | +// collapsingToolbar.setCollapsedTitleTypeface(font); |
| 198 | +// collapsingToolbar.setTitle("Title"); |
| 199 | + |
| 200 | + |
| 201 | + //if (getSupportActionBar() != null) { |
| 202 | + // getSupportActionBar().setTitle(title); |
| 203 | + //} |
196 | 204 | } |
197 | 205 |
|
198 | 206 |
|
|
0 commit comments