[Solved] Activity has been stopped [duplicate]
The relative variable is null. Check if you got it via findViewById() This should solve the problem. solved Activity has been stopped [duplicate]
The relative variable is null. Check if you got it via findViewById() This should solve the problem. solved Activity has been stopped [duplicate]
this is not an error in fact. It is a warning telling that you are using one version of android support library (26.1.0), and your library is using another version (27.0.2) To solve this warning you should use version 27.0.2 too. But it might be not required. You may try building the app as it … Read more
FCM is the new version of GCM under the Firebase brand. Benefits. The new FCM SDK: 1.Simplifies client development. You no longer have to write your own registration or subscription retry logic. 2.Enables a new serverless notifications solution with a web console, Firebase Notifications. With Firebase Notifications, anyone can send notifications to target specific audiences … Read more
If you google it, you will find a lot of code and documentation regarding it. Please visit the link https://developers.google.com/maps/documentation/android/ you can start from here https://developers.google.com/maps/documentation/android/start you will find it very close to your requirement 1 solved Map behavior like in Google Maps application [closed]
I would suggest you to use MaterialLeanBack library. You will get a sample example in the code for understanding. Usage In your layout <com.github.florent37.materialleanback.MaterialLeanBack android:id=”@+id/materialLeanBack” android:layout_width=”match_parent” android:layout_height=”match_parent” app:mlb_background=”@color/background” app:mlb_lineSpacing=”30dp” app:mlb_paddingBottom=”30dp” app:mlb_paddingLeft=”30dp” app:mlb_paddingRight=”30dp” app:mlb_paddingTop=”40dp” app:mlb_titleColor=”@android:color/white” /> Requires compile ‘com.github.florent37:materialleanback:1.0.0@aar’ compile ‘com.android.support:cardview-v7:22.2.1’ compile ‘com.android.support:recyclerview-v7:22.2.1’ compile ‘com.nineoldandroids:library:2.4.0’ 0 solved Android – Blocks in XML
Change this <style name=”MyMaterialTheme” parent=”MyMaterialTheme.Base”> </style> <style name=”MyMaterialTheme.Base” parent=”Theme.AppCompat.Light.DarkActionBar”> <item name=”windowNoTitle”>true</item> <item name=”windowActionBar”>false</item> <item name=”colorPrimary”>@color/colorPrimary</item> <item name=”colorPrimaryDark”>@color/colorPrimaryDark</item> <item name=”colorAccent”>@color/colorAccent</item> </style> to this <style name=”MyMaterialTheme” parent=”Theme.AppCompat.Light.DarkActionBar”> <item name=”windowNoTitle”>true</item> <item name=”windowActionBar”>false</item> <item name=”colorPrimary”>@color/colorPrimary</item> <item name=”colorPrimaryDark”>@color/colorPrimaryDark</item> <item name=”colorAccent”>@color/colorAccent</item> </style> Full code : <resources> <style name=”MyMaterialTheme” parent=”Theme.AppCompat.Light.DarkActionBar”> <item name=”windowNoTitle”>true</item> <item name=”windowActionBar”>false</item> <item name=”colorPrimary”>@color/colorPrimary</item> <item name=”colorPrimaryDark”>@color/colorPrimaryDark</item> <item name=”colorAccent”>@color/colorAccent</item> </style> </resources> … Read more
Please move this final String Textusername = username.getText().toString(); final String Textpassword = password.getText().toString(); inside onClick(). 2 solved Android getText from EditText return NULL
very vague question, and you may want to try a simple Google search next time. Check this out though, may be what you’re looking for:http://www.androidviews.net/2012/12/cardsui/ 2 solved how to implement a card UI like chrome on Android? [closed]
I would suppose you received down votes as this is not really a question for stackoverflow. As commonsware stated, it is best practice to reach out to the developers and see if they are willing to divulge any info on what they used to develop their apps. As well there are multiple resources out there … Read more
Set View.GONE for View is not right way to remove row from ListView. to remove row remove select row item from Adapter data-source and call notify data change method of adapter to populate changes: close.setTag(position); close.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { int deletePos=Integer.parseInt(v.getTag().toString()); bpData.remove(deletePos); notifyDataSetChanged(); } }); 5 solved How to remove … Read more
You have to setOnTouchListener to the TextView. Here I give you an example: public class MainActivity extends Activity implements View.OnTouchListener { private TextView tv1; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); tv1 = (TextView) findViewById(R.id.tv1); tv1.setOnTouchListener(this); } @Override public boolean onTouch(View v, MotionEvent event) { // HERE YOU HAVE TO CHECK WHICH ID IS … Read more
<LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”match_parent” android:layout_height=”match_parent” android:orientation=”vertical”> <android.support.v7.widget.RecyclerView android:id=”@+id/recycler_one” android:layout_width=”match_parent” android:layout_height=”0dp” android:layout_weight=”0.5″ /> <android.support.v7.widget.RecyclerView android:id=”@+id/recycler_two” android:layout_width=”match_parent” android:layout_height=”0dp” android:layout_weight=”0.5″ /> </LinearLayout> And in your Java code create two different instances of the same adapter and set that adapter to both recycler views.Since you have same view and different data you can use same adapter for both recycler view.Hope … Read more
You are getting an OutOfMemory exception when your activity gets recreated after orientation change. I could guess in your FrameActivity you are leaking bitmaps on every activity creation not allowing the GC to free up enough memory. 2 solved Android App get Stopped When Changing the orientation
To make a app support multiple screen device, you can use put layout here res/layout/my_layout.xml // layout for normal screen size (“default”) res/layout-small/my_layout.xml // layout for small screen size res/layout-large/my_layout.xml // layout for large screen size res/layout-xlarge/my_layout.xml // layout for extra large screen size and you can set each layout accordingly to device size by … Read more
put this in the XML <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” android:background=”@color/home_background_color” android:layout_width=”match_parent” android:layout_height=”match_parent”> <android.support.design.widget.TabLayout android:id=”@+id/tabLayout” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:layout_alignParentBottom=”true” android:background=”@color/white” app:tabPadding=”10dp” android:minHeight=”100dp” app:tabGravity=”fill” app:tabIndicatorColor=”@color/app_primary_color” app:tabMode=”fixed” app:theme=”@style/ThemeOverlay.AppCompat.Dark.ActionBar” /> and this in the code try { tabLayout.addTab(tabLayout.newTab()); tabLayout.addTab(tabLayout.newTab()); tabLayout.addTab(tabLayout.newTab()); tabLayout.addTab(tabLayout.newTab()); tabLayout.getTabAt(0).setIcon(R.drawable.tab_icon1); tabLayout.getTabAt(1).setIcon(R.drawable.tab_icon2); tabLayout.getTabAt(2).setIcon(R.drawable.tab_icon3); tabLayout.getTabAt(3).setIcon(R.drawable.tab_icon4); } catch (Exception e) { Log.e(“TabLayout Creation Error”,e.getMessage()); } tabLayout.setOnTabSelectedListener(new TabLayout.OnTabSelectedListener() { @Override public void onTabSelected(TabLayout.Tab … Read more