Skip to content

Instantly share code, notes, and snippets.

View engr-erum's full-sized avatar

Erum engr-erum

View GitHub Profile
isme se sub ko gone except rl_videoview ki height run time pe match parent krna hae
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_white"
android:orientation="vertical">
in exoplayer its changing orientation by default.
but now how will i manage position and which method will do this ?
have made activityA for login
activityB that contains tablayout and with 3 fragments.
on 3rd tab fragment ----- there is button for logout.
Clicking on logout will clear local storage and move user to activityA for login.
Right now i used this code
private void doLogout() {
if(getActivity() != null && getContext() != null)
{
SalesforceSDKManager.getInstance().logout(getActivity());
SourceTree in Windows
Installed SOURCE TREE couple of days before.It was working fine.
But now no response even program is not going to start from Launcher.
It was working fine from previous 6 months or more. But created same issue two days before
and i installed fresh sourcetree but same issue now again
navigation_drawer_layout
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="false"
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@android:color/white"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
<RelativeLayout
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:fitsSystemWindows="true">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="#CABBBBBB"/>
<corners android:radius="1dp" />
</shape>
</item>
<item
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
final Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_video_preview, container, false);
btnPlay = view.findViewById(R.id.btn_play);
btnNext = view.findViewById(R.id.btn_next);
vvPreview = view.findViewById(R.id.vw_preview);
final ImageView ivPreview = view.findViewById(R.id.iv_preview);
ivPreview.setVisibility(View.VISIBLE);
if (mediaController == null) {
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<VideoView
android:layout_width="fill_parent"
android:layout_height="fill_parent"