File tree Expand file tree Collapse file tree 3 files changed +7
-41
lines changed
java/de/mrapp/android/dialog/example Expand file tree Collapse file tree 3 files changed +7
-41
lines changed Original file line number Diff line number Diff line change 1818import android .app .FragmentTransaction ;
1919import android .os .Bundle ;
2020import android .support .v7 .app .AppCompatActivity ;
21- import android .support .v7 .widget .Toolbar ;
2221
2322/**
2423 * The main activity of the example app.
2726 */
2827public class MainActivity extends AppCompatActivity {
2928
30- /**
31- * Initializes the activity's toolbar.
32- */
33- private void initializeToolbar () {
34- Toolbar toolbar = (Toolbar ) findViewById (R .id .toolbar );
35- setSupportActionBar (toolbar );
36- }
37-
3829 /**
3930 * Shows the preference fragment, which contains the activity's content.
4031 */
@@ -49,7 +40,6 @@ private void showPreferenceFragment() {
4940 protected final void onCreate (final Bundle savedInstanceState ) {
5041 super .onCreate (savedInstanceState );
5142 setContentView (R .layout .activity_main );
52- initializeToolbar ();
5343 showPreferenceFragment ();
5444 }
5545
Original file line number Diff line number Diff line change @@ -14,24 +14,8 @@ General Public License for more details.
1414You should have received a copy of the GNU Lesser General Public License along with this program. If
1515not, see <http://www.gnu.org/licenses/>.
1616-->
17- <LinearLayout xmlns : android =" http://schemas.android.com/apk/res/android"
18- xmlns : app =" http://schemas.android.com/apk/res-auto"
19- android : layout_width =" match_parent"
20- android : layout_height =" match_parent"
21- android : orientation =" vertical" >
22-
23- <android .support.v7.widget.Toolbar
24- android : id =" @+id/toolbar"
25- android : layout_width =" match_parent"
26- android : layout_height =" ?android:attr/actionBarSize"
27- android : background =" ?attr/colorPrimary"
28- app : popupTheme =" @style/ToolbarPopupTheme"
29- app : theme =" @style/ToolbarTheme" />
30-
31- <RelativeLayout
32- android : id =" @+id/fragment"
33- android : layout_width =" match_parent"
34- android : layout_height =" 0dp"
35- android : layout_weight =" 1" />
36-
37- </LinearLayout >
17+ <RelativeLayout
18+ android : id =" @+id/fragment"
19+ xmlns : android =" http://schemas.android.com/apk/res/android"
20+ android : layout_width =" match_parent"
21+ android : layout_height =" match_parent" />
Original file line number Diff line number Diff line change @@ -16,18 +16,10 @@ not, see <http://www.gnu.org/licenses/>.
1616-->
1717<resources >
1818
19- <style name =" AppTheme" parent =" @style/Theme.AppCompat.Light.NoActionBar " >
19+ <style name =" AppTheme" parent =" @style/Theme.AppCompat.Light.DarkActionBar " >
2020 <item name =" colorPrimary" >#ffd64937</item >
21- <item name =" colorPrimaryDark" >#ffd64937 </item >
21+ <item name =" colorPrimaryDark" >#ffbb4030 </item >
2222 <item name =" colorAccent" >#ffd64937</item >
2323 </style >
2424
25- <style name =" ToolbarTheme" parent =" @style/Theme.AppCompat.Light.NoActionBar" >
26- <item name =" colorPrimary" >#ffd64937</item >
27- <item name =" android:textColorPrimary" >@color/abc_primary_text_material_dark</item >
28- <item name =" android:textColorSecondary" >@color/abc_secondary_text_material_dark</item >
29- </style >
30-
31- <style name =" ToolbarPopupTheme" parent =" @style/Theme.AppCompat.Light.NoActionBar" />
32-
3325</resources >
You can’t perform that action at this time.
0 commit comments