[Solved] When i tried to add the library it gives an error of versions .. help me to solve it please [closed]

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

[Solved] Map behavior like in Google Maps application [closed]

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]

[Solved] Unable to pass data between fragments…..TextView throws NullPoint Exception

You should call text=(TextView)view.findViewById(R.id.tt); onCreateView(), or in the method that is called from onCreateView() before doing anything with it. If text hasn’t been assigned to UI element, TextView throws NullPoint Exception. If you really want that assigning in another method, write a method like private void initUI() 5 solved Unable to pass data between fragments…..TextView … Read more

[Solved] How to convert textview as link in android?

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

[Solved] How add two recyclerview same fragmnets

<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

[Solved] Android fragment null pointer exception on rootView [closed]

Would you mind moving Intent checkTTSIntent = new Intent(); checkTTSIntent.setAction(TextToSpeech.Engine.ACTION_CHECK_TTS_DATA); startActivityForResult(checkTTSIntent, MY_DATA_CHECK_CODE); To the onViewCreated methode? And where is the part where you setOnInitListener to the fragment implementation? 7 solved Android fragment null pointer exception on rootView [closed]

[Solved] How to use shared preference to send data from activity to fragment?

If you insist on shared preference use this code : To save the data private void saveSp(String key , String value){ PreferenceManager.getDefaultSharedPreferences(Context) .edit() .putString(key, value).apply(); } To get your data: PreferenceManager.getDefaultSharedPreferences(Context).getString(“string”, “default”) solved How to use shared preference to send data from activity to fragment?

[Solved] Create Toast by a static method

Use this: public static void showToast(Context context, String text) { Toast.makeText(context, text, Toast.LENGTH_LONG).show(); } now for calling this method you should call like this: ClassName.showToast(context,”text”); Here classname is class that containing static method. 0 solved Create Toast by a static method

[Solved] setAdapter View Pager in a fragment

Convert mPager.setAdapter(new MyAdapter(Beranda.this, XMENArray)); to mPager.setAdapter(new MyAdapter(getActivity(), XMENArray)); See, the problem is that your class extends Fragment and you can not pass fragment class instance to the context. So you have to pass context of Activity in which you are using this fragment. 1 solved setAdapter View Pager in a fragment

[Solved] custom font in customAdapter

I used akhilesh0707 answer, but I changed it. public customList(Activity activity, List<itemsModel> itemsList) { this.activity = activity; this.itemsList = itemsList; inflater = activity.getLayoutInflater(); customFontBold = Typeface.createFromAsset(activity.getApplication().getAssets(), “fonts/Assistant-Bold.ttf”); } Thanks akhilesh0707. solved custom font in customAdapter