Commit 5583e4fc authored by Varun Patil's avatar Varun Patil

Merge branch 'master' into generifyadapters

parents fa3b6d1b 76c88c8b
...@@ -8,11 +8,13 @@ import android.support.v4.app.Fragment; ...@@ -8,11 +8,13 @@ import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentTransaction; import android.support.v4.app.FragmentTransaction;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.Toast;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.squareup.picasso.Callback; import com.squareup.picasso.Callback;
import com.squareup.picasso.Picasso; import com.squareup.picasso.Picasso;
import app.insti.activity.MainActivity;
import app.insti.api.RetrofitInterface; import app.insti.api.RetrofitInterface;
import app.insti.api.model.Body; import app.insti.api.model.Body;
import app.insti.api.model.Event; import app.insti.api.model.Event;
...@@ -26,6 +28,7 @@ public final class Utils { ...@@ -26,6 +28,7 @@ public final class Utils {
private static String sessionId; private static String sessionId;
private static RetrofitInterface retrofitInterface; private static RetrofitInterface retrofitInterface;
public static Gson gson; public static Gson gson;
public static boolean darkTheme = false;
public static final void loadImageWithPlaceholder(final ImageView imageView, final String url) { public static final void loadImageWithPlaceholder(final ImageView imageView, final String url) {
Picasso.get() Picasso.get()
...@@ -119,4 +122,17 @@ public final class Utils { ...@@ -119,4 +122,17 @@ public final class Utils {
public static void makeGson() { public static void makeGson() {
Utils.gson = new Gson(); Utils.gson = new Gson();
} }
public static void changeTheme(FragmentActivity context) {
if (darkTheme) {
context.setTheme(R.style.AppTheme);
} else {
Toast.makeText(context, "You have unlocked super max pro mode", Toast.LENGTH_SHORT).show();
context.setTheme(R.style.AppThemeDark);
}
darkTheme = !darkTheme;
Intent intent = new Intent(context, MainActivity.class);
context.startActivity(intent);
context.finish();
}
} }
package app.insti.activity; package app.insti.activity;
import android.annotation.SuppressLint;
import android.annotation.TargetApi; import android.annotation.TargetApi;
import android.app.Activity; import android.app.Activity;
import android.app.NotificationChannel; import android.app.NotificationChannel;
...@@ -24,8 +25,10 @@ import android.support.v7.app.ActionBarDrawerToggle; ...@@ -24,8 +25,10 @@ import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar;
import android.util.Log; import android.util.Log;
import android.view.GestureDetector;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
import android.widget.ImageView; import android.widget.ImageView;
...@@ -95,7 +98,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -95,7 +98,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
private RetrofitInterface retrofitInterface; private RetrofitInterface retrofitInterface;
private List<Notification> notifications = null; private List<Notification> notifications = null;
/** which menu item should be checked on activity start */ /**
* which menu item should be checked on activity start
*/
private int initMenuChecked = R.id.nav_feed; private int initMenuChecked = R.id.nav_feed;
public static void hideKeyboard(Activity activity) { public static void hideKeyboard(Activity activity) {
...@@ -109,8 +114,12 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -109,8 +114,12 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
imm.hideSoftInputFromWindow(view.getWindowToken(), 0); imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
} }
@SuppressLint("ClickableViewAccessibility")
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
if (Utils.darkTheme) {
setTheme(R.style.AppThemeDark_NoActionBar);
}
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
ServiceGenerator serviceGenerator = new ServiceGenerator(getApplicationContext()); ServiceGenerator serviceGenerator = new ServiceGenerator(getApplicationContext());
...@@ -152,10 +161,29 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -152,10 +161,29 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
} }
} }
toolbar.setOnTouchListener(new View.OnTouchListener() {
private GestureDetector gestureDetector = new GestureDetector(MainActivity.this, new GestureDetector.SimpleOnGestureListener() {
@Override
public boolean onDoubleTap(MotionEvent e) {
Toast.makeText(MainActivity.this, "You have unlocked super max pro mode", Toast.LENGTH_SHORT).show();
Utils.changeTheme(MainActivity.this);
return super.onDoubleTap(e);
}
});
@Override
public boolean onTouch(View v, MotionEvent event) {
gestureDetector.onTouchEvent(event);
return true;
}
});
checkLatestVersion(); checkLatestVersion();
} }
/** Get the notifications from memory cache or network */ /**
* Get the notifications from memory cache or network
*/
private void fetchNotifications() { private void fetchNotifications() {
// Try memory cache // Try memory cache
if (notifications != null) { if (notifications != null) {
...@@ -176,7 +204,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -176,7 +204,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
}); });
} }
/** Show the right notification icon */ /**
* Show the right notification icon
*/
private void showNotifications() { private void showNotifications() {
if (notifications != null && !notifications.isEmpty()) { if (notifications != null && !notifications.isEmpty()) {
menu.findItem(R.id.action_notifications).setIcon(R.drawable.baseline_notifications_active_white_24); menu.findItem(R.id.action_notifications).setIcon(R.drawable.baseline_notifications_active_white_24);
...@@ -185,7 +215,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -185,7 +215,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
} }
} }
/** Get version code we are currently on */ /**
* Get version code we are currently on
*/
private int getCurrentVersion() { private int getCurrentVersion() {
try { try {
PackageInfo pInfo = this.getPackageManager().getPackageInfo(getPackageName(), 0); PackageInfo pInfo = this.getPackageManager().getPackageInfo(getPackageName(), 0);
...@@ -195,10 +227,14 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -195,10 +227,14 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
} }
} }
/** Check for updates in andro.json */ /**
* Check for updates in andro.json
*/
private void checkLatestVersion() { private void checkLatestVersion() {
final int versionCode = getCurrentVersion(); final int versionCode = getCurrentVersion();
if (versionCode == 0) { return; } if (versionCode == 0) {
return;
}
RetrofitInterface retrofitInterface = Utils.getRetrofitInterface(); RetrofitInterface retrofitInterface = Utils.getRetrofitInterface();
retrofitInterface.getLatestVersion().enqueue(new EmptyCallback<JsonObject>() { retrofitInterface.getLatestVersion().enqueue(new EmptyCallback<JsonObject>() {
@Override @Override
...@@ -260,7 +296,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -260,7 +296,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
mNotificationManager.createNotificationChannel(mChannel); mNotificationManager.createNotificationChannel(mChannel);
} }
/** Handle opening event/body/blog from FCM notification */ /**
* Handle opening event/body/blog from FCM notification
*/
private void handleFCMIntent(Bundle bundle) { private void handleFCMIntent(Bundle bundle) {
/* Mark the notification read */ /* Mark the notification read */
final String notificationId = bundle.getString(FCM_BUNDLE_NOTIFICATION_ID); final String notificationId = bundle.getString(FCM_BUNDLE_NOTIFICATION_ID);
...@@ -276,7 +314,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -276,7 +314,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
); );
} }
/** Handle intents for links */ /**
* Handle intents for links
*/
private void handleIntent(Intent appLinkIntent) { private void handleIntent(Intent appLinkIntent) {
String appLinkAction = appLinkIntent.getAction(); String appLinkAction = appLinkIntent.getAction();
String appLinkData = appLinkIntent.getDataString(); String appLinkData = appLinkIntent.getDataString();
...@@ -285,9 +325,13 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -285,9 +325,13 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
} }
} }
/** Open the proper fragment from given type and id */ /**
* Open the proper fragment from given type and id
*/
private void chooseIntent(String type, String id) { private void chooseIntent(String type, String id) {
if (type == null || id == null) { return; } if (type == null || id == null) {
return;
}
switch (type) { switch (type) {
case DATA_TYPE_BODY: case DATA_TYPE_BODY:
openBodyFragment(id); openBodyFragment(id);
...@@ -306,7 +350,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -306,7 +350,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
Log.e("NOTIFICATIONS", "Server sent invalid notification?"); Log.e("NOTIFICATIONS", "Server sent invalid notification?");
} }
/** Open the proper fragment from given type, id and extra */ /**
* Open the proper fragment from given type, id and extra
*/
private void chooseIntent(String type, String id, String extra) { private void chooseIntent(String type, String id, String extra) {
if (extra == null) { if (extra == null) {
chooseIntent(type, id); chooseIntent(type, id);
...@@ -326,18 +372,24 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -326,18 +372,24 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
} }
} }
/** Open user fragment from given id */ /**
* Open user fragment from given id
*/
private void openUserFragment(String id) { private void openUserFragment(String id) {
UserFragment userFragment = UserFragment.newInstance(id); UserFragment userFragment = UserFragment.newInstance(id);
updateFragment(userFragment); updateFragment(userFragment);
} }
/** Open the body fragment from given id */ /**
* Open the body fragment from given id
*/
private void openBodyFragment(String id) { private void openBodyFragment(String id) {
Utils.openBodyFragment(new Body(id), this); Utils.openBodyFragment(new Body(id), this);
} }
/** Open the event fragment from the provided id */ /**
* Open the event fragment from the provided id
*/
private void openEventFragment(String id) { private void openEventFragment(String id) {
RetrofitInterface retrofitInterface = Utils.getRetrofitInterface(); RetrofitInterface retrofitInterface = Utils.getRetrofitInterface();
final FragmentActivity self = this; final FragmentActivity self = this;
...@@ -548,7 +600,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -548,7 +600,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
return true; return true;
} }
/** Open placement blog fragment */ /**
* Open placement blog fragment
*/
private void openPlacementBlog() { private void openPlacementBlog() {
if (session.isLoggedIn()) { if (session.isLoggedIn()) {
PlacementBlogFragment placementBlogFragment = new PlacementBlogFragment(); PlacementBlogFragment placementBlogFragment = new PlacementBlogFragment();
...@@ -567,7 +621,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -567,7 +621,9 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
} }
} }
/** Change the active fragment to the supplied one */ /**
* Change the active fragment to the supplied one
*/
public void updateFragment(Fragment fragment) { public void updateFragment(Fragment fragment) {
Log.d(TAG, "updateFragment: " + fragment.toString()); Log.d(TAG, "updateFragment: " + fragment.toString());
Bundle bundle = fragment.getArguments(); Bundle bundle = fragment.getArguments();
...@@ -579,7 +635,7 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -579,7 +635,7 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
bundle.putString(Constants.USER_HOSTEL, session.isLoggedIn() && currentUser.getHostel() != null ? currentUser.getHostel() : "1"); bundle.putString(Constants.USER_HOSTEL, session.isLoggedIn() && currentUser.getHostel() != null ? currentUser.getHostel() : "1");
if (fragment instanceof SettingsFragment && session.isLoggedIn()) if (fragment instanceof SettingsFragment && session.isLoggedIn())
bundle.putString(Constants.USER_ID, currentUser.getUserID()); bundle.putString(Constants.USER_ID, currentUser.getUserID());
if (fragment instanceof ComplaintsFragment && session.isLoggedIn()){ if (fragment instanceof ComplaintsFragment && session.isLoggedIn()) {
bundle.putString(Constants.USER_ID, currentUser.getUserID()); bundle.putString(Constants.USER_ID, currentUser.getUserID());
bundle.putString(Constants.CURRENT_USER_PROFILE_PICTURE, currentUser.getUserProfilePictureUrl()); bundle.putString(Constants.CURRENT_USER_PROFILE_PICTURE, currentUser.getUserProfilePictureUrl());
} }
......
...@@ -24,5 +24,5 @@ ...@@ -24,5 +24,5 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:textColor="?attr/themeColorInverse" android:textColor="?attr/themeColorInverse"
android:textColorLink="@color/colorPrimary" /> android:textColorLink="?attr/urlColor" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -638,7 +638,7 @@ ...@@ -638,7 +638,7 @@
android:gravity="center" android:gravity="center"
android:linksClickable="true" android:linksClickable="true"
android:text="@string/django_api" android:text="@string/django_api"
android:textColorLink="@color/colorPrimaryDark" android:textColorLink="?attr/urlColor"
android:textStyle="bold" /> android:textStyle="bold" />
<TextView <TextView
...@@ -652,7 +652,7 @@ ...@@ -652,7 +652,7 @@
android:gravity="center" android:gravity="center"
android:linksClickable="true" android:linksClickable="true"
android:text="@string/android_app" android:text="@string/android_app"
android:textColorLink="@color/colorPrimaryDark" android:textColorLink="?attr/urlColor"
android:textStyle="bold" /> android:textStyle="bold" />
<TextView <TextView
...@@ -666,7 +666,7 @@ ...@@ -666,7 +666,7 @@
android:gravity="center" android:gravity="center"
android:linksClickable="true" android:linksClickable="true"
android:text="@string/angular_pwa" android:text="@string/angular_pwa"
android:textColorLink="@color/colorPrimaryDark" android:textColorLink="?attr/urlColor"
android:textStyle="bold" /> android:textStyle="bold" />
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="10" android:layout_weight="10"
android:text="Org Title" android:text="Org Title"
android:textColor="#fff" android:textColor="@color/colorWhite"
android:textSize="21sp" android:textSize="21sp"
android:textStyle="bold" /> android:textStyle="bold" />
...@@ -137,8 +137,8 @@ ...@@ -137,8 +137,8 @@
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:textColor="#333" android:textColor="?attr/themeColorInverse"
android:textColorLink="@color/colorPrimary" android:textColorLink="?attr/urlColor"
android:textSize="16sp" /> android:textSize="16sp" />
<TextView <TextView
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="10" android:layout_weight="10"
android:text="Event Title" android:text="Event Title"
android:textColor="?attr/themeColor" android:textColor="@color/colorWhite"
android:textSize="21sp" android:textSize="21sp"
android:textStyle="bold" /> android:textStyle="bold" />
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:background="?attr/selectableItemBackgroundBorderless" android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="Event Website" android:contentDescription="Event Website"
android:tint="?attr/themeColor" android:tint="@color/colorWhite"
android:visibility="invisible" android:visibility="invisible"
app:srcCompat="@drawable/ic_language_black_24dp" /> app:srcCompat="@drawable/ic_language_black_24dp" />
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:background="?attr/selectableItemBackgroundBorderless" android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="Navigate" android:contentDescription="Navigate"
android:tint="?attr/themeColor" android:tint="@color/colorWhite"
app:srcCompat="@drawable/baseline_navigation_24" /> app:srcCompat="@drawable/baseline_navigation_24" />
<ImageButton <ImageButton
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
android:background="?attr/selectableItemBackgroundBorderless" android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="Share Event" android:contentDescription="Share Event"
android:src="@drawable/ic_menu_share" android:src="@drawable/ic_menu_share"
android:tint="?attr/themeColor" /> android:tint="@color/colorWhite" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
...@@ -110,14 +110,14 @@ ...@@ -110,14 +110,14 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="No Date Specified" android:text="No Date Specified"
android:textColor="?attr/themeColor" android:textColor="@color/colorWhite"
android:textSize="16sp" /> android:textSize="16sp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text=" | " android:text=" | "
android:textColor="?attr/themeColor" android:textColor="@color/colorWhite"
android:textSize="20sp" /> android:textSize="20sp" />
<TextView <TextView
...@@ -125,14 +125,14 @@ ...@@ -125,14 +125,14 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="No Time Specified" android:text="No Time Specified"
android:textColor="?attr/themeColor" android:textColor="@color/colorWhite"
android:textSize="16sp" /> android:textSize="16sp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text=" | " android:text=" | "
android:textColor="?attr/themeColor" android:textColor="@color/colorWhite"
android:textSize="20sp" /> android:textSize="20sp" />
<TextView <TextView
...@@ -140,8 +140,8 @@ ...@@ -140,8 +140,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end" android:ellipsize="end"
android:text="No Venue Specified" android:text="Venue"
android:textColor="?attr/themeColor" android:textColor="@color/colorWhite"
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </LinearLayout>
...@@ -190,6 +190,12 @@ ...@@ -190,6 +190,12 @@
</LinearLayout> </LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#aaa">
</View>
<TextView <TextView
android:id="@+id/event_page_description" android:id="@+id/event_page_description"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -199,7 +205,7 @@ ...@@ -199,7 +205,7 @@
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:textColor="?attr/themeColorInverse" android:textColor="?attr/themeColorInverse"
android:textColorLink="@color/colorPrimary" android:textColorLink="?attr/urlColor"
android:textSize="16sp" /> android:textSize="16sp" />
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:text="Breakfast" android:text="Breakfast"
android:textColor="@color/colorPrimaryDark" android:textColor="?attr/urlColor"
android:textSize="16sp" /> android:textSize="16sp" />
<TextView <TextView
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:text="Lunch" android:text="Lunch"
android:textColor="@color/colorPrimaryDark" android:textColor="?attr/urlColor"
android:textSize="16sp" /> android:textSize="16sp" />
<TextView <TextView
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:text="Tiffin" android:text="Tiffin"
android:textColor="@color/colorPrimaryDark" android:textColor="?attr/urlColor"
android:textSize="16sp" /> android:textSize="16sp" />
<TextView <TextView
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:text="Dinner" android:text="Dinner"
android:textColor="@color/colorPrimaryDark" android:textColor="?attr/urlColor"
android:textSize="16sp" /> android:textSize="16sp" />
<TextView <TextView
......
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="16dp" android:padding="16dp"
android:layout_margin="8dp" android:layout_margin="8dp"
android:background="#F2F2F2" android:background="?attr/newsColor"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/article_title" android:id="@+id/article_title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="#000000" android:textColor="?attr/themeColorInverse"
android:textSize="20sp" android:textSize="20sp"
android:textStyle="bold" /> android:textStyle="bold" />
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:fontFamily="sans-serif-light" android:fontFamily="sans-serif-light"
android:textColor="#000000" android:textColor="?attr/themeColorInverse"
android:textSize="17sp" /> android:textSize="17sp" />
<TextView <TextView
...@@ -48,6 +48,6 @@ ...@@ -48,6 +48,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:textColor="#000000" android:textColor="?attr/themeColorInverse"
android:textColorLink="@color/colorPrimary" /> android:textColorLink="?attr/urlColor" />
</LinearLayout> </LinearLayout>
...@@ -39,5 +39,7 @@ limitations under the License. ...@@ -39,5 +39,7 @@ limitations under the License.
<attr name="themeColor" format="reference|color" /> <attr name="themeColor" format="reference|color" />
<attr name="themeColorInverse" format="reference|color" /> <attr name="themeColorInverse" format="reference|color" />
<attr name="newsColor" format="reference|color" />
<attr name="urlColor" format="reference|color" />
</resources> </resources>
\ No newline at end of file
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
<item name="themeColor">#FFFFFF</item> <item name="themeColor">#FFFFFF</item>
<item name="themeColorInverse">#000000</item> <item name="themeColorInverse">#000000</item>
<item name="android:windowAnimationStyle">@style/WindowAnimationTransition</item>
</style> </style>
<style name="AppTheme.NoActionBar"> <style name="AppTheme.NoActionBar">
...@@ -21,6 +22,7 @@ ...@@ -21,6 +22,7 @@
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
<item name="themeColor">#000000</item> <item name="themeColor">#000000</item>
<item name="themeColorInverse">#FFFFFF</item> <item name="themeColorInverse">#FFFFFF</item>
<item name="android:windowAnimationStyle">@style/WindowAnimationTransition</item>
</style> </style>
<style name="AppThemeDark.NoActionBar"> <style name="AppThemeDark.NoActionBar">
...@@ -68,4 +70,9 @@ ...@@ -68,4 +70,9 @@
<item name="android:textColor">#999</item> <item name="android:textColor">#999</item>
<item name="android:textSize">12sp</item> <item name="android:textSize">12sp</item>
</style> </style>
<style name="WindowAnimationTransition">
<item name="android:windowEnterAnimation">@android:anim/fade_in</item>
<item name="android:windowExitAnimation">@android:anim/fade_out</item>
</style>
</resources> </resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment