android-styles

DatePicker having a background

此生再无相见时 提交于 2019-12-05 18:16:15
问题 the problem is that my date picker having an ugly White background behind the date picker i just want that background to Disappear this is My code public void selectDate(View view) { DialogFragment newFragment = new SelectDateFragment(); newFragment.show(Master_.fragmentManager, "DatePicker"); } public void populateSetDate(int year, int month, int day) { Birthdate.setText(year + "-" + month + "-" + day); } public class SelectDateFragment extends DialogFragment implements DatePickerDialog

Android ProgressBar styled like progress view in SwipeRefreshLayout

社会主义新天地 提交于 2019-12-05 17:12:33
问题 I use android.support.v4.widget.SwipeRefreshLayout in my Android app. It wraps a ListView . The content of the list view is downloaded from a server. A progress view is shown when user swipes down in order to reload data from server. The progress view looks like a piece of circle that grows and shrinks during the animation. It seems that the style of this progress view cannot be customized much. However, I am fine with its built-in style. I also show the same progress animation during initial

Android “?colorPrimary” vs “?attr/colorPrimary”?

泄露秘密 提交于 2019-12-05 14:40:12
I can't find any information about the differences between: android:textColor="?attr/colorPrimary" vs android:textColor="?colorPrimary" I have read that "?attr" means attribute value specified in the current theme, but without "attr" it gives the same result (=color defined in my theme). It behaves similar with other attributes? For example: Does android:background="?attr/selectableItemBackground" equals android:background="?selectableItemBackground" ? Here it's told that it differs. Thanks very much. Ok, I have finally found in the docs: Because the system resource tool knows that an

Different font for Some activities using Calligraphy Library

江枫思渺然 提交于 2019-12-05 12:41:31
问题 I am using Calligraphy Library for using custom font in my application. I set a custom font to my whole application by default font using CalligraphyConfig , in my Application class in the #onCreate() method and it is working fine. Problem comes when I need to change font of one activity (SettingsActivity). I tried using custom font in style however It didn't change the font of activity. Following is the code of Style <style name="EnglishActivitiesTheme" parent="AppTheme"> <item name="android

Rendering problems after updated gradle dependencies

匆匆过客 提交于 2019-12-05 09:51:08
I just updated build.gradle(Module: app) dependecies, and after that had rendering problems on Android Studio. What is wrong, before updating dependencies everythink worked correctly Here is how it is now: dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:design:23.0.0' compile 'com.android.support:appcompat-v7:23.0.0' compile 'com.google.android.gms:play-services:7.8.0' compile 'com.android.support:support-v4:23.0.0' compile 'com.android.support:recyclerview-v7:23.0.0' } my_activity.xml <?xml version="1.0" encoding="utf-8"?> <android.support.design

Prevent “Dialog” Activity from interacting with background activity when clicking outside bounds

无人久伴 提交于 2019-12-05 08:27:06
I'm creating an activity that looks like a dialog. Here is the style: <style name="TablesDialogActivity" parent="@android:style/Theme.Holo.Dialog"> <item name="android:windowBackground">@drawable/frame_background_left</item> </style> Here is the activity onCreate(): protected void onCreate(Bundle savedInstanceState) { getWindow().setFlags(LayoutParams.FLAG_NOT_TOUCH_MODAL, LayoutParams.FLAG_NOT_TOUCH_MODAL); getWindow().setFlags(LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH, LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH); super.onCreate(savedInstanceState); } And also inside the activity touch interceptor:

Scrollbar touch area in Android 6

廉价感情. 提交于 2019-12-05 04:55:20
I observe new behaviour in Android 6.0 Marshmallow. The touching area of scrollbar is widther than the scrollbar. It is visible on following screenshot. Scrollbar has 20 dp (green area) and touching area is probably 48 dp (blue and green area). I would like to have the touch area above the scrollbar only: I use following: <resources xmlns:android="http://schemas.android.com/apk/res/android"> <style name="MyTheme.Dark" parent="android:Theme.Black"> <item name="android:fastScrollStyle">@style/Widget.FastScroll</item> <item name="android:scrollbarThumbVertical">@drawable/dark_scrollbar_thumb<

Change holo spinner text colour

谁说我不能喝 提交于 2019-12-05 04:10:05
I have a spinner in a Holo theme dialog and am trying to change the text colour because it is very hard to read: I have looked at android styles.xml, as well as many other answers, and believe that I am setting the custom style correctly; but it's just not getting picked up. This is an extract from the dialog layout file where the spinner lives: <Spinner android:id="@+id/spn_Type" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:entries="@array/dose_type_options" style="@style/DialogSpinner" /> And these are the relevant entries in

TextView styles ArrayIndexOutOfBoundsException

别来无恙 提交于 2019-12-05 02:55:49
问题 I have a recurrent crash comming in my admin console from the PlayStore. I can't see why it's crashing. I've never reproduce this crash, it's seems to be comming only from Samsung Galaxy device (not so sure though). From sdk version 4.1 & 4.2 & 4.3 Here is the full StackTrace : android.view.InflateException: Binary XML file line #31: Error inflating class <unknown> at android.view.LayoutInflater.createView(LayoutInflater.java:613) at com.android.internal.policy.impl.PhoneLayoutInflater

Custom SearchView whole clickable in android

[亡魂溺海] 提交于 2019-12-04 22:41:00
I have a SearchView widget in my app, and I want to ask some questions about making it custom. First of all, you can start search only by clicking on search icon, is there any way to make whole SearchView clickable? Also, is there a way to make SearchView appear something like this when it is clicked? It is now in this state: Here is my code: citySearch = (SearchView) findViewById(R.id.city_search_bar); citySearch.setBackgroundResource(R.drawable.search_background); citySearch.setOnSearchClickListener(new OnClickListener() { @Override public void onClick(View arg0) { citySearch