android-layout

switching to Theme.MaterialComponents from Theme.AppCompat shows white blank labels & buttons

非 Y 不嫁゛ 提交于 2020-05-23 21:10:33
问题 I was using Material design 1.1.0 . For tabs with viewpager2 I updated it to '1.2.0-alpha05' Material library version it was working fine for single module but was crashing for another module where I've developed my custom material designed TextInputLayout. I changed theme from 'Theme.AppCompat.Light.NoActionBar' to Theme.MaterialComponents.Light.NoActionBar and crash fixed. After fixing crash and upgrading theme it is showing me white floating label , buttons , indiators etc anyone please

switching to Theme.MaterialComponents from Theme.AppCompat shows white blank labels & buttons

…衆ロ難τιáo~ 提交于 2020-05-23 21:09:08
问题 I was using Material design 1.1.0 . For tabs with viewpager2 I updated it to '1.2.0-alpha05' Material library version it was working fine for single module but was crashing for another module where I've developed my custom material designed TextInputLayout. I changed theme from 'Theme.AppCompat.Light.NoActionBar' to Theme.MaterialComponents.Light.NoActionBar and crash fixed. After fixing crash and upgrading theme it is showing me white floating label , buttons , indiators etc anyone please

Why in Android studio i can not find most of Attributes to add for views in XML layout like padding,textSize and etc

江枫思渺然 提交于 2020-05-17 06:46:25
问题 Before when in XML layout I was typing {t} android studio brings some suggestion and by chose which one I want it completed automatically and still in the old project Suggestion and Auto Complete is working like below image But in new project when i want to add Vertical orientation at most it suggest orientation and i should write vertical completely by myself and for example to define "textSize" i should write completely by my self and android doesn't suggest also for adding new View i

Android Fragment display a loading while rendering layout

守給你的承諾、 提交于 2020-05-17 05:49:25
问题 Let's say I've got an Activity with only a FrameLayout ( I've also try with the new FragmentContainerView ) so I will be loading Fragments on it. Let's assume I've got two Fragments: fragA and fragB , I will first load fragA and with a button, present in that fragment, replace it with fragB . I've define a function on my Activity so I can load a new Fragment on the container: public void loadFragment(Fragment fragment) { FragmentTransaction fragTrans = getSupportFragmentManager()

Two way binding cannot resolve a setter

℡╲_俬逩灬. 提交于 2020-05-15 11:13:47
问题 I am trying to learn about data binding I have my CreditCardViewModel class which is bind in my fragment as follows public class CreditCardValidatorFragment extends Fragment { private CreditCardViewModel cardViewModel; private CcValidateFragmentBinding binding; @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { binding = DataBindingUtil.inflate(inflater, R.layout.cc_validate_fragment, container,

Two way binding cannot resolve a setter

独自空忆成欢 提交于 2020-05-15 11:10:56
问题 I am trying to learn about data binding I have my CreditCardViewModel class which is bind in my fragment as follows public class CreditCardValidatorFragment extends Fragment { private CreditCardViewModel cardViewModel; private CcValidateFragmentBinding binding; @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { binding = DataBindingUtil.inflate(inflater, R.layout.cc_validate_fragment, container,

ImageView rejecting rounded corners and borders of parent

戏子无情 提交于 2020-05-15 08:11:37
问题 I have a View with multiple children I would like to give the entire group rounded corners like this: I am attempting do do this by giving both the parent LinearLayout and its ImageView Rounded corners via their backgrounds LinearLayout and children: <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="20dp" android:layout_marginTop="20dp" android:layout_marginRight="20dp" android:background="@drawable/tile_background" android

Get an EditText's 'default' color value from theme

孤街醉人 提交于 2020-05-14 17:44:28
问题 I have an Activity that contains an EditText on 3.1. Based on user input, I change the color of the text in the EditText (red for an error), and then reset it to black when the text is OK. One issue relates to changing the overall theme of the Activity. For instance, changing it to the regular dark theme from the light theme results in the black text being shown against a black background - so I need to go in and change the code, instead resetting the text to white when the data is OK.

Motion Layout with swipe gesture + SwipeRefreshLayout + RecyclerView bug wrong behavior scrolling up

别等时光非礼了梦想. 提交于 2020-05-14 10:08:09
问题 I'm using MotionLayout to build UI with 2 parts - top one with some view and bottom one with SwipeRefresh and RecyclerView inside. Also I have a single gesture for MotionLayout - SwipeRefresh moves up above top view on swipe up. The problem is when I scroll RecyclerView to the bottom (top view "collapses") and then to the top - MotionLayout starts to reverse my transition at once ("expand") - when RecyclerView is not fully scrolled to the top instead of scrolling RecyclerView first. While my

Motion Layout with swipe gesture + SwipeRefreshLayout + RecyclerView bug wrong behavior scrolling up

纵然是瞬间 提交于 2020-05-14 10:06:53
问题 I'm using MotionLayout to build UI with 2 parts - top one with some view and bottom one with SwipeRefresh and RecyclerView inside. Also I have a single gesture for MotionLayout - SwipeRefresh moves up above top view on swipe up. The problem is when I scroll RecyclerView to the bottom (top view "collapses") and then to the top - MotionLayout starts to reverse my transition at once ("expand") - when RecyclerView is not fully scrolled to the top instead of scrolling RecyclerView first. While my