Skip to content

Instantly share code, notes, and snippets.

Erum engr-erum

Block or report user

Report or block engr-erum

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:cfbc5306327926e3912e7a4e8bf29fa2
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">
View gist:8d88f5bde04a9d95576482e1c915e632
in exoplayer its changing orientation by default.
but now how will i manage position and which method will do this ?
View gist:a92e6787c295e13e7c00662e749f9eab
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());
View gist:d34b7baaf7febd422b75d75a9307e0d0
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
View gist:d41a171d874581213b27e155894c8522
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"
View gist:3ea282aebb89ddbb82fb439cd45c3761
<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
View gist:e7981a490103594bdcb422aba998feb5
<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"
View gist:ad4abbe5b175c4e629ec6ebf536d36a1
<?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
View gist:7aecea74a5f68c25329ca9e47cf67b91
@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) {
View gist:0c916b638dc83cc2be0b1debeacf2c81
<?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"
You can’t perform that action at this time.