Skip to content

Commit

Permalink
fixed the compatible with 5.0+
Browse files Browse the repository at this point in the history
  • Loading branch information
blensmile committed Apr 2, 2016
1 parent a0dd2d0 commit 0bb5414
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
android:theme="@style/MyAppTheme.NoActionBar">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.blenmaterial.Adapters;

import android.content.Context;
import android.graphics.Color;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.ViewGroup;
Expand Down Expand Up @@ -29,6 +30,7 @@ public SimpleRcContactsAdapter(Context context, ArrayList<String> list) {
@Override
public Holder onCreateViewHolder(ViewGroup parent, int viewType) {
TextView view = (TextView) LayoutInflater.from(parent.getContext()).inflate(R.layout.list_item,parent,false);
view.setTextColor(Color.BLACK);
return new Holder(view);
}

Expand Down
8 changes: 5 additions & 3 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"

>
<!--android:fitsSystemWindows="true"-->
<!--tools:context="com.blenlearn.MainActivity"-->

<android.support.design.widget.AppBarLayout
Expand All @@ -23,6 +24,7 @@
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">


<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
Expand All @@ -40,10 +42,10 @@
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="30dp"
android:background="#03BCD4"
android:background="#e3d733"
app:layout_scrollFlags="scroll|enterAlways"
app:tabIndicatorHeight="0dp"
app:tabSelectedTextColor="#ffff0000"
app:tabSelectedTextColor="#ff0000"
/>

</android.support.design.widget.AppBarLayout>
Expand Down
9 changes: 6 additions & 3 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@
<item name="colorAccent">@color/colorAccent</item>
</style>

<style name="AppTheme.NoActionBar">
<!--parent="Theme.AppCompat.Light.NoActionBar"-->
<style name="MyAppTheme.NoActionBar" parent="AppTheme">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>

<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
<!--<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar">-->
<!--</style>-->

<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>
<!--<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light">-->
<!--</style>-->

</resources>

0 comments on commit 0bb5414

Please sign in to comment.